Class JCRSupport
java.lang.Object
org.apache.sling.servlets.post.impl.helper.JCRSupport
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidcheckoutIfNecessary(Resource rsrc, List<Modification> changes, VersioningConfiguration versioningConfiguration) getPropertyType(Object node, String name) booleanhasSession(ResourceResolver resolver) isFileNodeType(ResourceResolver resolver, String nodeType) booleanbooleanbooleanisNodeType(Resource rsrc, String typeHint) booleanisPropertyMandatory(Object node, String name) booleanisPropertyMultiple(Object node, String name) booleanisPropertyProtectedOrNewAutoCreated(Object node, String name) booleanisVersionable(Resource rsrc) booleanvoidvoidsetPrimaryNodeType(Object node, String type) voidsetTypedProperty(Object n, String name, String[] values, int type, boolean multiValued) storeAsReference(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
- Throws:
PersistenceException
-
checkoutIfNecessary
public void checkoutIfNecessary(Resource rsrc, List<Modification> changes, VersioningConfiguration versioningConfiguration) throws PersistenceException - Throws:
PersistenceException
-
isNode
-
isVersionable
- Throws:
PersistenceException
-
isNodeType
-
isFileNodeType
-
isPropertyProtectedOrNewAutoCreated
public boolean isPropertyProtectedOrNewAutoCreated(Object node, String name) throws PersistenceException - Throws:
PersistenceException
-
isPropertyMandatory
- Throws:
PersistenceException
-
isPropertyMultiple
- Throws:
PersistenceException
-
isNewNode
-
getPropertyType
- Throws:
PersistenceException
-
hasSession
-
storeAsReference
public Modification storeAsReference(Resource resource, Object node, String name, String[] values, int type, boolean multiValued) throws 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:
PersistenceException- if the operation cannot be executed
-
setTypedProperty
public void setTypedProperty(Object n, String name, String[] values, int type, boolean multiValued) throws PersistenceException - Throws:
PersistenceException
-
getNode
-
getItem
-
setPrimaryNodeType
- Throws:
PersistenceException
-
copy
- Throws:
PersistenceException
-
move
- Throws:
PersistenceException
-
jcrEnabled
public boolean jcrEnabled()
-