Class DefaultAmetysObjectFactory
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
-
- org.ametys.plugins.repository.jcr.DefaultAmetysObjectFactory
-
- All Implemented Interfaces:
AmetysObjectFactory<SimpleAmetysObject>
,JCRAmetysObjectFactory<SimpleAmetysObject>
,Component
,Configurable
,LogEnabled
,Serviceable
- Direct Known Subclasses:
CartFactory
,ContentFactory
,DefaultLockableAmetysObjectFactory
,JCRCalendarResourceFactory
,JCRPostFactory
,JCRProjectMemberFactory
,JCRResourceFactory
,JCRTaskFactory
,QueryFactory
public class DefaultAmetysObjectFactory extends SimpleAmetysObjectFactory
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
_ametysFactoryExtensionPoint, _manager, _nodetype, _repository, _resolver, _scheme
-
-
Constructor Summary
Constructors Constructor Description DefaultAmetysObjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultAmetysObject
getAmetysObject(Node node, String parentPath)
Creates aAmetysObject
from a persistent JCR node.UserIdentity
getCurrentUser()
Provides the current user.UnversionedDataTypeExtensionPoint
getUnversionedDataTypeExtensionPoint()
Retrieves the extension point with available data types for unversioned dataprotected Node
getWorkspaceNode(SimpleAmetysObject object)
Returns the JCR node backing thisSimpleAmetysObject
in the JCR workspace.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
configure, getAmetysObjectById, getAmetysObjectById, getNode, getNodetypes, getParent, getScheme, hasAmetysObjectForId
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
DefaultAmetysObjectFactory
public DefaultAmetysObjectFactory()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSimpleAmetysObjectFactory
- Throws:
ServiceException
-
getAmetysObject
public DefaultAmetysObject getAmetysObject(Node node, String parentPath) throws AmetysRepositoryException, RepositoryException
Description copied from interface:JCRAmetysObjectFactory
Creates aAmetysObject
from a persistent JCR node.- Specified by:
getAmetysObject
in interfaceJCRAmetysObjectFactory<SimpleAmetysObject>
- Overrides:
getAmetysObject
in classSimpleAmetysObjectFactory
- 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.RepositoryException
- if a JCR error occurs.
-
getWorkspaceNode
protected Node getWorkspaceNode(SimpleAmetysObject object)
Description copied from class:SimpleAmetysObjectFactory
Returns the JCR node backing thisSimpleAmetysObject
in the JCR workspace. May be overridden to deal with e.g. versionning- Overrides:
getWorkspaceNode
in classSimpleAmetysObjectFactory
- Parameters:
object
- aSimpleAmetysObject
.- Returns:
- the JCR node backing this
SimpleAmetysObject
.
-
getCurrentUser
public UserIdentity getCurrentUser()
Provides the current user.- Returns:
- the login of the current user.
-
getUnversionedDataTypeExtensionPoint
public UnversionedDataTypeExtensionPoint getUnversionedDataTypeExtensionPoint()
Retrieves the extension point with available data types for unversioned data- Returns:
- the extension point with available data types for unversioned data
-
-