| org.sakaiproject.cheftool.PagedResourceHelperAction org.sakaiproject.content.tool.ResourcesAction
ResourcesAction | public class ResourcesAction extends PagedResourceHelperAction (Code) | | ResourceAction is a ContentHosting application
author: University of Michigan, CHEF Software Development Team version: $Revision: 33703 $ |
Inner Class :public class Action | |
Inner Class :public static class ChefPathItem | |
Inner Class :public enum ContentPermissions | |
Inner Class :public static class ElementCarrier | |
Inner Class :public static class MetadataGroup extends Vector | |
Method Summary | |
protected boolean | addInstance(String field, List properties) Search a flat list of ResourcesMetadata properties for one whose localname matches "field". | public String | buildColumnsContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) Build the context to establish a custom-ordering of resources/folders within a folder. | public String | buildCreateWizardContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildDeleteConfirmContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildDeleteFinishContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildListContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildMainPanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public static String | buildMoreContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildOptionsPanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildReorderContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) Build the context to establish a custom-ordering of resources/folders within a folder. | public String | buildReviseMetadataContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | public String | buildWebdavContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) | protected static void | capturePropertyValues(ParameterParser params, ResourcesEditItem item, List properties) | protected void | cleanup(ToolSession toolSession, String prefix) Iterate over attributes in ToolSession and remove all attributes starting with a particular prefix. | public static void | copyrightChoicesIntoContext(SessionState state, Context context) | protected static List<ContentCollection> | createFolders(SessionState state, ResourceToolActionPipe pipe) | public static List<ContentResource> | createResources(ResourceToolActionPipe pipe) | public static List<ContentResource> | createUrls(SessionState state, ResourceToolActionPipe pipe) | protected void | deleteItem(SessionState state, String itemId) | protected void | deleteItems(SessionState state, Set deleteIdSet) | public void | doCancel(RunData data) | public void | doCancelOptions(RunData data) | public void | doCollapse_collection(RunData data) | public void | doColumns(RunData data) | public void | doCompleteCreateWizard(RunData data) | public void | doCopy(RunData data) | public void | doDeleteconfirm(RunData data) | public void | doDispatchAction(RunData data) | public void | doExpand_collection(RunData data) | public void | doExpandall(RunData data) Expand all the collection resources. | public void | doFinalizeDelete(RunData data) | public void | doHideOtherSites(RunData data) | public void | doHide_metadata(RunData data) | public void | doHierarchy(RunData data) | public void | doList(RunData data) Expand all the collection resources and put in EXPANDED_COLLECTIONS attribute. | public void | doMove(RunData data) Handle user's selection of items to be moved. | public static void | doMoveitems(RunData data) | public void | doMultiItemDispatch(RunData data) | public void | doNavigate(RunData data) | public static void | doPasteitem(RunData data) | public static void | doPasteitems(RunData data) | public void | doPermissions(RunData data, Context context) | public void | doReorder(RunData data) | public void | doReviseProperties(RunData data) | public void | doSaveOrder(RunData data) | public void | doShowMembers(RunData data) | public void | doShowOtherSites(RunData data) | public void | doShow_metadata(RunData data) | public void | doShow_webdav(RunData data) | public void | doSort(RunData data) | public void | doUnexpandall(RunData data) | public void | doUpdateOptions(RunData data) | protected static String | duplicateItem(SessionState state, String itemId, String collectionId) | protected int | findResourceInList(List resources, String id) Find the resource with this id in the list.
Parameters: messages - The list of messages. Parameters: id - The message id. | protected void | finishAction(SessionState state, ToolSession toolSession, ResourceToolActionPipe pipe) | protected static List<ResourceToolAction> | getActions(ContentEntity selectedItem, Set<ContentPermissions> permissions, ResourceTypeRegistry registry) | protected static List<ResourceToolAction> | getAddActions(ContentEntity selectedItem, Set<ContentPermissions> permissions, ResourceTypeRegistry registry) | public static List | getCollectionPath(SessionState state) | public static ResourcesEditItem | getEditItem(String id, String collectionId, RunData data) | public static String | getFileSizeString(long size_long, ResourceLoader rl) | protected ListItem | getListItem(SessionState state) | protected static List | getListView(String collectionId, Set highlightedItems, ResourcesBrowseItem parent, boolean isLocal, SessionState state) Get the items in this folder that should be seen. | public static List<ResourceToolAction> | getPasteActions(ContentEntity selectedItem, Set<ContentPermissions> permissions, ResourceTypeRegistry registry, List<String> items_to_be_moved, List<String> items_to_be_copied) | protected static Collection<ContentPermissions> | getPermissions(String id, Collection<ContentPermissions> inheritedPermissions) | protected ResourceType | getResourceType(String id, SessionState state) | protected static User | getUserProperty(ResourceProperties props, String name) | protected void | initState(SessionState state, VelocityPortlet portlet, JetspeedRunData data) | public void | initStateAttributes(SessionState state, VelocityPortlet portlet) | protected static String | isolateName(String id) Find the resource name of a given resource id or filepath.
Parameters: id - The resource id. | protected static List | newEditItems(String collectionId, String itemtype, String encoding, String defaultCopyrightStatus, boolean preventPublicDisplay, Time defaultRetractDate, int number) | protected boolean | notificationEnabled(SessionState state) | protected void | pasteItem(SessionState state, String collectionId) | protected List<ListItem> | prepPage(SessionState state) Prepare the current page of site collections to display. | public static void | publicDisplayChoicesIntoContext(SessionState state, Context context) | protected List<ListItem> | readAllResources(SessionState state) Develop a list of all the site collections that there are to page. | protected void | replaceContent(ResourceToolActionPipe pipe) | public static void | reviseContent(ResourceToolActionPipe pipe) | protected static String | validateURL(String url) |
ACTIONS_ON_FOLDERS | final public static List<ActionType> ACTIONS_ON_FOLDERS(Code) | | |
ACTIONS_ON_MULTIPLE_ITEMS | final public static List<ActionType> ACTIONS_ON_MULTIPLE_ITEMS(Code) | | |
ACTIONS_ON_RESOURCES | final public static List<ActionType> ACTIONS_ON_RESOURCES(Code) | | |
CONTENT_DELETE_ACTIONS | final public static List<ActionType> CONTENT_DELETE_ACTIONS(Code) | | |
CONTENT_MODIFY_ACTIONS | final public static List<ActionType> CONTENT_MODIFY_ACTIONS(Code) | | |
CONTENT_NEW_ACTIONS | final public static List<ActionType> CONTENT_NEW_ACTIONS(Code) | | |
CONTENT_NEW_FOR_PARENT_ACTIONS | final public static List<ActionType> CONTENT_NEW_FOR_PARENT_ACTIONS(Code) | | |
CONTENT_READ_ACTIONS | final public static List<ActionType> CONTENT_READ_ACTIONS(Code) | | |
COPYRIGHT_PATH | final public static String COPYRIGHT_PATH(Code) | | copyright path -- MUST have same value as AccessServlet.COPYRIGHT_PATH
|
CREATION_ACTIONS | final public static List<ActionType> CREATION_ACTIONS(Code) | | |
DEFAULT_PAGE_SIZE | final protected static int DEFAULT_PAGE_SIZE(Code) | | The default number of site collections per page.
|
EXPANDABLE_FOLDER_SIZE_LIMIT | final protected static int EXPANDABLE_FOLDER_SIZE_LIMIT(Code) | | The default number of members for a collection at which this tool should refuse to expand the collection. Used only if value can't be read from config service.
|
MAXIMUM_ATTEMPTS_FOR_UNIQUENESS | final public static int MAXIMUM_ATTEMPTS_FOR_UNIQUENESS(Code) | | |
MIME_TYPE_DOCUMENT_HTML | final public static String MIME_TYPE_DOCUMENT_HTML(Code) | | |
MIME_TYPE_DOCUMENT_PLAINTEXT | final public static String MIME_TYPE_DOCUMENT_PLAINTEXT(Code) | | |
MIME_TYPE_STRUCTOBJ | final public static String MIME_TYPE_STRUCTOBJ(Code) | | |
MODE_ATTACHMENT_CONFIRM | final public static String MODE_ATTACHMENT_CONFIRM(Code) | | |
MODE_ATTACHMENT_CONFIRM_INIT | final public static String MODE_ATTACHMENT_CONFIRM_INIT(Code) | | |
MODE_ATTACHMENT_CREATE | final public static String MODE_ATTACHMENT_CREATE(Code) | | |
MODE_ATTACHMENT_CREATE_INIT | final public static String MODE_ATTACHMENT_CREATE_INIT(Code) | | |
MODE_ATTACHMENT_DONE | final public static String MODE_ATTACHMENT_DONE(Code) | | |
MODE_ATTACHMENT_EDIT_ITEM | final public static String MODE_ATTACHMENT_EDIT_ITEM(Code) | | |
MODE_ATTACHMENT_EDIT_ITEM_INIT | final public static String MODE_ATTACHMENT_EDIT_ITEM_INIT(Code) | | |
MODE_ATTACHMENT_NEW_ITEM | final public static String MODE_ATTACHMENT_NEW_ITEM(Code) | | |
MODE_ATTACHMENT_NEW_ITEM_INIT | final public static String MODE_ATTACHMENT_NEW_ITEM_INIT(Code) | | |
MODE_ATTACHMENT_SELECT | final public static String MODE_ATTACHMENT_SELECT(Code) | | modes for attachment helper
|
MODE_ATTACHMENT_SELECT_INIT | final public static String MODE_ATTACHMENT_SELECT_INIT(Code) | | |
MODE_REVISE_METADATA | final static String MODE_REVISE_METADATA(Code) | | |
ONE_WEEK | final protected static long ONE_WEEK(Code) | | A long representing the number of milliseconds in one week. Used for date calculations
|
PARAM_PAGESIZE | final protected static String PARAM_PAGESIZE(Code) | | |
PASTE_COPIED_ACTIONS | final public static List<ActionType> PASTE_COPIED_ACTIONS(Code) | | |
PASTE_MOVED_ACTIONS | final public static List<ActionType> PASTE_MOVED_ACTIONS(Code) | | |
PUBLIC_ACCESS | final protected static String PUBLIC_ACCESS(Code) | | string used to represent "public" access mode in UI elements
|
RESOURCES_MODE_DROPBOX | final public static String RESOURCES_MODE_DROPBOX(Code) | | |
RESOURCES_MODE_HELPER | final public static String RESOURCES_MODE_HELPER(Code) | | |
RESOURCES_MODE_RESOURCES | final public static String RESOURCES_MODE_RESOURCES(Code) | | |
SHOW_ALL_SITES_IN_FILE_PICKER | final public static boolean SHOW_ALL_SITES_IN_FILE_PICKER(Code) | | The default value for whether to show all sites in file-picker (used if global value can't be read from server config service)
|
SITE_UPDATE_ACTIONS | final public static List<ActionType> SITE_UPDATE_ACTIONS(Code) | | |
STATE_COLUMN_ITEM_ID | final public static String STATE_COLUMN_ITEM_ID(Code) | | |
STATE_CREATE_COLLECTION_ID | final public static String STATE_CREATE_COLLECTION_ID(Code) | | |
STATE_CREATE_MESSAGE | final protected static String STATE_CREATE_MESSAGE(Code) | | |
STATE_CREATE_NUMBER | final public static String STATE_CREATE_NUMBER(Code) | | |
STATE_CREATE_WIZARD_ACTION | final protected static String STATE_CREATE_WIZARD_ACTION(Code) | | |
STATE_CREATE_WIZARD_COLLECTION_ID | final protected static String STATE_CREATE_WIZARD_COLLECTION_ID(Code) | | |
STATE_CREATE_WIZARD_ITEM | final protected static String STATE_CREATE_WIZARD_ITEM(Code) | | |
STATE_DEFAULT_RETRACT_TIME | final protected static String STATE_DEFAULT_RETRACT_TIME(Code) | | name of state attribute for the default retract time
|
STATE_DELETE_SET | final protected static String STATE_DELETE_SET(Code) | | |
STATE_EXPANDED_FOLDER_SORT_MAP | final protected static String STATE_EXPANDED_FOLDER_SORT_MAP(Code) | | |
STATE_FILE_UPLOAD_MAX_SIZE | final static String STATE_FILE_UPLOAD_MAX_SIZE(Code) | | state attribute for the maximum size for file upload
|
STATE_HAS_ATTACHMENT_BEFORE | final public static String STATE_HAS_ATTACHMENT_BEFORE(Code) | | State attribute for where there is at least one attachment before invoking attachment tool
|
STATE_HELPER_CANCELED_BY_USER | final public static String STATE_HELPER_CANCELED_BY_USER(Code) | | the name of the state attribute indicating that the user canceled out of the helper. Is set only if the user canceled out of the helper.
|
STATE_HIGHLIGHTED_ITEMS | final protected static String STATE_HIGHLIGHTED_ITEMS(Code) | | |
STATE_ITEMS_TO_BE_COPIED | final protected static String STATE_ITEMS_TO_BE_COPIED(Code) | | |
STATE_ITEMS_TO_BE_MOVED | final protected static String STATE_ITEMS_TO_BE_MOVED(Code) | | |
STATE_LIST_VIEW_SORT | final protected static String STATE_LIST_VIEW_SORT(Code) | | |
STATE_MODE_RESOURCES | final public static String STATE_MODE_RESOURCES(Code) | | The resources, helper or dropbox mode.
|
STATE_NON_EMPTY_DELETE_SET | final protected static String STATE_NON_EMPTY_DELETE_SET(Code) | | |
STATE_REMOVED_ATTACHMENTS | final protected static String STATE_REMOVED_ATTACHMENTS(Code) | | |
STATE_REORDER_FOLDER | final protected static String STATE_REORDER_FOLDER(Code) | | |
STATE_REORDER_SORT | final protected static String STATE_REORDER_SORT(Code) | | |
STATE_REORDER_SORT_ASC | final protected static String STATE_REORDER_SORT_ASC(Code) | | The sort ascending or decending for the reorder context
|
STATE_REORDER_SORT_BY | final protected static String STATE_REORDER_SORT_BY(Code) | | The property (column) to sort by in the reorder context
|
STATE_RESOURCES_HELPER_MODE | final public static String STATE_RESOURCES_HELPER_MODE(Code) | | The resources, helper or dropbox mode.
|
STATE_REVISE_PROPERTIES_ACTION | final protected static String STATE_REVISE_PROPERTIES_ACTION(Code) | | |
STATE_REVISE_PROPERTIES_ENTITY_ID | final protected static String STATE_REVISE_PROPERTIES_ENTITY_ID(Code) | | |
STATE_REVISE_PROPERTIES_ITEM | final protected static String STATE_REVISE_PROPERTIES_ITEM(Code) | | |
STATE_SHOW_ALL_SITES | final public static String STATE_SHOW_ALL_SITES(Code) | | The name of a state attribute indicating whether the resources tool/helper is allowed to show all sites the user has access to
|
STATE_SHOW_COPY_ACTION | final protected static String STATE_SHOW_COPY_ACTION(Code) | | |
STATE_SHOW_MOVE_ACTION | final protected static String STATE_SHOW_MOVE_ACTION(Code) | | |
STATE_SHOW_OTHER_SITES | final public static String STATE_SHOW_OTHER_SITES(Code) | | The name of a state attribute indicating whether the wants to see other sites if that is enabled
|
STATE_SHOW_REMOVE_ACTION | final protected static String STATE_SHOW_REMOVE_ACTION(Code) | | |
STATE_STACK_CREATE_COLLECTION_ID | final public static String STATE_STACK_CREATE_COLLECTION_ID(Code) | | |
STATE_STACK_CREATE_NUMBER | final public static String STATE_STACK_CREATE_NUMBER(Code) | | |
STATE_STACK_CREATE_TYPE | final public static String STATE_STACK_CREATE_TYPE(Code) | | |
STATE_STACK_EDIT_COLLECTION_ID | final public static String STATE_STACK_EDIT_COLLECTION_ID(Code) | | |
STATE_STACK_EDIT_ID | final public static String STATE_STACK_EDIT_ID(Code) | | |
STATE_STACK_STRUCTOBJ_TYPE | final public static String STATE_STACK_STRUCTOBJ_TYPE(Code) | | |
STATE_SUSPENDED_OPERATIONS_STACK | final public static String STATE_SUSPENDED_OPERATIONS_STACK(Code) | | |
STATE_SUSPENDED_OPERATIONS_STACK_DEPTH | final public static String STATE_SUSPENDED_OPERATIONS_STACK_DEPTH(Code) | | |
STATE_TOP_MESSAGE_INDEX | final protected static String STATE_TOP_MESSAGE_INDEX(Code) | | |
STATE_USING_CREATIVE_COMMONS | final protected static String STATE_USING_CREATIVE_COMMONS(Code) | | state attribute indicating whether we're using the Creative Commons dialog instead of the "old" copyright dialog
|
UTF_8_ENCODING | final public static String UTF_8_ENCODING(Code) | | |
logger | final static Log logger(Code) | | |
addInstance | protected boolean addInstance(String field, List properties)(Code) | | Search a flat list of ResourcesMetadata properties for one whose localname matches "field".
If found and the field can have additional instances, increment the count for that item.
Parameters: field - Parameters: properties - true if the field is found, false otherwise. |
cleanup | protected void cleanup(ToolSession toolSession, String prefix)(Code) | | Iterate over attributes in ToolSession and remove all attributes starting with a particular prefix.
Parameters: toolSession - Parameters: prefix - |
copyrightChoicesIntoContext | public static void copyrightChoicesIntoContext(SessionState state, Context context)(Code) | | put copyright info into context
|
deleteItem | protected void deleteItem(SessionState state, String itemId)(Code) | | Parameters: state - Parameters: deleteIdSet - |
deleteItems | protected void deleteItems(SessionState state, Set deleteIdSet)(Code) | | Parameters: state - Parameters: deleteIdSet - Parameters: deleteIds - |
doCancel | public void doCancel(RunData data)(Code) | | doCancel to return to the previous state
|
doCancelOptions | public void doCancelOptions(RunData data)(Code) | | cancel out of options mode
|
doCollapse_collection | public void doCollapse_collection(RunData data)(Code) | | Remove the collection id from the expanded collection list
|
doCompleteCreateWizard | public void doCompleteCreateWizard(RunData data)(Code) | | Parameters: data - |
doCopy | public void doCopy(RunData data)(Code) | | set the state name to be "copy" if any item has been selected for copying
|
doDeleteconfirm | public void doDeleteconfirm(RunData data)(Code) | | set the state name to be "deletecofirm" if any item has been selected for deleting
|
doExpandall | public void doExpandall(RunData data)(Code) | | Expand all the collection resources.
|
doFinalizeDelete | public void doFinalizeDelete(RunData data)(Code) | | doDelete to delete the selected collection or resource items
|
doHideOtherSites | public void doHideOtherSites(RunData data)(Code) | | Parameters: data - |
doHide_metadata | public void doHide_metadata(RunData data)(Code) | | Parameters: data - |
doList | public void doList(RunData data)(Code) | | Expand all the collection resources and put in EXPANDED_COLLECTIONS attribute.
|
doMove | public void doMove(RunData data)(Code) | | Handle user's selection of items to be moved.
|
doMoveitems | public static void doMoveitems(RunData data)(Code) | | Paste the item(s) selected to be moved
|
doMultiItemDispatch | public void doMultiItemDispatch(RunData data)(Code) | | |
doNavigate | public void doNavigate(RunData data)(Code) | | Navigate in the resource hireachy
|
doPasteitem | public static void doPasteitem(RunData data)(Code) | | Paste the previously copied item(s)
|
doPasteitems | public static void doPasteitems(RunData data)(Code) | | Paste the previously copied item(s)
|
doPermissions | public void doPermissions(RunData data, Context context)(Code) | | Fire up the permissions editor for the tool's permissions
|
doReorder | public void doReorder(RunData data)(Code) | | Sort based on the given property
|
doReviseProperties | public void doReviseProperties(RunData data)(Code) | | |
doSaveOrder | public void doSaveOrder(RunData data)(Code) | | Sort based on the given property
|
doShowOtherSites | public void doShowOtherSites(RunData data)(Code) | | Parameters: data - |
doShow_metadata | public void doShow_metadata(RunData data)(Code) | | Parameters: data - |
doShow_webdav | public void doShow_webdav(RunData data)(Code) | | Show information about WebDAV
|
doSort | public void doSort(RunData data)(Code) | | Sort based on the given property
|
doUnexpandall | public void doUnexpandall(RunData data)(Code) | | Unexpand all the collection resources
|
doUpdateOptions | public void doUpdateOptions(RunData data)(Code) | | Read user inputs from options form and update accordingly
|
findResourceInList | protected int findResourceInList(List resources, String id)(Code) | | Find the resource with this id in the list.
Parameters: messages - The list of messages. Parameters: id - The message id. The index position in the list of the message with this id, or -1 if not found. |
getCollectionPath | public static List getCollectionPath(SessionState state)(Code) | | Parameters: state - Parameters: homeCollectionId - Parameters: currentCollectionId - |
getFileSizeString | public static String getFileSizeString(long size_long, ResourceLoader rl)(Code) | | Parameters: size_long - Parameters: rl - |
getListView | protected static List getListView(String collectionId, Set highlightedItems, ResourcesBrowseItem parent, boolean isLocal, SessionState state)(Code) | | Get the items in this folder that should be seen.
Parameters: collectionId - - String version of Parameters: expandedCollections - - Hash of collection resources Parameters: sortedBy - - pass through to ContentHostingComparator Parameters: sortedAsc - - pass through to ContentHostingComparator Parameters: parent - - The folder containing this item Parameters: isLocal - - true if navigation root and home collection id of site are the same, false otherwise Parameters: state - - The session state a List of ResourcesBrowseItem objects |
getPermissions | protected static Collection<ContentPermissions> getPermissions(String id, Collection<ContentPermissions> inheritedPermissions)(Code) | | Parameters: inheritedPermissions - TODO Parameters: context - |
isolateName | protected static String isolateName(String id)(Code) | | Find the resource name of a given resource id or filepath.
Parameters: id - The resource id. the resource name. |
newEditItems | protected static List newEditItems(String collectionId, String itemtype, String encoding, String defaultCopyrightStatus, boolean preventPublicDisplay, Time defaultRetractDate, int number)(Code) | | |
notificationEnabled | protected boolean notificationEnabled(SessionState state)(Code) | | is notification enabled?
|
prepPage | protected List<ListItem> prepPage(SessionState state)(Code) | | Prepare the current page of site collections to display.
List of ListItem objects to display on this page. |
readAllResources | protected List<ListItem> readAllResources(SessionState state)(Code) | | Develop a list of all the site collections that there are to page.
Sort them as appropriate, and apply search criteria.
|
|
|