Class AbstractUMObject<T>
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.AbstractResource<ResourceTypeImpl>
-
- org.nuxeo.ecm.webengine.model.impl.DefaultObject
-
- org.nuxeo.ecm.restapi.server.jaxrs.usermanager.AbstractUMObject<T>
-
- Direct Known Subclasses:
GroupObject
,UserObject
public abstract class AbstractUMObject<T> extends DefaultObject
Abstract WebObject class that handle retrieve, deletion and update ofNuxeoPrincipal
orNuxeoGroup
.- Since:
- 5.7.3
-
-
Field Summary
Fields Modifier and Type Field Description protected T
currentArtifact
protected UserManager
um
-
Constructor Summary
Constructors Constructor Description AbstractUMObject()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
checkUpdateGuardPreconditions()
protected void
checkUpdateGuardPreconditions(T artifact)
protected abstract void
deleteArtifact()
Deletes the current artifact in the underlying persistence system.javax.ws.rs.core.Response
doDeleteArtifact()
T
doGetArtifact()
T
doUpdateArtifact(T artifact)
protected void
initialize(Object... args)
protected boolean
isAPowerUserEditableArtifact()
Deprecated.since 11.1, useisAPowerUserEditableArtifact(Object)
instead.protected boolean
isAPowerUserEditableArtifact(T artifact)
Check the given artifact is editable by a power user.protected abstract T
updateArtifact(T artifact)
Updates the current artifact by the one given in parameters in the underlying persistence system.-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.DefaultObject
disptachAdapter, isAdapter
-
Methods inherited from class org.nuxeo.ecm.webengine.model.impl.AbstractResource
checkGuard, dispose, getActiveAdapter, getAdapter, getContext, getFacets, getLinks, getModule, getName, getNext, getNextSegment, getPath, getPrevious, getTemplate, getTrailingPath, getType, getURL, getView, hasFacet, initialize, isInstanceOf, isRoot, newAdapter, newObject, redirect, setNext, setPrevious, setRoot, toString
-
-
-
-
Field Detail
-
currentArtifact
protected T currentArtifact
-
um
protected UserManager um
-
-
Method Detail
-
initialize
protected void initialize(Object... args)
- Overrides:
initialize
in classAbstractResource<ResourceTypeImpl>
-
doGetArtifact
public T doGetArtifact()
-
doDeleteArtifact
public javax.ws.rs.core.Response doDeleteArtifact()
-
checkUpdateGuardPreconditions
protected void checkUpdateGuardPreconditions()
-
checkUpdateGuardPreconditions
protected void checkUpdateGuardPreconditions(T artifact)
-
isAPowerUserEditableArtifact
@Deprecated protected boolean isAPowerUserEditableArtifact()
Deprecated.since 11.1, useisAPowerUserEditableArtifact(Object)
instead.Check that the current artifact is editable by a power user. Basically this means not an admin user or not an admin group.
-
isAPowerUserEditableArtifact
protected boolean isAPowerUserEditableArtifact(T artifact)
Check the given artifact is editable by a power user. Basically this means not an admin user or not an admin group.
-
updateArtifact
protected abstract T updateArtifact(T artifact)
Updates the current artifact by the one given in parameters in the underlying persistence system.- Parameters:
artifact
- the artifact that has been retrieved from request.- Returns:
- the updated artifact.
-
deleteArtifact
protected abstract void deleteArtifact()
Deletes the current artifact in the underlying persistence system.
-
-