Class DefaultLinkFactory
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
-
- org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObjectFactory
-
- org.ametys.plugins.linkdirectory.repository.DefaultLinkFactory
-
- All Implemented Interfaces:
AmetysObjectFactory<SimpleAmetysObject>
,JCRAmetysObjectFactory<SimpleAmetysObject>
,Component
,Configurable
,LogEnabled
,Serviceable
public class DefaultLinkFactory extends DefaultTraversableAmetysObjectFactory
Factory which createsLink
objects, which represent a link entry in the directory.
-
-
Field Summary
Fields Modifier and Type Field Description static String
LINK_NODE_TYPE
The link node type.static String
LINK_ROOT_NODE_TYPE
The link container node type.-
Fields inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
_ametysFactoryExtensionPoint, _manager, _nodetype, _repository, _resolver, _scheme
-
-
Constructor Summary
Constructors Constructor Description DefaultLinkFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultLink
getAmetysObject(Node node, String parentPath)
Creates aAmetysObject
from a persistent JCR node.LinkDataTypeExtensionPoint
getLinkDataTypeExtensionPoint()
Returns the extension point holding allRepositoryElementType
classes for links.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObjectFactory
createChild, getChild, getChildren, hasChild
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
configure, getAmetysObjectById, getAmetysObjectById, getNode, getNodetypes, getParent, getScheme, getWorkspaceNode, hasAmetysObjectForId
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
LINK_ROOT_NODE_TYPE
public static final String LINK_ROOT_NODE_TYPE
The link container node type.- See Also:
- Constant Field Values
-
LINK_NODE_TYPE
public static final String LINK_NODE_TYPE
The link node type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultLinkFactory
public DefaultLinkFactory()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSimpleAmetysObjectFactory
- Throws:
ServiceException
-
getAmetysObject
public DefaultLink getAmetysObject(Node node, String parentPath) throws AmetysRepositoryException
Description copied from interface:JCRAmetysObjectFactory
Creates aAmetysObject
from a persistent JCR node.- Specified by:
getAmetysObject
in interfaceJCRAmetysObjectFactory<SimpleAmetysObject>
- Overrides:
getAmetysObject
in classDefaultTraversableAmetysObjectFactory
- Parameters:
node
- the JCR node to use.parentPath
- the parent Path in the Ametys hierarchy, may benull
if not known yet.- Returns:
- the object.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLinkDataTypeExtensionPoint
public LinkDataTypeExtensionPoint getLinkDataTypeExtensionPoint()
Returns the extension point holding allRepositoryElementType
classes for links.- Returns:
- the extension point holding all
RepositoryElementType
classes for links.
-
-