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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributeExt
getAttributeByMetadata(EntityParam entity, String group, String metadataId)
Returns attribute which has the given metadata set.Collection<Attribute>
getAttributesByKeyword(String keyword)
Returns all attributes linked with given keyword.Map<String,AttributeType>
getAttributeTypesAsMap()
List<AttributeType>
getAttributeTypeWithMetadata(String metadataId)
Returns all attribute types which have the given metadata set.AttributeType
getAttributeTypeWithSingeltonMetadata(String metadataId)
Returns attribute type which has the given metadata set.Optional<String>
getAttributeValueByMetadata(EntityParam entity, String group, String metadataId)
Returns the first value of attribute which has the given metadata set.Map<Long,List<Attribute>>
getEntitiesWithAttributes(String attributeTypeName)
Search for all attributes with given type name.
-
-
-
Method Detail
-
getAttributeTypeWithSingeltonMetadata
AttributeType getAttributeTypeWithSingeltonMetadata(String metadataId) throws 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:
EngineException
-
getAttributeTypeWithMetadata
List<AttributeType> getAttributeTypeWithMetadata(String metadataId) throws EngineException
Returns all attribute types which have the given metadata set.- Throws:
EngineException
-
getAttributeByMetadata
AttributeExt getAttributeByMetadata(EntityParam entity, String group, String metadataId) throws 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:
EngineException
-
getAttributeValueByMetadata
Optional<String> getAttributeValueByMetadata(EntityParam entity, String group, String metadataId) throws 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:
EngineException
-
getAttributeTypesAsMap
Map<String,AttributeType> getAttributeTypesAsMap() throws EngineException
- Returns:
- all attribute types as map. Not authorized anyhow
- Throws:
EngineException
-
getAttributesByKeyword
Collection<Attribute> getAttributesByKeyword(String keyword)
Returns all attributes linked with given keyword. No authorization.
-
-