info.magnolia.rendering.template.registry
Class TemplateDefinitionRegistry

java.lang.Object
  extended by info.magnolia.registry.AbstractRegistry<TemplateDefinition,TemplateDefinitionProvider>
      extended by info.magnolia.rendering.template.registry.TemplateDefinitionRegistry

@Singleton
public class TemplateDefinitionRegistry
extends info.magnolia.registry.AbstractRegistry<TemplateDefinition,TemplateDefinitionProvider>

The central registry of all TemplateDefinitions.

Version:
$Id$

Constructor Summary
TemplateDefinitionRegistry(TemplateAvailability templateAvailability)
           
 
Method Summary
 Collection<TemplateDefinition> getAvailableTemplates(javax.jcr.Node content)
           
 TemplateDefinition getDefaultTemplate(javax.jcr.Node content)
          Get the Template that could be used for the provided content as a default.
 TemplateDefinition getTemplateDefinition(String id)
           
 Collection<TemplateDefinition> getTemplateDefinitions()
           
protected  boolean isAvailable(TemplateDefinition templateDefinition, javax.jcr.Node content)
           
 
Methods inherited from class info.magnolia.registry.AbstractRegistry
get, getProviders, register, unregister, unregisterAndRegister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateDefinitionRegistry

@Inject
public TemplateDefinitionRegistry(TemplateAvailability templateAvailability)
Method Detail

getTemplateDefinition

public TemplateDefinition getTemplateDefinition(String id)
                                         throws info.magnolia.registry.RegistrationException
Throws:
info.magnolia.registry.RegistrationException

getTemplateDefinitions

public Collection<TemplateDefinition> getTemplateDefinitions()
Returns:
all TemplateDefinitions - in case of errors it'll just deliver the ones that are properly registerd and logs error's for the others.

getAvailableTemplates

public Collection<TemplateDefinition> getAvailableTemplates(javax.jcr.Node content)

isAvailable

protected boolean isAvailable(TemplateDefinition templateDefinition,
                              javax.jcr.Node content)

getDefaultTemplate

public TemplateDefinition getDefaultTemplate(javax.jcr.Node content)
Get the Template that could be used for the provided content as a default.



Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.