Package org.alfresco.repo.virtual.config
Class NodeRefPathExpression
- java.lang.Object
-
- org.alfresco.repo.virtual.config.NodeRefPathExpression
-
- All Implemented Interfaces:
NodeRefExpression
public class NodeRefPathExpression extends java.lang.Object implements NodeRefExpression
A String name or qname path expression that resolves to aNodeRef.
The given name or qname path is relative to aNodeRefContextrepository location. The default context is set toCompanyHomeContext.COMPANY_HOME_CONTEXT_NAME. Other contexts can be set using their name withsetContext(String).
The set path is automatically detected and checked for consistency.
-
-
Constructor Summary
Constructors Constructor Description NodeRefPathExpression(NodeRefResolver resolver, java.util.Map<java.lang.String,NodeRefContext> contexts)NodeRefPathExpression(NodeRefResolver resolver, java.util.Map<java.lang.String,NodeRefContext> contexts, java.lang.String context, java.lang.String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.alfresco.service.cmr.repository.NodeRefresolve()org.alfresco.service.cmr.repository.NodeRefresolve(boolean createIfNotFound)voidsetContext(java.lang.String context)voidsetCreatedPathName(java.lang.String createNamePath)voidsetPath(java.lang.String path)Path setter.
The type of path is automatically detected and checked for consistency.static java.lang.String[]splitAndNormalizePath(java.lang.String path)java.lang.StringtoString()
-
-
-
Constructor Detail
-
NodeRefPathExpression
public NodeRefPathExpression(NodeRefResolver resolver, java.util.Map<java.lang.String,NodeRefContext> contexts)
-
NodeRefPathExpression
public NodeRefPathExpression(NodeRefResolver resolver, java.util.Map<java.lang.String,NodeRefContext> contexts, java.lang.String context, java.lang.String path)
-
-
Method Detail
-
setContext
public void setContext(java.lang.String context)
-
setCreatedPathName
public void setCreatedPathName(java.lang.String createNamePath)
-
setPath
public void setPath(java.lang.String path) throws org.alfresco.error.AlfrescoRuntimeExceptionPath setter.
The type of path is automatically detected and checked for consistency.- Parameters:
path- the string path to be resolved later- Throws:
org.alfresco.error.AlfrescoRuntimeException- if the given path is inconsistent (i.e. a combination of qnames and names)
-
splitAndNormalizePath
public static java.lang.String[] splitAndNormalizePath(java.lang.String path)
-
resolve
public org.alfresco.service.cmr.repository.NodeRef resolve()
- Specified by:
resolvein interfaceNodeRefExpression
-
resolve
public org.alfresco.service.cmr.repository.NodeRef resolve(boolean createIfNotFound)
- Specified by:
resolvein interfaceNodeRefExpression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-