Package org.alfresco.repo.virtual.ref
Class VanillaProtocol
- java.lang.Object
-
- org.alfresco.repo.virtual.ref.Protocol
-
- org.alfresco.repo.virtual.ref.VirtualProtocol
-
- org.alfresco.repo.virtual.ref.VanillaProtocol
-
- All Implemented Interfaces:
java.io.Serializable
public class VanillaProtocol extends VirtualProtocol
AVirtualProtocolextension that uses a scripted processor virtual template in order to process a so-called vanilla JSON static template definition on template execution.
Vanilla references store have an extraResourceParameterfor the vanilla-JSON template.- Author:
- Bogdan Horje
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intVANILLA_TEMPLATE_PARAM_INDEX-
Fields inherited from class org.alfresco.repo.virtual.ref.VirtualProtocol
ACTUAL_NODE_LOCATION_PARAM_INDEX, CLASS_TEMPLATE_PATH_TOKEN, NODE_TEMPLATE_PATH_TOKEN, TEMPLATE_PATH_PARAM_INDEX
-
Fields inherited from class org.alfresco.repo.virtual.ref.Protocol
DEFAULT_ENCODING, name
-
-
Constructor Summary
Constructors Constructor Description VanillaProtocol()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Rdispatch(ProtocolMethod<R> method, Reference reference)ProtocolMethoddouble-dispatch/visitor protocol type selector.ResourcegetVanillaTemplateResource(Reference reference)ReferencenewReference(java.lang.String vanillaProcessorClasspath, java.lang.String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef, java.lang.String templateSysPath)ReferencenewReference(java.lang.String vanillaProcessorClasspath, java.lang.String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef, org.alfresco.service.cmr.repository.NodeRef templateRef)ReferencenewReference(Encoding encoding, Resource virtualTemplateResource, java.lang.String templatePath, Resource actualResource, Resource vanillTemplateResource, java.util.List<Parameter> extraParameters)-
Methods inherited from class org.alfresco.repo.virtual.ref.VirtualProtocol
createSystemPathResource, getActualNodeLocation, getTemplatePath, newReference, newReference, newReference, newReference, replaceTemplatePath
-
Methods inherited from class org.alfresco.repo.virtual.ref.Protocol
addParameter, addParameter, getParameter, propagateNodeRefMutations, replaceParameter, replaceParameter, toString
-
-
-
-
Field Detail
-
VANILLA_TEMPLATE_PARAM_INDEX
public static final int VANILLA_TEMPLATE_PARAM_INDEX
- See Also:
- Constant Field Values
-
-
Method Detail
-
dispatch
public <R> R dispatch(ProtocolMethod<R> method, Reference reference) throws ProtocolMethodException
Description copied from class:ProtocolProtocolMethoddouble-dispatch/visitor protocol type selector. Subclasses should override this method to select the appropriate type bound method.
This particular implementation calls the defaultProtocolMethod.execute(Protocol, Reference)default method implementation.- Overrides:
dispatchin classVirtualProtocol- Returns:
- the value returned by the type bond method
- Throws:
ProtocolMethodException
-
newReference
public Reference newReference(java.lang.String vanillaProcessorClasspath, java.lang.String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef, org.alfresco.service.cmr.repository.NodeRef templateRef)
-
newReference
public Reference newReference(Encoding encoding, Resource virtualTemplateResource, java.lang.String templatePath, Resource actualResource, Resource vanillTemplateResource, java.util.List<Parameter> extraParameters)
-
newReference
public Reference newReference(java.lang.String vanillaProcessorClasspath, java.lang.String templatePath, org.alfresco.service.cmr.repository.NodeRef actualNodeRef, java.lang.String templateSysPath) throws ProtocolMethodException
- Throws:
ProtocolMethodException
-
-