public class DefaultAmetysObjectFactory extends SimpleAmetysObjectFactory
Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider |
_ametysFactoryExtensionPoint, _manager, _nodetype, _repository, _resolver, _scheme
Constructor and Description |
---|
DefaultAmetysObjectFactory() |
Modifier and Type | Method and Description |
---|---|
DefaultAmetysObject |
getAmetysObject(Node node,
String parentPath)
Creates a
AmetysObject from a persistent JCR node. |
UserIdentity |
getCurrentUser()
Provides the current user.
|
protected Node |
getWorkspaceNode(SimpleAmetysObject object)
Returns the JCR node backing this
SimpleAmetysObject in the JCR workspace. |
void |
service(ServiceManager manager) |
_getResolver, configure, getAmetysObjectById, getAmetysObjectById, getNode, getNodetypes, getParent, getScheme, hasAmetysObjectForId
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private CurrentUserProvider _currentUserProvider
public DefaultAmetysObjectFactory()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class SimpleAmetysObjectFactory
ServiceException
public DefaultAmetysObject getAmetysObject(Node node, String parentPath) throws AmetysRepositoryException, RepositoryException
JCRAmetysObjectFactory
AmetysObject
from a persistent JCR node.getAmetysObject
in interface JCRAmetysObjectFactory<SimpleAmetysObject>
getAmetysObject
in class SimpleAmetysObjectFactory
node
- the JCR node to use.parentPath
- the parent Path in the Ametys hierarchy,
may be null
if not known yet.AmetysRepositoryException
- if an error occurs.RepositoryException
- if a JCR error occurs.protected Node getWorkspaceNode(SimpleAmetysObject object)
SimpleAmetysObjectFactory
SimpleAmetysObject
in the JCR workspace. May be overridden to deal with e.g. versionninggetWorkspaceNode
in class SimpleAmetysObjectFactory
object
- a SimpleAmetysObject
.SimpleAmetysObject
.public UserIdentity getCurrentUser()