Interface EntityDocumentsService
- All Known Subinterfaces:
InternalEntityDocumentsService
- All Known Implementing Classes:
EntityDocumentsServiceImpl
public interface EntityDocumentsService
-
Method Summary
Modifier and TypeMethodDescriptionaddTimestampToFilename
(String fileName) createEntityDocumentsInvoker
(List<EntityId> entities) getDetailDocumentFileName
(ResourceNode resourceNode) Get the file name for a detail documentgetDetailDocumentForField
(Entity entity, String fieldName) getEntityDocumentsFolder
(Entity entity) Get the entity's document foldergetEntityModelFolder
(EntityModel entityModel) Get the entity documents folder for an entity modelgetEntityModelFolder
(String modelName) Get the entity documents folder for an entity modelgetRelatedEntity
(ContentTreeNode contentTreeNode) Get the related entity associated with this ContentTreeNodegetRelatedEntityRelationName
(String relatedEntityName) Get the System Domainboolean
isEntityDetailDocument
(ResourceNode resourceNode) boolean
isEntityDetailDocument
(Entity resourceEntity) boolean
isEntityDocument
(ResourceNode resourceNode) boolean
isEntityDocument
(Entity resourceEntity) boolean
isEntityDocumentFolder
(FolderNode folderNode) check if the folder is an entity doc folder (no matter if it's the root folder, the model root folder or a any child folder.boolean
isEntityDocumentFolder
(Entity entity) check if the entity is an entity doc folder (no matter if it's the root folder, the model root folder or a any child folder.boolean
isEntityModelFolder
(Entity entity) check if the entity is the root folder for an entity modelboolean
isEntityRootFolder
(Entity entity) check if the entity is the root folder for an entityboolean
isRelationToRelatedEntity
(String relationName) Determine if a freely chosen relation is a relation from an entity document/folder to the related entity.
-
Method Details
-
getSystemDomain
Get the System Domain- Returns:
- System Domain
- Throws:
EntityDocumentsException
-
getEntityModelFolder
Get the entity documents folder for an entity model- Parameters:
modelName
- name of the entity model- Returns:
- entity documents folder
- Throws:
EntityDocumentsException
-
getEntityModelFolder
Get the entity documents folder for an entity model- Parameters:
entityModel
- entity model- Returns:
- entity documents folder
- Throws:
EntityDocumentsException
-
getEntityDocumentsFolder
Get the entity's document folder- [entity model folder] \- [entity folder] <-- <b>folder returned</b> \- [language folder]
- Parameters:
entity
- the entity- Returns:
- entity's document folder
- Throws:
EntityDocumentsException
-
getRelatedEntity
Get the related entity associated with this ContentTreeNode- Parameters:
contentTreeNode
- ContentTreeNode- Returns:
- an
Optional
containing the related entity (if available) or anOptional.empty()
) - Throws:
EntityDocumentsException
-
isEntityRootFolder
check if the entity is the root folder for an entity- Parameters:
entity
- the folder entity- Returns:
- true / false
- Throws:
PersistException
-
isEntityModelFolder
check if the entity is the root folder for an entity model- Parameters:
entity
- the folder entity- Returns:
- true / false
- Throws:
PersistException
-
isEntityDocumentFolder
check if the entity is an entity doc folder (no matter if it's the root folder, the model root folder or a any child folder.- Parameters:
entity
- the folder entity- Returns:
- true / false
-
isEntityDocumentFolder
check if the folder is an entity doc folder (no matter if it's the root folder, the model root folder or a any child folder.- Parameters:
folderNode
- the folder node- Returns:
- true / false
-
addTimestampToFilename
-
getRelatedEntityRelationName
Optional<String> getRelatedEntityRelationName(String relatedEntityName) throws EntityDocumentsException - Parameters:
relatedEntityName
- name of a related entity model- Returns:
- name of the relation to the required entity (if such a relation exists, Optional.empty() otherwise)
- Throws:
EntityDocumentsException
-
isRelationToRelatedEntity
Determine if a freely chosen relation is a relation from an entity document/folder to the related entity. I.e. if there exists an Entity called "Post", which also has entity docs: If this method is called with "relPost_entitydocs", true will be returned.- Parameters:
relationName
- Any relation name.- Returns:
- true if it's a relation to the related entity, else false.
-
isEntityDocument
- Throws:
PersistException
-
isEntityDocument
- Throws:
PersistException
-
isEntityDetailDocument
- Throws:
PersistException
-
isEntityDetailDocument
- Throws:
PersistException
-
getDetailDocumentFileName
Get the file name for a detail document- Parameters:
resourceNode
- a detail documentResourceNode
(will throw an exception if any otherResourceNode
s are provided.- Returns:
- the file name for the detail document
- Throws:
PersistException
-
getDetailDocumentForField
-
createEntityDocumentsInvoker
-