Class JCRSupport
java.lang.Object
org.apache.sling.servlets.post.impl.helper.JCRSupport
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckin(org.apache.sling.api.resource.Resource rsrc) voidcheckoutIfNecessary(org.apache.sling.api.resource.Resource rsrc, List<Modification> changes, VersioningConfiguration versioningConfiguration) getItem(org.apache.sling.api.resource.Resource rsrc) getNode(org.apache.sling.api.resource.Resource rsrc) getPropertyType(Object node, String name) booleanhasSession(org.apache.sling.api.resource.ResourceResolver resolver) isFileNodeType(org.apache.sling.api.resource.ResourceResolver resolver, String nodeType) booleanbooleanisNode(org.apache.sling.api.resource.Resource rsrc) booleanisNodeType(org.apache.sling.api.resource.Resource rsrc, String typeHint) booleanisPropertyMandatory(Object node, String name) booleanisPropertyMultiple(Object node, String name) booleanisPropertyProtectedOrNewAutoCreated(Object node, String name) booleanisVersionable(org.apache.sling.api.resource.Resource rsrc) booleanvoidvoidsetPrimaryNodeType(Object node, String type) voidsetTypedProperty(Object n, String name, String[] values, int type, boolean multiValued) storeAsReference(org.apache.sling.api.resource.Resource resource, Object node, String name, String[] values, int type, boolean multiValued) Stores property value(s) as reference(s).
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
JCRSupport
public JCRSupport()
-
-
Method Details
-
checkin
public boolean checkin(org.apache.sling.api.resource.Resource rsrc) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
checkoutIfNecessary
public void checkoutIfNecessary(org.apache.sling.api.resource.Resource rsrc, List<Modification> changes, VersioningConfiguration versioningConfiguration) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
isNode
public boolean isNode(org.apache.sling.api.resource.Resource rsrc) -
isVersionable
public boolean isVersionable(org.apache.sling.api.resource.Resource rsrc) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
isNodeType
-
isFileNodeType
-
isPropertyProtectedOrNewAutoCreated
public boolean isPropertyProtectedOrNewAutoCreated(Object node, String name) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
isPropertyMandatory
public boolean isPropertyMandatory(Object node, String name) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
isPropertyMultiple
public boolean isPropertyMultiple(Object node, String name) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
isNewNode
-
getPropertyType
public Integer getPropertyType(Object node, String name) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
hasSession
public boolean hasSession(org.apache.sling.api.resource.ResourceResolver resolver) -
storeAsReference
public Modification storeAsReference(org.apache.sling.api.resource.Resource resource, Object node, String name, String[] values, int type, boolean multiValued) throws org.apache.sling.api.resource.PersistenceException Stores property value(s) as reference(s). Will parse the reference(s) from the string value(s) in theRequestProperty.- Parameters:
resource- resourcenode- the nodename- the namevalues- the valuetype- the typemultiValued- if multiValued- Returns:
- true only if parsing was successful and the property was actually changed
- Throws:
org.apache.sling.api.resource.PersistenceException- if the operation cannot be executed
-
setTypedProperty
public void setTypedProperty(Object n, String name, String[] values, int type, boolean multiValued) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
getNode
-
getItem
-
setPrimaryNodeType
public void setPrimaryNodeType(Object node, String type) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
copy
public String copy(Object src, Object dstParent, String name) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
move
public void move(Object src, Object dstParent, String name) throws org.apache.sling.api.resource.PersistenceException - Throws:
org.apache.sling.api.resource.PersistenceException
-
jcrEnabled
public boolean jcrEnabled()
-