Package pl.edu.icm.unity.engine.api
Interface AttributesManagement
-
public interface AttributesManagementAttributes management API.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidcreateAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute)Creates an attribute (must not be present).voidcreateAttributeSuppressingConfirmation(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute)Creates an attribute (must not be present).java.util.Collection<pl.edu.icm.unity.types.basic.AttributeExt>getAllAttributes(pl.edu.icm.unity.types.basic.EntityParam entity, boolean effective, java.lang.String groupPath, java.lang.String attributeTypeId, boolean allowDegrade)Returns attributes of an entity, including hidden ones.java.util.Collection<pl.edu.icm.unity.types.basic.AttributeExt>getAttributes(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String groupPath, java.lang.String attributeTypeId)Returns visible attributes of an entity.voidremoveAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String groupPath, java.lang.String attributeTypeId)Removes a given attributevoidsetAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute)Updates or creates an attribute (may be present).voidsetAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute, boolean allowUpdate)Deprecated.use any of other create or set methods.voidsetAttributeSuppressingConfirmation(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute)Updates or creates an attribute (may be present).
-
-
-
Method Detail
-
setAttribute
@Deprecated void setAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute, boolean allowUpdate) throws pl.edu.icm.unity.exceptions.EngineExceptionDeprecated.use any of other create or set methods. Left as may be popular in groovy scripts around- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
createAttribute
void createAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute) throws pl.edu.icm.unity.exceptions.EngineExceptionCreates an attribute (must not be present). Confirmation will be sent if needed for attribute.- Parameters:
entity-attribute-update-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
setAttribute
void setAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute) throws pl.edu.icm.unity.exceptions.EngineExceptionUpdates or creates an attribute (may be present). Confirmation will be sent if needed for attribute.- Parameters:
entity-attribute-update-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
createAttributeSuppressingConfirmation
void createAttributeSuppressingConfirmation(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute) throws pl.edu.icm.unity.exceptions.EngineExceptionCreates an attribute (must not be present). Confirmation will not be sent.- Parameters:
entity-attribute-update-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
setAttributeSuppressingConfirmation
void setAttributeSuppressingConfirmation(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute) throws pl.edu.icm.unity.exceptions.EngineExceptionUpdates or creates an attribute (may be present). Confirmation will not be sent.- Parameters:
entity-attribute-update-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeAttribute
void removeAttribute(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String groupPath, java.lang.String attributeTypeId) throws pl.edu.icm.unity.exceptions.EngineExceptionRemoves a given attribute- Parameters:
entity-groupPath-attributeTypeId-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getAttributes
java.util.Collection<pl.edu.icm.unity.types.basic.AttributeExt> getAttributes(pl.edu.icm.unity.types.basic.EntityParam entity, java.lang.String groupPath, java.lang.String attributeTypeId) throws pl.edu.icm.unity.exceptions.EngineExceptionReturns 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.exceptions.EngineException
-
getAllAttributes
java.util.Collection<pl.edu.icm.unity.types.basic.AttributeExt> getAllAttributes(pl.edu.icm.unity.types.basic.EntityParam entity, boolean effective, java.lang.String groupPath, java.lang.String attributeTypeId, boolean allowDegrade) throws pl.edu.icm.unity.exceptions.EngineExceptionReturns 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.exceptions.EngineException
-
-