public class DefaultDocumentView extends Object implements DocumentView
Note that this class cannot be used with contexts for which the RenderingContext#getDocument()
method is
returning null.
This implementation ensure that the context argument is never used so it can be used outside the scope of a rendering context to get a view over the document.
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultDocumentView.Field |
Constructor and Description |
---|
DefaultDocumentView() |
DefaultDocumentView(Map<String,DefaultDocumentView.Field> fields) |
Modifier and Type | Method and Description |
---|---|
void |
addField(DefaultDocumentView.Field field) |
void |
addFields(Collection<DefaultDocumentView.Field> fields) |
Object |
get(DocumentModel doc,
String name) |
DefaultDocumentView.Field |
getField(String name) |
Map<String,DefaultDocumentView.Field> |
getFields() |
protected void |
initialize() |
boolean |
isEmpty() |
Collection<String> |
keys(DocumentModel doc) |
void |
removeField(String name) |
int |
size(DocumentModel doc) |
protected final Map<String,DefaultDocumentView.Field> fields
protected static final DefaultDocumentView.Field SESSION
protected static final DefaultDocumentView.Field ID
protected static final DefaultDocumentView.Field NAME
protected static final DefaultDocumentView.Field PATH
protected static final DefaultDocumentView.Field TYPE
protected static final DefaultDocumentView.Field SCHEMAS
protected static final DefaultDocumentView.Field FACETS
protected static final DefaultDocumentView.Field STATE
protected static final DefaultDocumentView.Field LOCKED
protected static final DefaultDocumentView.Field LIFE_CYCLE_STATE
protected static final DefaultDocumentView.Field LIFE_CYCLE_POLICY
protected static final DefaultDocumentView.Field ALLOWED_STATE_TRANSITIONS
protected static final DefaultDocumentView.Field IS_FOLDER
protected static final DefaultDocumentView.Field TITLE
protected static final DefaultDocumentView.Field AUTHOR
protected static final DefaultDocumentView.Field CREATED
protected static final DefaultDocumentView.Field MODIFIED
protected static final DefaultDocumentView.Field CONTENT
protected static final DefaultDocumentView.Field SID
protected static final DefaultDocumentView.Field REPOSITORY
protected static final DefaultDocumentView.Field PARENT
protected static final DefaultDocumentView.Field CHILDREN
protected static final DefaultDocumentView.Field REF
protected static final DefaultDocumentView.Field VERSIONS
protected static final DefaultDocumentView.Field PROXIES
protected static final DefaultDocumentView.Field VERSION_LABEL
protected static final DefaultDocumentView.Field SOURCE_ID
public static final DefaultDocumentView DEFAULT
public DefaultDocumentView()
public DefaultDocumentView(Map<String,DefaultDocumentView.Field> fields)
protected void initialize()
public final void addField(DefaultDocumentView.Field field)
public final void addFields(Collection<DefaultDocumentView.Field> fields)
public final void removeField(String name)
public DefaultDocumentView.Field getField(String name)
public Object get(DocumentModel doc, String name) throws PropertyException
get
in interface DocumentView
PropertyException
public Collection<String> keys(DocumentModel doc)
keys
in interface DocumentView
public Map<String,DefaultDocumentView.Field> getFields()
public boolean isEmpty()
public int size(DocumentModel doc)
Copyright © 2016 Nuxeo SA. All rights reserved.