Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.model.impl
Class CompositePropertyFactory

java.lang.Object
  extended by org.nuxeo.ecm.core.api.model.impl.CompositePropertyFactory
All Implemented Interfaces:
PropertyFactory
Direct Known Subclasses:
DefaultPropertyFactory

public class CompositePropertyFactory
extends Object
implements PropertyFactory

A composite property factory that use children factories to create properties.

The children factories are registered under a string key that is the type name corresponding to the property that is to be created. The type name can be specified as an absolute or as a local type name. For example if the global type string is redefined by a schema myschema then you need to use the absolute type name to refer to that type: myschema:string.

If one looks up a factory using an absolute type name - the absolute name will be used and if no factory is found then the local type name is used.

Author:
Bogdan Stefanescu

Constructor Summary
CompositePropertyFactory(PropertyFactory defaultFactory)
           
 
Method Summary
 Property createProperty(Property parent, Field field, int flags)
           
 PropertyFactory getFactory(String type)
           
 PropertyFactory getFactory(String schema, String type)
           
 void registerFactory(String type, PropertyFactory factory)
           
 void registerFactory(String schema, String type, PropertyFactory factory)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositePropertyFactory

public CompositePropertyFactory(PropertyFactory defaultFactory)
Method Detail

registerFactory

public void registerFactory(String type,
                            PropertyFactory factory)

registerFactory

public void registerFactory(String schema,
                            String type,
                            PropertyFactory factory)

getFactory

public PropertyFactory getFactory(String type)

getFactory

public PropertyFactory getFactory(String schema,
                                  String type)

createProperty

public Property createProperty(Property parent,
                               Field field,
                               int flags)
Specified by:
createProperty in interface PropertyFactory

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.