|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.decorator.ChainedDecoratorFactory
Creates a chain of decorator factories. Decorated classes extend this class which provides basic functinality for changing, especially the #chainedFactory which will be set automatically by the DecoratedRepositoryFactoryBean.
Field Summary | |
protected DecoratorFactory |
chainedFactory
|
Constructor Summary | |
ChainedDecoratorFactory()
|
Method Summary | |
DecoratorFactory |
getChainedFactory()
|
Item |
getItemDecorator(Session session,
Item item)
Creates an item decorator. |
Lock |
getLockDecorator(Node node,
Lock lock)
Creates a lock decorator. |
Node |
getNodeDecorator(Session session,
Node node)
Creates a node decorator. |
Property |
getPropertyDecorator(Session session,
Property property)
Creates a property decorator. |
Repository |
getRepositoryDecorator(Repository repository)
Creates a repository decorator. |
Session |
getSessionDecorator(Repository repository,
Session session)
Creates a session decorator. |
Workspace |
getWorkspaceDecorator(Session session,
Workspace workspace)
Creates a workspace decorator. |
void |
setChainedFactory(DecoratorFactory factory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DecoratorFactory chainedFactory
Constructor Detail |
public ChainedDecoratorFactory()
Method Detail |
public Repository getRepositoryDecorator(Repository repository)
DecoratorFactory
getRepositoryDecorator
in interface DecoratorFactory
repository
- the underlying repository instance
DecoratorFactory.getRepositoryDecorator(javax.jcr.Repository)
public Session getSessionDecorator(Repository repository, Session session)
DecoratorFactory
getRepository()
method to avoid
breaking the decorator layer.
The following example code illustrates how this method should be used to implement the repository login methods.
DecoratorFactory factory = ...; // The decorator factory Session session = ...; // The underlying session instance return factory.getSessionDecorator(this, session);
getSessionDecorator
in interface DecoratorFactory
repository
- the repository (decorator) instance used to create
the session decoratorsession
- the underlying session instance
DecoratorFactory.getSessionDecorator(javax.jcr.Repository,
javax.jcr.Session)
public Item getItemDecorator(Session session, Item item)
DecoratorFactory
getItemDecorator
in interface DecoratorFactory
session
- the session (decorator) instance used to create the
item decoratoritem
- the underlying item instance
DecoratorFactory.getItemDecorator(javax.jcr.Session, javax.jcr.Item)
public Node getNodeDecorator(Session session, Node node)
DecoratorFactory
getNodeDecorator
in interface DecoratorFactory
session
- the session (decorator) instance used to create the
node decoratornode
- the underlying node instance
DecoratorFactory.getNodeDecorator(javax.jcr.Session, javax.jcr.Node)
public Property getPropertyDecorator(Session session, Property property)
DecoratorFactory
getPropertyDecorator
in interface DecoratorFactory
session
- the session (decorator) instance used to create the
property decoratorproperty
- the underlying property instance
DecoratorFactory.getPropertyDecorator(javax.jcr.Session, javax.jcr.Property)
public Workspace getWorkspaceDecorator(Session session, Workspace workspace)
DecoratorFactory
getWorkspaceDecorator
in interface DecoratorFactory
session
- the session (decorator) instance used to create the
workspace decoratorworkspace
- the underlying workspace instance
DecoratorFactory.getWorkspaceDecorator(javax.jcr.Session, javax.jcr.Workspace)
public Lock getLockDecorator(Node node, Lock lock)
DecoratorFactory
getLockDecorator
in interface DecoratorFactory
node
- the node (decorator) instance to which the lock is boundlock
- the underlying lock instance
DecoratorFactory.getLockDecorator(Node, Lock)
public DecoratorFactory getChainedFactory()
public void setChainedFactory(DecoratorFactory factory)
factory
- The factory to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |