public class TemplateResourceProcessor extends Object implements ResourceProcessor<VirtualFolderDefinition>
VirtualFolderDefinition
post execution JSON map result unmarshalling.Constructor and Description |
---|
TemplateResourceProcessor(VirtualContext context) |
Modifier and Type | Method and Description |
---|---|
protected FilingRule |
asFilingRule(VirtualContext context,
Object filing)
Creates a filing rule based on the criteria (path, classification: type,
aspects) given in the template.
|
protected VirtualQuery |
asVirtualQuery(VirtualContext context,
Map<String,Object> search)
Creates a query based on the details: language, store, query statement
given in the template.
|
protected VirtualFolderDefinition |
asVirtualStructure(VirtualContext context,
Map<String,Object> result)
Creates a
VirtualFolderDefinition that represents the structure
of the virtual folder. |
protected Map<String,Object> |
createScriptParameters(VirtualContext context)
Adds the script virtual context to the parameters of the context.
|
VirtualFolderDefinition |
process(ClasspathResource classpath)
Processes the JavaScript template given by the
ClasspathResource
and creates a VirtualFolderDefinition (composite) structure that
represents the virtual folder. |
VirtualFolderDefinition |
process(RepositoryResource repositoryResource)
Processes the JavaScript template given by the
RepositoryResource
and creates a VirtualFolderDefinition (composite) structure that
represents the virtual folder. |
VirtualFolderDefinition |
process(Resource resource)
Processes a resource of type
Resource . |
public TemplateResourceProcessor(VirtualContext context)
public VirtualFolderDefinition process(Resource resource) throws ResourceProcessingError
ResourceProcessor
Resource
.process
in interface ResourceProcessor<VirtualFolderDefinition>
resource
- a Resource
to be processed.ResourceProcessingError
public VirtualFolderDefinition process(ClasspathResource classpath) throws ResourceProcessingError
ClasspathResource
and creates a VirtualFolderDefinition
(composite) structure that
represents the virtual folder.process
in interface ResourceProcessor<VirtualFolderDefinition>
A
- ClasspathResource
reference.VirtualFolderDefinition
reference that represents the
structure (tree of nodes) of the virtual folder.ResourceProcessingError
public VirtualFolderDefinition process(RepositoryResource repositoryResource) throws ResourceProcessingError
RepositoryResource
and creates a VirtualFolderDefinition
(composite) structure that
represents the virtual folder.process
in interface ResourceProcessor<VirtualFolderDefinition>
A
- RepositoryResource
reference.VirtualFolderDefinition
reference that represents the
structure (tree of nodes) of the virtual folder.ResourceProcessingError
protected Map<String,Object> createScriptParameters(VirtualContext context) throws ActualEnvironmentException
context
- A VirtualContext
reference.ActualEnvironmentException
protected FilingRule asFilingRule(VirtualContext context, Object filing) throws ResourceProcessingError
context
- The context in which the virtualization process takes
place.filing
- A map containing the filing criteria used to create the
rule.FilingRule
reference.ResourceProcessingError
protected VirtualQuery asVirtualQuery(VirtualContext context, Map<String,Object> search) throws ResourceProcessingError
context
- The context in which the virtualization process takes
place.search
- A map containing the details that define the query:
language, store, query statement.AlfrescoVirtualQuery
reference.ResourceProcessingError
protected VirtualFolderDefinition asVirtualStructure(VirtualContext context, Map<String,Object> result) throws ResourceProcessingError
VirtualFolderDefinition
that represents the structure
of the virtual folder.context
- The context in which the virtualization process takes
place.result
- A map containing the details that define the virtual
entries.VirtualFolderDefinition
reference.ResourceProcessingError
Copyright © 2005–2017 Alfresco Software. All rights reserved.