|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.automation.core.util.DocumentHelper
public class DocumentHelper
Method Summary | |
---|---|
static void |
addBlob(Property p,
Blob blob)
Given a document property, updates its value with the given blob. |
static HashMap<String,Serializable> |
createBlobHolderMap(Blob blob)
|
static String[] |
readStringList(String value)
Read an encoded string list as a comma separated list. |
static Object |
readStringList(String value,
SimpleType type)
Read an encoded string list as a comma separated list. |
static void |
removeProperty(DocumentModel doc,
String xpath)
Removes a property from a document given the xpath. |
static DocumentModel |
saveDocument(CoreSession session,
DocumentModel doc)
Saves the document and clear context data to avoid incrementing version in next operations if not needed. |
static void |
setProperties(CoreSession session,
DocumentModel doc,
Map<String,String> values)
Sets the properties given as a map of xpath:value to the given document. |
static void |
setProperty(CoreSession session,
DocumentModel doc,
String key,
String value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DocumentModel saveDocument(CoreSession session, DocumentModel doc) throws ClientException
ClientException
public static void removeProperty(DocumentModel doc, String xpath) throws ClientException
ClientException
public static void addBlob(Property p, Blob blob) throws PropertyException
PropertyException
public static HashMap<String,Serializable> createBlobHolderMap(Blob blob)
public static void setProperties(CoreSession session, DocumentModel doc, Map<String,String> values) throws Exception
Exception
public static void setProperty(CoreSession session, DocumentModel doc, String key, String value) throws Exception
Exception
public static Object readStringList(String value, SimpleType type)
StringType.ID
then array elements will be converted to the actual type.
value
- type
-
public static String[] readStringList(String value)
value
-
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |