public abstract class OwObjectListView extends OwView implements OwPageableView, OwClientRefreshContext
Base class to all views that display object collections. Object collection view.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Class and Description |
---|---|
static class |
OwObjectListView.OwFilter
A map of filter settings.
|
static class |
OwObjectListView.OwFilterEntry
Single filter setting.
|
protected static class |
OwObjectListView.OwHtmlAlignmentMap
Static class to retrieve HTML alignment attributes out of
OwFieldColumnInfo alignment.
|
static class |
OwObjectListView.OwIcon
Helper class to determine how many icons exists in a given string.
|
static interface |
OwObjectListView.OwObjectListViewEventListner
Event listener interface for OwObjectCollectionView's.
|
static class |
OwObjectListView.OwPluginEntry
a single entry for a plugins with its original index
|
Modifier and Type | Field and Description |
---|---|
protected static OwObjectListView.OwHtmlAlignmentMap |
m_HtmlAlignments
singleton class to retrieve HTML alignment attributes out of OwFieldColumnInfo alignment
|
protected boolean |
m_isStickyFooterInUse
Deprecated.
|
protected OwPageSelectorComponent |
m_pageSelectorComponent
page selector component
|
protected Node |
m_pagingNode
the paging node
|
protected static String |
MULTISELECT_COMOBO_MENU_NAME
name of the combobox for multi select events
|
protected static String |
OBJECT_INDEX_KEY
query string key for the object list index to find the selected object upon onMimeOpenObject.
|
protected static String |
PLUG_INDEX_KEY
query string key for the plugin index.
|
protected static String |
QUERY_KEY_PAGE
query string key for the page index.
|
static String |
SELECT_DESELECT_NONCONSECUTIVE_OBJECTS_ACTION_ID |
protected static String |
SORT_PROPERTY_KEY
query string key for the sort property.
|
static int |
VIEW_MASK_INLINE_EDITING
view mask flag to control the display behavior
Enable inline editing of column data.
|
static int |
VIEW_MASK_INSTANCE_PLUGINS
view mask flag to control the display behavior
Enable plug-in invoke icons on each item row.
|
static int |
VIEW_MASK_MULTI_SELECTION
view mask flag to control the display behavior
Enable multi selection.
|
static int |
VIEW_MASK_NO_PAGE_BUTTONS
view mask flag to control the display behavior
Disable the paging buttons on the resultlist.
|
static int |
VIEW_MASK_SINGLE_SELECTION
view mask flag to control the display behavior
Enable single selection.
|
static int |
VIEW_MASK_USE_DOCUMENT_PLUGINS
view mask flag to control the display behavior
Display document plug-ins if enabled, otherwise disable document plug-ins in the result list.
|
static int |
VIEW_MASK_USE_SELECT_BUTTON
view mask flag to control the display behavior
Enables a select button on each resultlist row.
|
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
EMPTY_STRING
Constructor and Description |
---|
OwObjectListView()
construct a object list view
|
OwObjectListView(int iViewMask_p)
construct a object list view
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAjaxPersistenceService(Writer w_p,
String eventName_p)
Outputs JavaScript service end point (onAjax[eventName] callback method) for the
specified event on a given
Writer . |
void |
addViewMask(int iViewMask_p)
add a view property
|
protected void |
clearViewMask(int iViewMask_p)
clears a view property
|
void |
copy(OwObjectListView oldview_p)
Copy the contents and state of the given view.
|
static OwObjectListView.OwFilter |
createFilter(Collection filterprops_p,
OwFieldDefinitionProvider fieldDefinitionProvider_p,
String sResourceName_p,
String sID_p,
OwDocument doc_p)
Create a filter with a Collection of OwFieldDefinition for the properties to be filtered
and fieldDefinitionProvider for wildcard conversion
|
static OwObjectListView.OwFilter |
createFilter(Collection filterprops_p,
String sID_p,
OwDocument doc_p)
create a filter with a Collection of OwFieldDefinition for the properties to be filtered
|
static OwObjectListView.OwFilter |
createFilter(String sID_p)
create an empty filter
|
OwPageSelectorComponent |
createPageSelector()
Create the paging component, according with the configuration setting.
|
abstract Collection<? extends OwFieldColumnInfo> |
getColumnInfo()
get the list of column info to be used by this list view
|
protected List |
getContextMenuFunction()
Return a list of document function which
should be displayed in the context menu of current
view.
|
int |
getCount()
Get total number of items.
|
protected OwDocumentFunction |
getDocumentFunction(int globalPluginIndex_p)
Returning the document function which has the given plugin index, can
return null if plugin not found or plugin list is empty.
|
List |
getDocumentFunctionPluginList()
Return the current set document function list, which is used by
the view to display in context menu and plugin column.
|
protected OwObjectListView.OwObjectListViewEventListner |
getEventListner()
get the event listener
|
abstract OwFieldManager |
getFieldManager()
get the internal fieldmanager
|
OwObjectListView.OwFilter |
getFilter() |
static Collection |
getFilterOperators(OwFieldDefinition fielddef_p)
get a collection of possible filter operators for a given field
|
OwSearchNode |
getFilterSearch()
get the current filter search node to filter with
|
int |
getListViewID()
Unique list view ID getter.
Unique list view IDs are used as a discriminant in rendering multiple list view instances in one page. |
protected OwObject |
getObjectByIndex(int index)
Helper to retrieve an OwObject from index.
|
abstract OwIterable<OwObject> |
getObjectIterable() |
abstract OwObjectCollection |
getObjectList()
get the current object list
|
String |
getPageAbsolutEventURL(String aditionalParameters_p)
Get URL for a given page number
|
String |
getPageNextEventURL()
Get the next page URL.
|
String |
getPagePrevEventURL()
Get the previous page URL.
|
OwObject |
getParentObject()
get the parent object
|
List<OwObjectListView.OwPluginEntry> |
getPluginEntries()
This method returns a list of document plugins,
which should be displayed next to the document in the document function
column.
|
protected abstract OwClientRefreshContext |
getRefreshContext()
get an eventlistener with this view to receive notifications
|
abstract Collection<String> |
getRetrievalPropertyNames()
get a collection of property names that are needed to display the Objects in the list
i.e.
|
abstract OwSort |
getSort()
get the current selected sort instance
|
boolean |
hasPaging()
Check if the current view must show the paging component.
Will check first for VIEW_MASK_NO_PAGE_BUTTONS view mask,if not set calling isPagingEnabled() - use isPagingEnabled() to extend check functionality. |
protected boolean |
hasViewMask(int iViewMask_p)
check if a certain view property is enabled
|
protected void |
init()
init the view after the context is set.
|
boolean |
isEmptyPluginColumnRendered()
Flag to check if empty plugin columns should be rendered.
|
protected boolean |
isObjectSelectionPersisted(int objectIndex_p)
Persistence selection state query method.
|
protected boolean |
isObjectTypeSupportedByPlugin(OwDocumentFunction plugIn_p,
Set objectTypes_p)
Helper method to check if a document function plugin (plugIn_p) supports one type,
which is given by the list (objectTypes_p).
|
protected boolean |
isPagingEnabled()
Extended check for page selector functionality.
|
boolean |
isShowMaximized()
checks if the view is shown maximized
|
boolean |
isStickyFooterInUse()
Deprecated.
since 4.1.1.0 this method is no longer used and it will be soon removed.
|
protected void |
pageAbsolut(int iPage_p)
Move to the given zero based absolute page.
|
protected void |
persistAjaxTriggeredSelection(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
AJAX selection persistence request support method.
Subclasses should use this method on their AJAX selection persistence methods providing their current object collection. |
protected void |
persistAjaxTriggeredSelection(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
OwObjectCollection objects_p)
Deprecated.
since 4.2.0.0 use
persistAjaxTriggeredSelection(HttpServletRequest, HttpServletResponse) instead |
protected void |
persistObjectSelectionState(int iObjid_p,
boolean status_p)
Persist selection state for given object ID (number in list)
|
protected void |
renderContextMenu(Writer w_p,
Set occuredObjectTypes_p)
Default method to render the context menu.
|
protected void |
resetPersistedSelectionState()
Resets all previously persist selection states.
No object state will be persisted as selected. |
abstract void |
setColumnInfo(Collection<? extends OwFieldColumnInfo> columnInfo_p)
set the list of column info to be used by this list view
|
void |
setConfigNode(Node node_p)
optional use the default constructor and set a config node to configure the view with XML
This may override the settings in the ViewMaks, see setViewMask
|
void |
setCurrentPage(int iPage_p)
Public setter of current page.
The implementation relays on pageAbsolut(int) |
void |
setDocumentFunctionPluginList(List pluginList_p)
Set a
java.util.List of OwDocumentFunction to be used by this
list. |
void |
setEventListner(OwObjectListView.OwObjectListViewEventListner eventlister_p)
register an event listener with this view to receive notifications
|
abstract void |
setFieldManager(OwFieldManager fielmanager_p)
set the internal fieldmanager
in case you want a specific fieldmanager
|
void |
setFilter(OwObjectListView.OwFilter filter_p)
set the filter to be used
|
abstract void |
setObjectIterable(OwIterable<OwObject> iterable,
OwObject parentObject)
set a pageable interface for retrieval of items to display.
|
abstract void |
setObjectList(OwObjectCollection objectList_p,
OwObject parentObject_p)
set the list of objects to be displayed by this list view
|
protected void |
setParentObject(OwObject newParent_p) |
abstract void |
setRefreshContext(OwClientRefreshContext eventlistener_p)
register an event listener with this view to receive notifications
|
void |
setRenderEmptyPluginColumn(boolean renderEmptyColumn_p)
Set flag to enable/disable empty column rendering.
|
abstract void |
setSort(OwSort sort_p)
set / override current sort to given sort
|
void |
setStickyFooterInUse(boolean stickyFooterInUse_p)
Deprecated.
since 4.1.1.0 this method is no longer used and it will be soon removed.
|
void |
setViewMask(int iViewMask_p)
set the view properties
|
activate, addView, detach, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isRegion, isShowMinimized, isShowNormal, onActivate, onRender, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, updateExternalFormTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canPageNext, canPagePrev, getContext, getCurrentPage, getPageCount, onPageAbsolut, onPageNext, onPagePrev
getBreadcrumbPart, getTitle, isNamedRegion, isRegion, render, renderNamedRegion, renderRegion
onClientRefreshContextUpdate
public static final String SELECT_DESELECT_NONCONSECUTIVE_OBJECTS_ACTION_ID
protected static final OwObjectListView.OwHtmlAlignmentMap m_HtmlAlignments
protected static final String MULTISELECT_COMOBO_MENU_NAME
protected static final String OBJECT_INDEX_KEY
protected static final String PLUG_INDEX_KEY
protected static final String QUERY_KEY_PAGE
protected static final String SORT_PROPERTY_KEY
public static final int VIEW_MASK_INLINE_EDITING
public static final int VIEW_MASK_INSTANCE_PLUGINS
public static final int VIEW_MASK_MULTI_SELECTION
public static final int VIEW_MASK_NO_PAGE_BUTTONS
public static final int VIEW_MASK_SINGLE_SELECTION
public static final int VIEW_MASK_USE_DOCUMENT_PLUGINS
public static final int VIEW_MASK_USE_SELECT_BUTTON
@Deprecated protected boolean m_isStickyFooterInUse
protected OwPageSelectorComponent m_pageSelectorComponent
protected Node m_pagingNode
public OwObjectListView()
public OwObjectListView(int iViewMask_p)
iViewMask_p
- int combination of VIEW_MASK_... defined flagsprotected void addAjaxPersistenceService(Writer w_p, String eventName_p) throws Exception
Writer
.w_p
- eventName_p
- the AJAX event nameException
public void addViewMask(int iViewMask_p)
iViewMask_p
- int combination of VIEW_MASK_... defined flags to add toprotected void clearViewMask(int iViewMask_p)
iViewMask_p
- int to clearpublic void copy(OwObjectListView oldview_p) throws Exception
oldview_p
- OwObjectListViewException
public OwPageSelectorComponent createPageSelector() throws Exception
createPageSelector
in interface OwPageableView
Exception
public abstract Collection<? extends OwFieldColumnInfo> getColumnInfo()
protected List getContextMenuFunction()
This method filters the document functions from getDocumentFunctionPluginList()
,
checking the value of <ContextMenu>[true|false]</ContextMenu>
.
Also this method check if a document function need a parent object, if getParentObject()
is null
the document function is skipped.
public int getCount()
OwPageableView
getCount
in interface OwPageableView
protected OwDocumentFunction getDocumentFunction(int globalPluginIndex_p)
globalPluginIndex_p
- int representing the unique plugin index, attention not the IDpublic List getDocumentFunctionPluginList()
java.util.List
of OwDocumentFunction
protected OwObjectListView.OwObjectListViewEventListner getEventListner()
public abstract OwFieldManager getFieldManager()
public OwObjectListView.OwFilter getFilter()
public OwSearchNode getFilterSearch() throws Exception
Exception
public int getListViewID()
m_listViewID
is 0) and this list does not have an OwObjectListView
parent a new unique ID is generated.OwObjectListView
a combined list
aggregation is assumed and the ID of the parent becomes the ID of this list.OwObjectListViewCombined
protected OwObject getObjectByIndex(int index)
index
- integer (zero based)public abstract OwIterable<OwObject> getObjectIterable()
public abstract OwObjectCollection getObjectList()
public String getPageAbsolutEventURL(String aditionalParameters_p)
OwPageableView
getPageAbsolutEventURL
in interface OwPageableView
aditionalParameters_p
- - query parameters in a http linkOwPageableView.getPageAbsolutEventURL(java.lang.String)
public String getPageNextEventURL()
OwPageableView
getPageNextEventURL
in interface OwPageableView
OwPageableView.getPageNextEventURL()
public String getPagePrevEventURL()
OwPageableView
getPagePrevEventURL
in interface OwPageableView
OwPageableView.getPagePrevEventURL()
public OwObject getParentObject()
public List<OwObjectListView.OwPluginEntry> getPluginEntries()
This method filters from the list of document functions (getDocumentFunctionPluginList()
),
all functions where <ObjectInstance> is false.
Also this method check if a document function need a parent object, if getParentObject()
is null
the document function is skipped.
VIEW_MASK_INSTANCE_PLUGINS
not setprotected abstract OwClientRefreshContext getRefreshContext()
public abstract Collection<String> getRetrievalPropertyNames() throws Exception
Exception
public abstract OwSort getSort()
public final boolean hasPaging()
VIEW_MASK_NO_PAGE_BUTTONS
view mask,isPagingEnabled()
- use isPagingEnabled()
to extend check functionality.hasPaging
in interface OwPageableView
true
if the current view must show the paging component.OwPageableView.hasPaging()
protected boolean hasViewMask(int iViewMask_p)
iViewMask_p
- int as defined with VIEW_MASK_...protected void init() throws Exception
public boolean isEmptyPluginColumnRendered()
protected boolean isObjectSelectionPersisted(int objectIndex_p)
objectIndex_p
- object indextrue
if the object with the given index has its selection state persisted as selectedfalse
otherwiseprotected boolean isObjectTypeSupportedByPlugin(OwDocumentFunction plugIn_p, Set objectTypes_p)
plugIn_p
- OwDocumentFunction which should be checkedobjectTypes_p
- Set of java.lang.Integer which represents OwObjectReference.OBJECT_TYPE_... constantstrue
if one of the types is supportedprotected boolean isPagingEnabled()
hasPaging()
public boolean isShowMaximized()
OwView
isShowMaximized
in class OwView
@Deprecated public boolean isStickyFooterInUse()
protected void pageAbsolut(int iPage_p)
iPage_p
- int zero based page number@Deprecated protected void persistAjaxTriggeredSelection(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p, OwObjectCollection objects_p) throws Exception
persistAjaxTriggeredSelection(HttpServletRequest, HttpServletResponse)
insteadrequest_p
- response_p
- objects_p
- the collection of objects this list view handlesException
protected void persistAjaxTriggeredSelection(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- response_p
- Exception
protected void persistObjectSelectionState(int iObjid_p, boolean status_p)
iObjid_p
- - the object ID (index in list)status_p
- - the status of the object (true
means selected)protected void renderContextMenu(Writer w_p, Set occuredObjectTypes_p) throws Exception
w_p
- Writer object to write the HTMLoccuredObjectTypes_p
- Set of java.lang.Integer which representing OwObjectReference.OBJECT_TYPE_... constantsException
protected void resetPersistedSelectionState()
public abstract void setColumnInfo(Collection<? extends OwFieldColumnInfo> columnInfo_p)
columnInfo_p
- List of OwFieldColumnInfo'spublic void setConfigNode(Node node_p) throws Exception
node_p
- XML node with configuration informationException
public final void setCurrentPage(int iPage_p)
pageAbsolut(int)
iPage_p
- int zero based page numberpublic void setDocumentFunctionPluginList(List pluginList_p)
java.util.List
of OwDocumentFunction
to be used by this
list. This list overrides the default set of document functions that are retrieved from
the context during init.pluginList_p
- the java.util.List
of OwDocumentFunction
to be used by this list. Must not be null
.public void setEventListner(OwObjectListView.OwObjectListViewEventListner eventlister_p)
eventlister_p
- OwObjectListCollectionEventListner interfacepublic abstract void setFieldManager(OwFieldManager fielmanager_p)
public void setFilter(OwObjectListView.OwFilter filter_p)
filter_p
- an OwObjectListView.OwFilter
public abstract void setObjectIterable(OwIterable<OwObject> iterable, OwObject parentObject) throws Exception
iterable
- OwIterable returning OwObjectsparentObject
- OwObjectException
public abstract void setObjectList(OwObjectCollection objectList_p, OwObject parentObject_p) throws Exception
objectList_p
- OwObjectCollectionparentObject_p
- OwObject parent which created the object list, can be null if no parent is specifiedException
protected void setParentObject(OwObject newParent_p)
public abstract void setRefreshContext(OwClientRefreshContext eventlistener_p)
eventlistener_p
- OwClientRefreshContext interfacepublic void setRenderEmptyPluginColumn(boolean renderEmptyColumn_p)
renderEmptyColumn_p
- boolean flagpublic abstract void setSort(OwSort sort_p)
sort_p
- new OwSort@Deprecated public void setStickyFooterInUse(boolean stickyFooterInUse_p)
stickyFooterInUse_p
- - the new value.public void setViewMask(int iViewMask_p)
iViewMask_p
- int combination of VIEW_MASK_... defined flagspublic static OwObjectListView.OwFilter createFilter(Collection filterprops_p, OwFieldDefinitionProvider fieldDefinitionProvider_p, String sResourceName_p, String sID_p, OwDocument doc_p) throws Exception
filterprops_p
- Collection of OwFieldDefinition for the properties to be filtered, may be nullfieldDefinitionProvider_p
- OwFieldDefinitionProvider to resolve wildcardssResourceName_p
- for fieldDefinitionProvider_psID_p
- String ID of the filter, if you keep a collection of several filters for one list, otherwise empty stringdoc_p
- OwDocument can be null if no persistence should be usedException
public static OwObjectListView.OwFilter createFilter(Collection filterprops_p, String sID_p, OwDocument doc_p) throws Exception
filterprops_p
- Collection of OwFieldDefinition for the properties to be filtered, can be null to create an empty filtersID_p
- String ID of the filter, if you keep a collection of several filters for one list, otherwise empty stringdoc_p
- OwDocument can be null if no persistence should be usedException
public static OwObjectListView.OwFilter createFilter(String sID_p) throws Exception
sID_p
- String ID of the filter, if you keep a collection of several filters for one list, otherwise empty stringException
public static Collection getFilterOperators(OwFieldDefinition fielddef_p) throws Exception
fielddef_p
- OwFieldDefinitionException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.