Package pl.edu.icm.unity.engine.api
Interface AttributesManagement
public interface AttributesManagement
Attributes management API.
- Author:
- K. Benedyczak
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createAttribute
(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) Creates an attribute (must not be present).void
createAttributeSuppressingConfirmation
(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) Creates an attribute (must not be present).Collection<pl.edu.icm.unity.base.attribute.AttributeExt>
getAllAttributes
(pl.edu.icm.unity.base.entity.EntityParam entity, boolean effective, String groupPath, String attributeTypeId, boolean allowDegrade) Returns attributes of an entity, including hidden ones.Collection<pl.edu.icm.unity.base.attribute.AttributeExt>
getAllAttributes
(pl.edu.icm.unity.base.entity.EntityParam entity, boolean effective, List<GroupPattern> groupPathPatterns, String attributeTypeId, boolean allowDegrade) Returns attributes of multiple groups, including hidden ones.Collection<pl.edu.icm.unity.base.attribute.AttributeExt>
getAllDirectAttributes
(pl.edu.icm.unity.base.entity.EntityParam entity) Returns direct attributes of all groups, including hidden ones.Collection<pl.edu.icm.unity.base.attribute.AttributeExt>
getAttributes
(pl.edu.icm.unity.base.entity.EntityParam entity, String groupPath, String attributeTypeId) Returns visible attributes of an entity.void
removeAttribute
(pl.edu.icm.unity.base.entity.EntityParam entity, String groupPath, String attributeTypeId) Removes a given attributevoid
setAttribute
(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) Updates or creates an attribute (may be present).void
setAttribute
(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute, boolean allowUpdate) Deprecated.use any of other create or set methods.void
setAttributeSuppressingConfirmation
(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) Updates or creates an attribute (may be present).
-
Method Details
-
setAttribute
@Deprecated void setAttribute(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute, boolean allowUpdate) throws pl.edu.icm.unity.base.exceptions.EngineException Deprecated.use any of other create or set methods. Left as may be popular in groovy scripts around- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
createAttribute
void createAttribute(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) throws pl.edu.icm.unity.base.exceptions.EngineException Creates an attribute (must not be present). Confirmation will be sent if needed for attribute.- Parameters:
entity
-attribute
-update
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
setAttribute
void setAttribute(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) throws pl.edu.icm.unity.base.exceptions.EngineException Updates or creates an attribute (may be present). Confirmation will be sent if needed for attribute.- Parameters:
entity
-attribute
-update
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
createAttributeSuppressingConfirmation
void createAttributeSuppressingConfirmation(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) throws pl.edu.icm.unity.base.exceptions.EngineException Creates an attribute (must not be present). Confirmation will not be sent.- Parameters:
entity
-attribute
-update
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
setAttributeSuppressingConfirmation
void setAttributeSuppressingConfirmation(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) throws pl.edu.icm.unity.base.exceptions.EngineException Updates or creates an attribute (may be present). Confirmation will not be sent.- Parameters:
entity
-attribute
-update
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
removeAttribute
void removeAttribute(pl.edu.icm.unity.base.entity.EntityParam entity, String groupPath, String attributeTypeId) throws pl.edu.icm.unity.base.exceptions.EngineException Removes a given attribute- Parameters:
entity
-groupPath
-attributeTypeId
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAttributes
Collection<pl.edu.icm.unity.base.attribute.AttributeExt> getAttributes(pl.edu.icm.unity.base.entity.EntityParam entity, String groupPath, String attributeTypeId) throws pl.edu.icm.unity.base.exceptions.EngineException Returns visible attributes of an entity. The two last arguments can be null, meaning that there is no restriction. The security sensitive attributes are not included.- Parameters:
entity
-groupPath
-attributeTypeId
-- Returns:
- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAllAttributes
Collection<pl.edu.icm.unity.base.attribute.AttributeExt> getAllAttributes(pl.edu.icm.unity.base.entity.EntityParam entity, boolean effective, String groupPath, String attributeTypeId, boolean allowDegrade) throws pl.edu.icm.unity.base.exceptions.EngineException Returns attributes of an entity, including hidden ones. The two last arguments can be null, meaning that there is no restriction.- Parameters:
entity
-effective
- if false then attributes which are added by groups' attribute statements are not included. Useful only for attribute management interfaces.groupPath
-attributeTypeId
-allowDegrade
- if true then in case that the caller has no permission to read hidden attributes, the method will degrade itself and will try to return only the visible attributes, what requires smaller permissions. Note that still it may cause authz error.- Returns:
- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAllAttributes
Collection<pl.edu.icm.unity.base.attribute.AttributeExt> getAllAttributes(pl.edu.icm.unity.base.entity.EntityParam entity, boolean effective, List<GroupPattern> groupPathPatterns, String attributeTypeId, boolean allowDegrade) throws pl.edu.icm.unity.base.exceptions.EngineException Returns attributes of multiple groups, including hidden ones. Groups are specified by ant patterns.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAllDirectAttributes
Collection<pl.edu.icm.unity.base.attribute.AttributeExt> getAllDirectAttributes(pl.edu.icm.unity.base.entity.EntityParam entity) Returns direct attributes of all groups, including hidden ones.
-