|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.ui.web.tag.fn.DocumentModelFunctions
public final class DocumentModelFunctions
Document model functions.
Field Summary |
---|
Method Summary | |
---|---|
static java.lang.String |
bigFileUrl(DocumentModel doc,
java.lang.String blobPropertyName,
java.lang.String filename)
|
static java.lang.String |
bigIconExpandedPath(DocumentModel document)
|
static java.lang.String |
bigIconPath(DocumentModel document)
|
static boolean |
canModify(DocumentModel document)
Returns true if document can be modified. |
static java.lang.String |
complexFileUrl(java.lang.String patternName,
DocumentModel doc,
int index,
java.lang.String filename)
Convenient method to get the REST URL of a blob inside the Files schema. |
static java.lang.String |
complexFileUrl(java.lang.String patternName,
DocumentModel doc,
java.lang.String listElement,
int index,
java.lang.String blobPropertyName,
java.lang.String filename)
Get the REST URL for a blob inside a list of complex type. |
static java.lang.String |
complexLiveEditUrl(DocumentModel doc,
java.lang.String listPropertyName,
int index,
java.lang.String blobPropertyName,
java.lang.String filenamePropertyName)
Build the nxedit URL for the "edit existing document" use case |
static java.lang.Object |
defaultValue(java.lang.String propertyName)
Returns the default value for given property name. |
static java.lang.Object |
defaultValue(java.lang.String schemaName,
java.lang.String fieldName)
Deprecated. use defaultValue(propertyName) instead |
static java.lang.String |
documentUrl(DocumentModel doc)
|
static java.lang.String |
documentUrl(DocumentModel doc,
javax.servlet.http.HttpServletRequest req)
|
static java.lang.String |
documentUrl(java.lang.String patternName,
DocumentModel doc,
java.lang.String viewId,
java.util.Map<java.lang.String,java.lang.String> parameters,
boolean newConversation)
|
static java.lang.String |
documentUrl(java.lang.String patternName,
DocumentModel doc,
java.lang.String viewId,
java.util.Map<java.lang.String,java.lang.String> parameters,
boolean newConversation,
javax.servlet.http.HttpServletRequest req)
|
static java.lang.String |
fileDescription(DocumentModel document,
java.lang.String blobPropertyName,
java.lang.String filePropertyName,
java.lang.String filename)
|
static java.lang.String |
fileIconPath(Blob blob)
|
static java.lang.String |
fileUrl(java.lang.String patternName,
DocumentModel doc,
java.lang.String blobPropertyName,
java.lang.String filename)
|
static java.lang.String |
getLabelFromId(java.lang.String directoryName,
java.lang.String id)
Deprecated. use DirectoryFunctions.getDirectoryEntry(String, String) |
static java.lang.String |
getPropertyPath(java.lang.String listPropertyName,
int index,
java.lang.String subPropertyName)
|
static boolean |
hasPermission(DocumentModel document,
java.lang.String permission)
|
static java.lang.String |
iconExpandedPath(DocumentModel document)
|
static java.lang.String |
iconPath(DocumentModel document)
|
static java.lang.String |
liveCreateFromTemplateUrl(DocumentModel template)
Build the nxedit URL for the "create new document from template" use case with "File" doc type and "file" schema |
static java.lang.String |
liveCreateFromTemplateUrl(DocumentModel template,
java.lang.String templateSchemaName,
java.lang.String templateBlobFieldName,
java.lang.String docType,
java.lang.String schemaName,
java.lang.String blobFieldName,
java.lang.String filenameFieldName)
Build the nxedit URL for the "create new document from template" use case |
static java.lang.String |
liveCreateUrl(java.lang.String mimetype)
Build the nxedit URL for the "create new document" use case with a document using the file:content field as Blob holder |
static java.lang.String |
liveCreateUrl(java.lang.String mimetype,
java.lang.String docType,
java.lang.String schemaName,
java.lang.String blobFieldName,
java.lang.String filenameFieldName)
Build the nxedit URL for the "create new document" use case |
static java.lang.String |
liveEditUrl(DocumentModel doc)
Build the nxedit URL for the "edit existing document" use case for a document using the file:content field as Blob holder |
static java.lang.String |
liveEditUrl(DocumentModel doc,
java.lang.String schemaName,
java.lang.String blobFieldName,
java.lang.String filenameFieldName)
Build the nxedit URL for the "edit existing document" use case |
static java.lang.String |
titleOrId(DocumentModel document)
|
static TypeInfo |
typeInfo(DocumentModel document)
|
static java.lang.String |
typeLabel(DocumentModel document)
|
static java.lang.String |
typeView(DocumentModel document,
java.lang.String viewId)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TypeInfo typeInfo(DocumentModel document)
public static java.lang.String typeLabel(DocumentModel document)
public static java.lang.String typeView(DocumentModel document, java.lang.String viewId)
public static java.lang.String iconPath(DocumentModel document)
public static java.lang.String iconExpandedPath(DocumentModel document)
public static java.lang.String bigIconPath(DocumentModel document)
public static java.lang.String bigIconExpandedPath(DocumentModel document)
public static java.lang.String fileIconPath(Blob blob)
public static java.lang.String titleOrId(DocumentModel document)
public static boolean hasPermission(DocumentModel document, java.lang.String permission) throws ClientException
ClientException
public static boolean canModify(DocumentModel document) throws ClientException
A document can be modified if current user has 'Write' permission on it and document is mutable (no archived version).
document
-
ClientException
@Deprecated public static java.lang.Object defaultValue(java.lang.String schemaName, java.lang.String fieldName) throws java.lang.Exception
schemaName
- the schema namefieldName
- the field name
java.lang.Exception
public static java.lang.Object defaultValue(java.lang.String propertyName) throws java.lang.Exception
propertyName
- as xpath
java.lang.Exception
public static java.lang.String fileUrl(java.lang.String patternName, DocumentModel doc, java.lang.String blobPropertyName, java.lang.String filename)
public static java.lang.String bigFileUrl(DocumentModel doc, java.lang.String blobPropertyName, java.lang.String filename)
public static java.lang.String fileDescription(DocumentModel document, java.lang.String blobPropertyName, java.lang.String filePropertyName, java.lang.String filename)
public static java.lang.String complexFileUrl(java.lang.String patternName, DocumentModel doc, int index, java.lang.String filename)
Files
schema.
patternName
- doc
- The document model.index
- index of the element containing the blob.
index
starts at 0.filename
- The filename of the blob.
null
if an error
occurred.public static java.lang.String complexFileUrl(java.lang.String patternName, DocumentModel doc, java.lang.String listElement, int index, java.lang.String blobPropertyName, java.lang.String filename)
http://localhost/nuxeo/nxfile/server/docId/files:files%5B0%5D/file/image.png
for the blob property 'file' of the first element inside the
'files:files' list.
patternName
- doc
- The document model.listElement
- Element containing a list of complex type.index
- Index of the element containing the blob inside the list.
index
starts at 0.blobPropertyName
- The property containing the blob.filename
- Filename of the blob.
null
if an error
occurred.public static java.lang.String documentUrl(DocumentModel doc, javax.servlet.http.HttpServletRequest req)
public static java.lang.String documentUrl(DocumentModel doc)
public static java.lang.String documentUrl(java.lang.String patternName, DocumentModel doc, java.lang.String viewId, java.util.Map<java.lang.String,java.lang.String> parameters, boolean newConversation)
public static java.lang.String documentUrl(java.lang.String patternName, DocumentModel doc, java.lang.String viewId, java.util.Map<java.lang.String,java.lang.String> parameters, boolean newConversation, javax.servlet.http.HttpServletRequest req)
public static java.lang.String liveEditUrl(DocumentModel doc) throws ClientException
ClientException
- if the URL encoding failspublic static java.lang.String liveEditUrl(DocumentModel doc, java.lang.String schemaName, java.lang.String blobFieldName, java.lang.String filenameFieldName) throws ClientException
ClientException
- if the URL encoding failspublic static java.lang.String complexLiveEditUrl(DocumentModel doc, java.lang.String listPropertyName, int index, java.lang.String blobPropertyName, java.lang.String filenamePropertyName) throws ClientException
ClientException
- if the URL encoding failspublic static java.lang.String liveCreateUrl(java.lang.String mimetype) throws ClientException
mimetype
- the mime type of the newly created document
ClientException
- if the URL encoding failspublic static java.lang.String liveCreateUrl(java.lang.String mimetype, java.lang.String docType, java.lang.String schemaName, java.lang.String blobFieldName, java.lang.String filenameFieldName) throws ClientException
mimetype
- the mime type of the newly created documentdocType
- the document type of the document to createschemaName
- the schema of the blob to hold the new attachmentblobFieldName
- the field name of the blob to hold the new
attachmentfilenameFieldName
- the field name of the filename of the new
attachment
ClientException
- if the URL encoding failspublic static java.lang.String liveCreateFromTemplateUrl(DocumentModel template) throws ClientException
template
- the document holding the blob to be used as template
ClientException
- if the URL encoding failspublic static java.lang.String liveCreateFromTemplateUrl(DocumentModel template, java.lang.String templateSchemaName, java.lang.String templateBlobFieldName, java.lang.String docType, java.lang.String schemaName, java.lang.String blobFieldName, java.lang.String filenameFieldName) throws ClientException
template
- the document holding the blob to be used as templatetemplateSchemaName
- the schema of the blob holding the templatetemplateBlobFieldName
- the field name of the blob holding the
templatedocType
- the document type of the new document to createschemaName
- the schema of the new blob to be saved as attachmentblobFieldName
- the field name of the new blob to be saved as
attachmentfilenameFieldName
- the field name of the filename of the
attachment
ClientException
- if the URL encoding fails@Deprecated public static java.lang.String getLabelFromId(java.lang.String directoryName, java.lang.String id) throws DirectoryException
DirectoryFunctions.getDirectoryEntry(String, String)
directoryName
- the directory nameid
- the label id
DirectoryException
public static java.lang.String getPropertyPath(java.lang.String listPropertyName, int index, java.lang.String subPropertyName)
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |