Class TypeRegistry
- java.lang.Object
-
- org.nuxeo.runtime.contribution.impl.AbstractContributionRegistry<String,TypeDescriptor>
-
- org.nuxeo.ecm.webengine.model.impl.TypeRegistry
-
- All Implemented Interfaces:
ContributionRegistry<String,TypeDescriptor>
public class TypeRegistry extends AbstractContributionRegistry<String,TypeDescriptor>
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,AdapterType>
adapters
protected ClassProxy
docObjectClass
protected WebEngine
engine
protected ModuleImpl
module
protected Map<String,AbstractResourceType>
types
-
Fields inherited from class org.nuxeo.runtime.contribution.impl.AbstractContributionRegistry
listeners, parent, registry
-
-
Constructor Summary
Constructors Constructor Description TypeRegistry(TypeRegistry parent, WebEngine engine, ModuleImpl module)
TypeRegistry(WebEngine engine, ModuleImpl module)
-
Method Summary
-
Methods inherited from class org.nuxeo.runtime.contribution.impl.AbstractContributionRegistry
addFragment, dispose, fireResolved, fireUnresolved, fireUpdated, getContribution, getObject, getOrCreateDependency, getParent, importContribution, importParentContributions, removeContribution, removeFragment
-
-
-
-
Field Detail
-
engine
protected final WebEngine engine
-
module
protected final ModuleImpl module
-
types
protected final Map<String,AbstractResourceType> types
-
adapters
protected final Map<String,AdapterType> adapters
-
docObjectClass
protected ClassProxy docObjectClass
-
-
Constructor Detail
-
TypeRegistry
public TypeRegistry(TypeRegistry parent, WebEngine engine, ModuleImpl module)
-
TypeRegistry
public TypeRegistry(WebEngine engine, ModuleImpl module)
-
-
Method Detail
-
registerRootType
protected void registerRootType()
-
getRootType
public ResourceType getRootType()
-
getModule
public ModuleImpl getModule()
-
getType
public ResourceType getType(String name)
-
getAdapter
public AdapterType getAdapter(String name)
-
getAdapter
public AdapterType getAdapter(Resource target, String name)
-
getAdapters
public List<AdapterType> getAdapters(Resource resource)
-
getEnabledAdapters
public List<AdapterType> getEnabledAdapters(Resource resource)
-
collectAdaptersFor
protected void collectAdaptersFor(Resource ctx, ResourceType type, List<AdapterType> result)
-
collectAdapterNamesFor
protected void collectAdapterNamesFor(Resource ctx, ResourceType type, List<String> result)
-
collectEnabledAdaptersFor
protected void collectEnabledAdaptersFor(Resource ctx, ResourceType type, List<AdapterType> result)
-
collectEnabledAdapterNamesFor
protected void collectEnabledAdapterNamesFor(Resource ctx, ResourceType type, List<String> result)
-
getTypes
public ResourceType[] getTypes()
-
getAdapters
public AdapterType[] getAdapters()
-
registerTypeDescriptor
public void registerTypeDescriptor(TypeDescriptor td)
-
registerType
public void registerType(TypeDescriptor td)
-
registerAdapter
public void registerAdapter(AdapterDescriptor td)
-
unregisterType
public void unregisterType(TypeDescriptor td)
-
unregisterAdapter
public void unregisterAdapter(TypeDescriptor td)
-
registerDocumentTypeIfNeeded
protected boolean registerDocumentTypeIfNeeded(String typeName)
-
clone
protected TypeDescriptor clone(TypeDescriptor object)
- Specified by:
clone
in classAbstractContributionRegistry<String,TypeDescriptor>
-
applyFragment
protected void applyFragment(TypeDescriptor object, TypeDescriptor fragment)
Description copied from class:AbstractContributionRegistry
Applies fragment over the given object.- Overrides:
applyFragment
in classAbstractContributionRegistry<String,TypeDescriptor>
-
applySuperFragment
protected void applySuperFragment(TypeDescriptor object, TypeDescriptor superFragment)
- Overrides:
applySuperFragment
in classAbstractContributionRegistry<String,TypeDescriptor>
-
installContribution
protected void installContribution(String key, TypeDescriptor object)
- Specified by:
installContribution
in classAbstractContributionRegistry<String,TypeDescriptor>
-
installTypeContribution
protected void installTypeContribution(String key, TypeDescriptor object)
-
installAdapterContribution
protected void installAdapterContribution(String key, AdapterDescriptor object)
-
updateContribution
protected void updateContribution(String key, TypeDescriptor object, TypeDescriptor oldValue)
- Overrides:
updateContribution
in classAbstractContributionRegistry<String,TypeDescriptor>
-
updateTypeContribution
protected void updateTypeContribution(String key, TypeDescriptor object)
-
updateAdapterContribution
protected void updateAdapterContribution(String key, AdapterDescriptor object)
-
uninstallContribution
protected void uninstallContribution(String key, TypeDescriptor value)
- Specified by:
uninstallContribution
in classAbstractContributionRegistry<String,TypeDescriptor>
-
isMainFragment
protected boolean isMainFragment(TypeDescriptor object)
- Overrides:
isMainFragment
in classAbstractContributionRegistry<String,TypeDescriptor>
-
-