Class AspectVirtualizationMethod

java.lang.Object
org.alfresco.repo.virtual.store.TemplateVirtualizationMethod
org.alfresco.repo.virtual.store.AspectVirtualizationMethod
All Implemented Interfaces:
VirtualizationMethod
Direct Known Subclasses:
CustomVirtualizationMethod, SystemVirtualizationMethod

public abstract class AspectVirtualizationMethod extends TemplateVirtualizationMethod
A template virtualization rule implementation that uses Alfresco-aspect defined meta-data for locating templates.
Stores the aspect QName to be used in resolving templates by querying aspect defined meta data from the virtualized NodeRef.
Author:
Bogdan Horje
  • Field Details

  • Constructor Details

    • AspectVirtualizationMethod

      public AspectVirtualizationMethod()
    • AspectVirtualizationMethod

      public AspectVirtualizationMethod(QName aspectName)
  • Method Details

    • init

      public void init()
    • canVirtualize

      public boolean canVirtualize(ActualEnvironment env, NodeRef nodeRef) throws ActualEnvironmentException
      Determines if a given NodeRef can be virtualized by this virtualization method by checking the presence of the of the configured aspect (i.e. aspectQName) on the given NodeRef.
      Parameters:
      env - the environment in which the virtualization should take place
      nodeRef - the NodeRef that should be virtualized
      Returns:
      true if the given NodeRef can be virtualized by this virtualization method (i.e. the configurend aspect is set on the given NodeRef) false otherwise
      Throws:
      VirtualizationException
      ActualEnvironmentException
    • getAspectQName

      protected QName getAspectQName()
    • setAspectName

      public void setAspectName(String aspectName)
    • setNamespacePrefixResolver

      public void setNamespacePrefixResolver(NamespacePrefixResolver namespacePrefixResolver)