Package pl.edu.icm.unity.engine.api
Interface AttributesManagement
-
public interface AttributesManagement
Attributes management API.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
createAttribute(EntityParam entity, Attribute attribute)
Creates an attribute (must not be present).void
createAttributeSuppressingConfirmation(EntityParam entity, Attribute attribute)
Creates an attribute (must not be present).Collection<AttributeExt>
getAllAttributes(EntityParam entity, boolean effective, String groupPath, String attributeTypeId, boolean allowDegrade)
Returns attributes of an entity, including hidden ones.Collection<AttributeExt>
getAllAttributes(EntityParam entity, boolean effective, List<GroupPattern> groupPathPatterns, String attributeTypeId, boolean allowDegrade)
Returns attributes of multiple groups, including hidden ones.Collection<AttributeExt>
getAllDirectAttributes(EntityParam entity)
Returns direct attributes of all groups, including hidden ones.Collection<AttributeExt>
getAttributes(EntityParam entity, String groupPath, String attributeTypeId)
Returns visible attributes of an entity.void
removeAttribute(EntityParam entity, String groupPath, String attributeTypeId)
Removes a given attributevoid
setAttribute(EntityParam entity, Attribute attribute)
Updates or creates an attribute (may be present).void
setAttribute(EntityParam entity, Attribute attribute, boolean allowUpdate)
Deprecated.use any of other create or set methods.void
setAttributeSuppressingConfirmation(EntityParam entity, Attribute attribute)
Updates or creates an attribute (may be present).
-
-
-
Method Detail
-
setAttribute
@Deprecated void setAttribute(EntityParam entity, Attribute attribute, boolean allowUpdate) throws EngineException
Deprecated.use any of other create or set methods. Left as may be popular in groovy scripts around- Throws:
EngineException
-
createAttribute
void createAttribute(EntityParam entity, Attribute attribute) throws EngineException
Creates an attribute (must not be present). Confirmation will be sent if needed for attribute.- Parameters:
entity
-attribute
-update
-- Throws:
EngineException
-
setAttribute
void setAttribute(EntityParam entity, Attribute attribute) throws EngineException
Updates or creates an attribute (may be present). Confirmation will be sent if needed for attribute.- Parameters:
entity
-attribute
-update
-- Throws:
EngineException
-
createAttributeSuppressingConfirmation
void createAttributeSuppressingConfirmation(EntityParam entity, Attribute attribute) throws EngineException
Creates an attribute (must not be present). Confirmation will not be sent.- Parameters:
entity
-attribute
-update
-- Throws:
EngineException
-
setAttributeSuppressingConfirmation
void setAttributeSuppressingConfirmation(EntityParam entity, Attribute attribute) throws EngineException
Updates or creates an attribute (may be present). Confirmation will not be sent.- Parameters:
entity
-attribute
-update
-- Throws:
EngineException
-
removeAttribute
void removeAttribute(EntityParam entity, String groupPath, String attributeTypeId) throws EngineException
Removes a given attribute- Parameters:
entity
-groupPath
-attributeTypeId
-- Throws:
EngineException
-
getAttributes
Collection<AttributeExt> getAttributes(EntityParam entity, String groupPath, String attributeTypeId) throws 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:
EngineException
-
getAllAttributes
Collection<AttributeExt> getAllAttributes(EntityParam entity, boolean effective, String groupPath, String attributeTypeId, boolean allowDegrade) throws 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:
EngineException
-
getAllAttributes
Collection<AttributeExt> getAllAttributes(EntityParam entity, boolean effective, List<GroupPattern> groupPathPatterns, String attributeTypeId, boolean allowDegrade) throws EngineException
Returns attributes of multiple groups, including hidden ones. Groups are specified by ant patterns.- Throws:
EngineException
-
getAllDirectAttributes
Collection<AttributeExt> getAllDirectAttributes(EntityParam entity)
Returns direct attributes of all groups, including hidden ones.
-
-