|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.workplace.list.A_CmsListResourceCollector
public abstract class A_CmsListResourceCollector
Collector to provide CmsResource objects for a explorer List.
| Field Summary | |
|---|---|
protected java.lang.String |
m_collectorParameter
The collector parameter. |
protected java.util.Map<java.lang.String,CmsListItem> |
m_liCache
List item cache. |
protected java.util.Map<java.lang.String,CmsResource> |
m_resCache
Resource cache. |
protected java.util.List<CmsResource> |
m_resources
Cache for resource list result. |
static java.lang.String |
VFS_PATH_NONE
VFS path to use for a dummy resource object. |
| Fields inherited from interface org.opencms.workplace.list.I_CmsListResourceCollector |
|---|
PARAM_FILTER, PARAM_ORDER, PARAM_PAGE, PARAM_RESOURCES, PARAM_SORTBY, SEP_KEYVAL, SEP_PARAM |
| Constructor Summary | |
|---|---|
protected |
A_CmsListResourceCollector(A_CmsListExplorerDialog wp)
Constructor, creates a new list collector. |
| Method Summary | |
|---|---|
int |
compareTo(I_CmsResourceCollector arg0)
|
protected CmsListItem |
createResourceListItem(CmsResource resource,
CmsHtmlList list,
boolean showPermissions,
boolean showDateLastMod,
boolean showUserLastMod,
boolean showDateCreate,
boolean showUserCreate,
boolean showDateRel,
boolean showDateExp,
boolean showState,
boolean showLockedBy,
boolean showSite)
Returns a list item created from the resource information, differs between valid resources and invalid resources. |
java.lang.String |
getCreateLink(CmsObject cms)
Returns the link that must be executed when a user clicks on the direct edit "new" button on a list created by the default collector. |
java.lang.String |
getCreateLink(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the link that must be executed when a user clicks on the direct edit "new" button on a list created by the named collector. |
java.lang.String |
getCreateParam(CmsObject cms)
Returns the default parameter that must be passed to the I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method. |
java.lang.String |
getCreateParam(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the parameter that must be passed to the I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method. |
java.lang.String |
getDefaultCollectorName()
Returns the default collector name to use for collecting resources. |
java.lang.String |
getDefaultCollectorParam()
Returns the default collector parameter to use for collecting resources. |
protected CmsListItem |
getDummyListItem(CmsHtmlList list)
Returns a dummy list item. |
protected java.util.List<CmsResource> |
getInternalResources(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
Wrapper method for caching the result of getResources(CmsObject, Map). |
java.util.List<CmsListItem> |
getListItems(java.lang.String parameter)
Returns a list of list items from a list of resources. |
int |
getOrder()
Returns the "order weight" of this collector. |
CmsResource |
getResource(CmsObject cms,
CmsListItem item)
Returns the resource for the given item. |
protected java.util.List<java.lang.String> |
getResourceNamesFromParam(java.util.Map<java.lang.String,java.lang.String> params)
Returns the list of resource names from the parameter map. |
abstract java.util.List<CmsResource> |
getResources(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
Returns all, unsorted and unfiltered, resources. |
java.util.List<CmsResource> |
getResults(CmsObject cms)
Returns a list of CmsResource Objects that are
gathered in the VFS using the default collector name and parameter. |
java.util.List<CmsResource> |
getResults(CmsObject cms,
java.lang.String collectorName,
java.lang.String parameter)
The parameter must follow the syntax "page:nr" where nr is the number of the page to be displayed. |
protected CmsListState |
getState(java.util.Map<java.lang.String,java.lang.String> params)
Returns the state of the parameter map. |
A_CmsListExplorerDialog |
getWp()
Returns the workplace object. |
protected abstract void |
setAdditionalColumns(CmsListItem item,
CmsResourceUtil resUtil)
Set additional column entries for a resource. |
void |
setDefaultCollectorName(java.lang.String collectorName)
Sets the default collector name to use for collecting resources. |
void |
setDefaultCollectorParam(java.lang.String param)
The parameter must follow the syntax "mode|projectId" where mode is either "new", "changed", "deleted" or "modified" and projectId is the id of the project to be displayed. |
void |
setOrder(int order)
Sets the "order weight" of this collector. |
void |
setPage(int page)
Sets the current display page. |
protected void |
setResourcesParam(java.util.List<java.lang.String> resources)
Sets the resources parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opencms.file.collectors.I_CmsResourceCollector |
|---|
getCollectorNames |
| Field Detail |
|---|
public static final java.lang.String VFS_PATH_NONE
protected java.lang.String m_collectorParameter
protected java.util.Map<java.lang.String,CmsListItem> m_liCache
protected java.util.Map<java.lang.String,CmsResource> m_resCache
protected java.util.List<CmsResource> m_resources
| Constructor Detail |
|---|
protected A_CmsListResourceCollector(A_CmsListExplorerDialog wp)
wp - the workplace object where the collector is used from| Method Detail |
|---|
public int compareTo(I_CmsResourceCollector arg0)
compareTo in interface java.lang.Comparable<I_CmsResourceCollector>Comparable.compareTo(java.lang.Object)public java.lang.String getCreateLink(CmsObject cms)
I_CmsResourceCollector
If this method returns null,
it indicated that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateLink in interface I_CmsResourceCollectorcms - the current CmsObject
I_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject)
public java.lang.String getCreateLink(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
I_CmsResourceCollector
If this method returns null,
it indicated that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateLink in interface I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparam - an optional collector parameter
I_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public java.lang.String getCreateParam(CmsObject cms)
I_CmsResourceCollectorI_CmsResourceCollector.getCreateLink(CmsObject, String, String) method.
If this method returns null,
it indicates that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateParam in interface I_CmsResourceCollectorcms - the current CmsObject
I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method, or nullI_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject)
public java.lang.String getCreateParam(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
I_CmsResourceCollectorI_CmsResourceCollector.getCreateLink(CmsObject, String, String) method.
If this method returns null,
it indicates that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateParam in interface I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparam - an optional collector parameter from the current page context
I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method, or nullI_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public java.lang.String getDefaultCollectorName()
I_CmsResourceCollector
getDefaultCollectorName in interface I_CmsResourceCollectorI_CmsResourceCollector.getDefaultCollectorName()public java.lang.String getDefaultCollectorParam()
I_CmsResourceCollector
getDefaultCollectorParam in interface I_CmsResourceCollectorI_CmsResourceCollector.getDefaultCollectorParam()
public java.util.List<CmsListItem> getListItems(java.lang.String parameter)
throws CmsException
getListItems in interface I_CmsListResourceCollectorparameter - the collector parameter or null for default.
CmsListItem objects
CmsException - if something goes wrongpublic int getOrder()
I_CmsResourceCollectorThe "order weight" is important because two collector classes may provide a collector with the same name. If this is the case, the collector implementation with the higher order number "overrules" the lower order number class.
getOrder in interface I_CmsResourceCollectorI_CmsResourceCollector.getOrder()
public CmsResource getResource(CmsObject cms,
CmsListItem item)
getResource in interface I_CmsListResourceCollectorcms - the cms objectitem - the item
public abstract java.util.List<CmsResource> getResources(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
throws CmsException
Be sure to cache the resources.
getResources in interface I_CmsListResourceCollectorcms - the cms objectparams - the parameter map
CmsResource objects
CmsException - if something goes wrong
public java.util.List<CmsResource> getResults(CmsObject cms)
throws CmsException
I_CmsResourceCollectorCmsResource Objects that are
gathered in the VFS using the default collector name and parameter.
getResults in interface I_CmsResourceCollectorcms - the current CmsObject
CmsException - if something goes wrong
CmsDataAccessException - if the parameter attribute of the corresponding collector tag is invalidI_CmsResourceCollector.getResults(org.opencms.file.CmsObject)
public java.util.List<CmsResource> getResults(CmsObject cms,
java.lang.String collectorName,
java.lang.String parameter)
throws CmsException
getResults in interface I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparameter - an optional collector parameter
CmsException - if something goes wrong
CmsDataAccessException - if the parameter attribute of the corresponding collector tag is invalidI_CmsResourceCollector.getResults(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public A_CmsListExplorerDialog getWp()
getWp in interface I_CmsListResourceCollectorpublic void setDefaultCollectorName(java.lang.String collectorName)
I_CmsResourceCollector
setDefaultCollectorName in interface I_CmsResourceCollectorcollectorName - the default collector nameI_CmsResourceCollector.setDefaultCollectorName(java.lang.String)public void setDefaultCollectorParam(java.lang.String param)
setDefaultCollectorParam in interface I_CmsResourceCollectorparam - the default collector parameterI_CmsResourceCollector.setDefaultCollectorParam(java.lang.String)public void setOrder(int order)
I_CmsResourceCollector
setOrder in interface I_CmsResourceCollectororder - the order weight to setI_CmsResourceCollector.setOrder(int)public void setPage(int page)
setPage in interface I_CmsListResourceCollectorpage - the new display page
protected CmsListItem createResourceListItem(CmsResource resource,
CmsHtmlList list,
boolean showPermissions,
boolean showDateLastMod,
boolean showUserLastMod,
boolean showDateCreate,
boolean showUserCreate,
boolean showDateRel,
boolean showDateExp,
boolean showState,
boolean showLockedBy,
boolean showSite)
resource - the resource to create the list item fromlist - the listshowPermissions - if to show permissionsshowDateLastMod - if to show the last modification dateshowUserLastMod - if to show the last modification usershowDateCreate - if to show the creation dateshowUserCreate - if to show the creation dateshowDateRel - if to show the date releasedshowDateExp - if to show the date expiredshowState - if to show the stateshowLockedBy - if to show the lock usershowSite - if to show the site
protected CmsListItem getDummyListItem(CmsHtmlList list)
list - the list object to create the entry for
protected java.util.List<CmsResource> getInternalResources(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
throws CmsException
getResources(CmsObject, Map).
cms - the cms objectparams - the parameter map
getResources(CmsObject, Map)
CmsException - if something goes wrongprotected java.util.List<java.lang.String> getResourceNamesFromParam(java.util.Map<java.lang.String,java.lang.String> params)
params - the parameter map
I_CmsListResourceCollector.PARAM_RESOURCESprotected CmsListState getState(java.util.Map<java.lang.String,java.lang.String> params)
params - the parameter map
protected abstract void setAdditionalColumns(CmsListItem item,
CmsResourceUtil resUtil)
Overwrite this method to set additional column entries.
item - the current list itemresUtil - the resource util object for getting the info fromprotected void setResourcesParam(java.util.List<java.lang.String> resources)
resources - the list of resource names to use
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||