public interface ResourcesService extends AppService
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateTag(Session session) |
long |
countMembers(Node tag)
Count members that have such a tag in the corresponding taggable sub tree
|
Node |
createTagLikeResourceParent(Session session,
java.lang.String tagId,
java.lang.String tagInstanceType,
java.lang.String codePropName,
java.lang.String taggableParentPath,
java.lang.String taggableNodeType,
java.util.List<java.lang.String> taggablePropNames) |
Node |
createTagLikeResourceParent(Session session,
java.lang.String tagId,
java.lang.String tagInstanceType,
java.lang.String codePropName,
java.lang.String taggableParentPath,
java.lang.String taggableNodeType,
java.lang.String taggablePropName) |
Node |
createTemplateForType(Session session,
java.lang.String nodeType,
java.lang.String templateId) |
NodeIterator |
getCatalogueValueInstances(Session session,
java.lang.String entityType,
java.lang.String propName,
java.lang.String value)
Retrieves all entities which property has the given value
|
java.lang.String |
getEncodedTagCodeFromValue(Session session,
java.lang.String tagId,
java.lang.String value)
Retrieves the code of an encoded tag given its English value or null if
no such tag exists.
|
java.lang.String |
getEncodedTagValue(Session session,
java.lang.String tagId,
java.lang.String code)
Retrieves the value of an encoded tag or null if such a tag has not yet
been registered
|
java.lang.String |
getEncodedTagValuesAsString(java.lang.String tagId,
Node taggedNode,
java.lang.String propertyName,
java.lang.String separator)
Shortcut to retrieve a string that concatenates the corresponding values
of a multi value property that refers to multiple encoded tags
|
java.lang.String |
getItemDefaultEnLabel(java.lang.String itemName)
Returns a canonical English label for each of the JCR Property or node
types defined in the current People Repository.
|
java.lang.String |
getItemLabel(java.lang.String itemName,
java.lang.String langIso)
Returns a label for each of the JCR property name or node type defined in
the current People Repository in a internationalised context.
|
Node |
getNodeTemplate(Session session,
java.lang.String templateId) |
Node |
getRegisteredTag(Node tagInstanceParent,
java.lang.String tag)
Retrieves the instance node given its value or code if it is an
encodedTag or null if such a tag has not yet been registered
Comparison is case insensitive and a trim() is applied on the passed
String for not encoded tag
|
Node |
getRegisteredTag(Session session,
java.lang.String tagId,
java.lang.String tag)
Retrieve the instance node given its value or code if it is an encodedTag
or null if such a tag has not yet been registered
Comparison is case insensitive and a trim() is applied on the passed
String for not encoded tag
|
java.util.List<java.lang.String> |
getRegisteredTagValueList(Session session,
java.lang.String tagId,
java.lang.String filter) |
NodeIterator |
getTaggedEntities(Node tagInstancesParent,
java.lang.String key)
Retrieves all entities that have this key
|
NodeIterator |
getTaggedEntities(Session session,
java.lang.String tagId,
java.lang.String key)
Retrieves all entities that have this tag key
|
Node |
getTagLikeResourceParent(Session session,
java.lang.String tagId)
Retrieves the parent for tag instances that correspond to this ID or null
if non has been found
|
java.util.List<java.lang.String> |
getTemplateCatalogue(Node templateNode,
java.lang.String propertyName,
java.lang.String filter)
Returns the predefined possible English values as defined in the passed
template node and that match the corresponding filter.
|
java.util.List<java.lang.String> |
getTemplateCatalogue(Session session,
java.lang.String templateId,
java.lang.String propertyName,
java.lang.String filter)
Returns the predefined possible English values of a property of a given
node type as defined in the current People Repository and that match the
corresponding filter.
|
void |
refreshKnownTags(Node tagParent)
Browses the repository using the parameters stored in the tagParent node
and creates a new tag instance for all new value found in the taggable
property of one of the valid node.
|
void |
refreshKnownTags(Session session,
java.lang.String tagId)
Browses the repository using the parameters stored in the tagParent node
and creates a new tag instance for all new value found in the taggable
property of one of the valid node.
|
Node |
registerTag(Session session,
java.lang.String tagId,
java.lang.String tagValue)
Register a new tag if such a tag does not exist, does nothing otherwise.
|
Node |
registerTag(Session session,
java.lang.String tagId,
java.lang.String tagCode,
java.lang.String tagValue)
Register a new tag if a tag with such a code does not yet exist, returns
the existing one otherwise.
|
void |
unregisterTag(Session session,
java.lang.String tagId,
java.lang.String tag)
Unregister an existing tag and remove all references to this tag on all
nodes under the tagableParentPath that have this tag
|
void |
updateCatalogueValue(Node templateNode,
java.lang.String taggableType,
java.lang.String propertyName,
java.lang.String oldValue,
java.lang.String newTitle)
Change the value of a given template catalogue.
|
boolean |
updateTag(Node tagInstance,
java.lang.String newValue)
Change the value of an already registered tag that does not rely on a
code (e.g.
|
createDraftEntity, getAppBaseName, getBaseRelPath, getDefaultRelPath, getDefaultRelPath, getDisplayName, getDraftParent, getEntityByUid, getLabel, getMainNodeType, isKnownType, isKnownType, publishEntity, publishEntity, saveEntity
java.lang.String getItemDefaultEnLabel(java.lang.String itemName)
java.lang.String getItemLabel(java.lang.String itemName, java.lang.String langIso)
java.util.List<java.lang.String> getTemplateCatalogue(Session session, java.lang.String templateId, java.lang.String propertyName, java.lang.String filter)
session
- templateId
- generally, the corresponding NodeTypepropertyName
- filter
- List
of statusjava.util.List<java.lang.String> getTemplateCatalogue(Node templateNode, java.lang.String propertyName, java.lang.String filter)
templateNode
- the template, must not be nullpropertyName
- filter
- List
of statusNode createTemplateForType(Session session, java.lang.String nodeType, java.lang.String templateId)
session
- nodeType
- templateId
- optional distinct id for this templateNode getNodeTemplate(Session session, java.lang.String templateId)
session
- templateId
- the template ID, it is by default the nodeType of the node for
which this node is a templateNodeIterator getCatalogueValueInstances(Session session, java.lang.String entityType, java.lang.String propName, java.lang.String value)
session
- entityType
- propName
- value
- void updateCatalogueValue(Node templateNode, java.lang.String taggableType, java.lang.String propertyName, java.lang.String oldValue, java.lang.String newTitle)
Node createTagLikeResourceParent(Session session, java.lang.String tagId, java.lang.String tagInstanceType, java.lang.String codePropName, java.lang.String taggableParentPath, java.lang.String taggableNodeType, java.lang.String taggablePropName)
session
- with write rightstagId
- An optional ID to differentiate distinct parent that might be
similartagInstanceType
- The node type of the corresponding resources. It defines the
created parent if tagId is nullcodePropName
- The name of the property that provides the code in case the
string we store in the taggable multi value property is not
the label that has to be displayedtaggableParentPath
- Absolute path to parent of the taggable nodestaggableNodeType
- Node type of the taggable nodestaggablePropName
- Name of the multi value property of the taggable node in which
the corresponding tag is storedNode createTagLikeResourceParent(Session session, java.lang.String tagId, java.lang.String tagInstanceType, java.lang.String codePropName, java.lang.String taggableParentPath, java.lang.String taggableNodeType, java.util.List<java.lang.String> taggablePropNames)
session
- with write rightstagId
- An optional ID to differentiate distinct parent that might be
similartagInstanceType
- The node type of the corresponding resources. It defines the
created parent if tagId is nullcodePropName
- The name of the property that provides the code in case the
string we store in the taggable multi value property is not
the label that has to be displayedtaggableParentPath
- Absolute path to parent of the taggable nodestaggableNodeType
- Node type of the taggable nodestaggablePropNames
- Names of the multi value property of the taggable node in
which the corresponding tag is storedNode getTagLikeResourceParent(Session session, java.lang.String tagId)
session
- tagId
- Node registerTag(Session session, java.lang.String tagId, java.lang.String tagValue) throws RepositoryException
session
- tagId
- tagValue
- RepositoryException
Node registerTag(Session session, java.lang.String tagId, java.lang.String tagCode, java.lang.String tagValue) throws RepositoryException
session
- tagId
- tagCode
- tagValue
- RepositoryException
Node getRegisteredTag(Session session, java.lang.String tagId, java.lang.String tag)
Node getRegisteredTag(Node tagInstanceParent, java.lang.String tag)
java.lang.String getEncodedTagValue(Session session, java.lang.String tagId, java.lang.String code)
java.lang.String getEncodedTagCodeFromValue(Session session, java.lang.String tagId, java.lang.String value)
registerTag(Session session, String tagId, String
tagCode, String tagValue)
java.lang.String getEncodedTagValuesAsString(java.lang.String tagId, Node taggedNode, java.lang.String propertyName, java.lang.String separator)
boolean updateTag(Node tagInstance, java.lang.String newValue) throws RepositoryException
RepositoryException
void unregisterTag(Session session, java.lang.String tagId, java.lang.String tag)
NodeIterator getTaggedEntities(Session session, java.lang.String tagId, java.lang.String key)
key
- the code in case of an encoded tag, the value itself otherwiseNodeIterator getTaggedEntities(Node tagInstancesParent, java.lang.String key)
key
- the code in case of an encoded tag, the value itself otherwisevoid refreshKnownTags(Session session, java.lang.String tagId)
void refreshKnownTags(Node tagParent)
java.util.List<java.lang.String> getRegisteredTagValueList(Session session, java.lang.String tagId, java.lang.String filter)
session
- tagId
- filter
- long countMembers(Node tag)
boolean canCreateTag(Session session)
Copyright © 2007–2020. All rights reserved.