public class VirtualProtocol extends Protocol
Reference
resource.getTemplatePath(Reference)
) indicates
a path in this structure.getActualNodeLocation(Reference)
) which should be passed as
parameters to the virtual folder template.Reference
creation and template path navigation.Modifier and Type | Field and Description |
---|---|
static int |
ACTUAL_NODE_LOCATION_PARAM_INDEX
Actual node
Parameter index. |
static Character |
CLASS_TEMPLATE_PATH_TOKEN
Classpath system path token.
|
static Character |
NODE_TEMPLATE_PATH_TOKEN
Repository node path system path token.
|
static int |
TEMPLATE_PATH_PARAM_INDEX
Template path
Parameter index. |
DEFAULT_ENCODING, name
Constructor and Description |
---|
VirtualProtocol() |
VirtualProtocol(String name) |
Modifier and Type | Method and Description |
---|---|
protected Resource |
createSystemPathResource(String templateSysPath)
Deprecated.
In future system paths will be replaced with actual resources
or string encoded references
|
<R> R |
dispatch(ProtocolMethod<R> method,
Reference reference)
ProtocolMethod double-dispatch/visitor protocol type selector. |
RepositoryLocation |
getActualNodeLocation(Reference reference) |
String |
getTemplatePath(Reference reference) |
Reference |
newReference(Encoding encoding,
Resource templateResource,
String templatePath,
Resource actualNodeResource,
List<Parameter> extraParameters) |
Reference |
newReference(org.alfresco.service.cmr.repository.NodeRef templateNodeRef,
String templatePath,
org.alfresco.service.cmr.repository.NodeRef actualNodeRef) |
Reference |
newReference(Resource templateResource,
String templatePath,
org.alfresco.service.cmr.repository.NodeRef actualNodeRef,
List<Parameter> extraParameters) |
Reference |
newReference(String templateSysPath,
String templatePath,
org.alfresco.service.cmr.repository.NodeRef actualNodeRef)
Deprecated.
In future system paths will be replaced with actual resources
or string encoded references
|
Reference |
replaceTemplatePath(Reference reference,
String path) |
addParameter, addParameter, getParameter, propagateNodeRefMutations, replaceParameter, replaceParameter, toString
public static final int ACTUAL_NODE_LOCATION_PARAM_INDEX
Parameter
index.public static final int TEMPLATE_PATH_PARAM_INDEX
Parameter
index.public static final Character NODE_TEMPLATE_PATH_TOKEN
public static final Character CLASS_TEMPLATE_PATH_TOKEN
public VirtualProtocol()
public VirtualProtocol(String name)
public <R> R dispatch(ProtocolMethod<R> method, Reference reference) throws ProtocolMethodException
Protocol
ProtocolMethod
double-dispatch/visitor protocol type selector.
Subclasses should override this method to select the appropriate type
bound method.ProtocolMethod.execute(Protocol, Reference)
default method
implementation.dispatch
in class Protocol
ProtocolMethodException
public String getTemplatePath(Reference reference)
reference
- Reference
TEMPLATE_PATH_PARAM_INDEX
public Reference replaceTemplatePath(Reference reference, String path)
reference
- path
- Reference
copy of the given reference parameter with
the template path set to the given path parameter valueTEMPLATE_PATH_PARAM_INDEX
public RepositoryLocation getActualNodeLocation(Reference reference)
reference
- ACTUAL_NODE_LOCATION_PARAM_INDEX
public Reference newReference(org.alfresco.service.cmr.repository.NodeRef templateNodeRef, String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef)
templateNodeRef
- NodeRef
of the template content holding
repository nodetemplatePath
- actualNodeRef
- Reference
with the given virtual
protocol reference elementspublic Reference newReference(Resource templateResource, String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef, List<Parameter> extraParameters)
templateResource
- template content holding resourcetemplatePath
- actualNodeRef
- Reference
with the given virtual
protocol reference elementspublic Reference newReference(Encoding encoding, Resource templateResource, String templatePath, Resource actualNodeResource, List<Parameter> extraParameters)
public Reference newReference(String templateSysPath, String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef) throws ProtocolMethodException
templateSysPath
- a template-system-path for the template holding
contentCLASS_TEMPLATE_PATH_TOKEN
or
NODE_TEMPLATE_PATH_TOKEN
respectively.templatePath
- actualNodeRef
- Reference
with the given virtual
protocol reference elementsProtocolMethodException
protected Resource createSystemPathResource(String templateSysPath)
templateSysPath
- a classpath or a repository path prefixed with
CLASS_TEMPLATE_PATH_TOKEN
or
NODE_TEMPLATE_PATH_TOKEN
respectively.ClassPathResource
or a RepositoryResource
for
the given system pathCopyright © 2005–2017 Alfresco Software. All rights reserved.