public interface AppService
Modifier and Type | Method and Description |
---|---|
Node |
createDraftEntity(Session session,
java.lang.String mainMixin)
Convenience method to create a Node with given mixin under the current logged
in user home.
|
java.lang.String |
getAppBaseName()
Returns the current App name
|
default java.lang.String |
getBaseRelPath(java.lang.String nodeType) |
java.lang.String |
getDefaultRelPath(Node entity)
Computes the App specific relative path for a known type based on properties
of the passed node
|
java.lang.String |
getDefaultRelPath(Session session,
java.lang.String nodeType,
java.lang.String id)
Computes the App specific relative path for this known node type based on the
passed id
|
java.lang.String |
getDisplayName(Node entity)
Returns a display name that is app specific and that depends on one or more
of the entity properties.
|
Node |
getDraftParent(Session session)
Returns (after creation if necessary) the base parent for draft nodes of this
application
|
Node |
getEntityByUid(Session session,
java.lang.String parentPath,
java.lang.String uid)
Searches the workspace corresponding to the passed session.
|
default java.lang.String |
getLabel(java.lang.String key,
java.lang.String... innerNames)
Draft implementation of an i18n mechanism to retrieve labels given a key
|
default java.lang.String |
getMainNodeType(Node node)
Returns the App specific main type of a node, that can be its primary type or
one of its mixin, typically for the People App.
|
boolean |
isKnownType(Node entity)
Simply checks if the passed entity has a primary or mixin type that is known
and thus can be managed by the this App
|
boolean |
isKnownType(java.lang.String nodeType)
Simply checks if the passed type is known and thus can be managed by the this
App.
|
default Node |
publishEntity(Node parent,
java.lang.String nodeType,
Node srcNode) |
Node |
publishEntity(Node parent,
java.lang.String nodeType,
Node srcNode,
boolean removeSrcNode) |
Node |
saveEntity(Node entity,
boolean publish)
Try to save and optionally publish a business object after applying context
specific rules and special behaviours (typically cache updates).
|
java.lang.String getAppBaseName()
Node publishEntity(Node parent, java.lang.String nodeType, Node srcNode, boolean removeSrcNode) throws RepositoryException
RepositoryException
Node saveEntity(Node entity, boolean publish)
entity
- publish
- also publishes the corresponding nodePeopleException
- If one of the rule defined for this type is not respected. Use
getMessage to display to the user if neededjava.lang.String getDefaultRelPath(Node entity) throws RepositoryException
RepositoryException
java.lang.String getDefaultRelPath(Session session, java.lang.String nodeType, java.lang.String id)
session
- TODOjava.lang.String getDisplayName(Node entity)
Node getDraftParent(Session session) throws RepositoryException
RepositoryException
Node createDraftEntity(Session session, java.lang.String mainMixin) throws RepositoryException
RepositoryException
boolean isKnownType(Node entity)
boolean isKnownType(java.lang.String nodeType)
Node getEntityByUid(Session session, java.lang.String parentPath, java.lang.String uid)
session
- parentPath
- can be null or emptyuid
- the implementation specific UID of the searched entitydefault java.lang.String getMainNodeType(Node node)
default java.lang.String getBaseRelPath(java.lang.String nodeType)
default Node publishEntity(Node parent, java.lang.String nodeType, Node srcNode) throws RepositoryException
RepositoryException
default java.lang.String getLabel(java.lang.String key, java.lang.String... innerNames)
Copyright © 2007–2020. All rights reserved.