Interface AttributeSupport
public interface AttributeSupport
This interface collect engine's operations related to attributes. Those operations doesn't check for authorization
therefore their usage should be limited by a wrapping code, the operations must not be exposed directly.
- Author:
- K. Benedyczak
-
Method Summary
Modifier and TypeMethodDescriptionpl.edu.icm.unity.base.attribute.AttributeExt
getAttributeByMetadata
(pl.edu.icm.unity.base.entity.EntityParam entity, String group, String metadataId) Returns attribute which has the given metadata set.Collection<pl.edu.icm.unity.base.attribute.Attribute>
getAttributesByKeyword
(String keyword) Returns all attributes linked with given keyword.List<pl.edu.icm.unity.base.attribute.AttributeType>
getAttributeTypeWithMetadata
(String metadataId) Returns all attribute types which have the given metadata set.pl.edu.icm.unity.base.attribute.AttributeType
getAttributeTypeWithSingeltonMetadata
(String metadataId) Returns attribute type which has the given metadata set.getAttributeValueByMetadata
(pl.edu.icm.unity.base.entity.EntityParam entity, String group, String metadataId) Returns the first value of attribute which has the given metadata set.getEntitiesWithAttributes
(String attributeTypeName) Search for all attributes with given type name.
-
Method Details
-
getAttributeTypeWithSingeltonMetadata
pl.edu.icm.unity.base.attribute.AttributeType getAttributeTypeWithSingeltonMetadata(String metadataId) throws pl.edu.icm.unity.base.exceptions.EngineException Returns attribute type which has the given metadata set. The metadata must be singleton, otherwise unchecked exception is thrown. If there is no attribute type with this metadata, then null is returned.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAttributeTypeWithMetadata
List<pl.edu.icm.unity.base.attribute.AttributeType> getAttributeTypeWithMetadata(String metadataId) throws pl.edu.icm.unity.base.exceptions.EngineException Returns all attribute types which have the given metadata set.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAttributeByMetadata
pl.edu.icm.unity.base.attribute.AttributeExt getAttributeByMetadata(pl.edu.icm.unity.base.entity.EntityParam entity, String group, String metadataId) throws pl.edu.icm.unity.base.exceptions.EngineException Returns attribute which has the given metadata set. If there is no attribute type with this metadata, then null is returned. The metadata must be singleton, otherwise unchecked exception is thrown.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAttributeValueByMetadata
Optional<String> getAttributeValueByMetadata(pl.edu.icm.unity.base.entity.EntityParam entity, String group, String metadataId) throws pl.edu.icm.unity.base.exceptions.EngineException Returns the first value of attribute which has the given metadata set. If there is no such attribute type with this metadata or value, then null is returned. The metadata must be singleton, otherwise unchecked exception is thrown.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAttributeTypesAsMap
Map<String,pl.edu.icm.unity.base.attribute.AttributeType> getAttributeTypesAsMap() throws pl.edu.icm.unity.base.exceptions.EngineException- Returns:
- all attribute types as map. Not authorized anyhow
- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getAttributesByKeyword
Returns all attributes linked with given keyword. No authorization. -
getEntitiesWithAttributes
Map<Long,List<pl.edu.icm.unity.base.attribute.Attribute>> getEntitiesWithAttributes(String attributeTypeName) Search for all attributes with given type name. Returns map identified by entity Id with list of attributes of given type. No authorization.
-