org.apache.jetspeed.layout.impl
Class ExportObject
java.lang.Object
org.apache.jetspeed.layout.impl.BasePortletAction
org.apache.jetspeed.layout.impl.BaseGetResourceAction
org.apache.jetspeed.layout.impl.ExportObject
- All Implemented Interfaces:
- org.apache.jetspeed.ajax.AjaxAction, org.apache.jetspeed.ajax.AjaxBuilder, Constants
public class ExportObject
- extends BaseGetResourceAction
- implements org.apache.jetspeed.ajax.AjaxAction, org.apache.jetspeed.ajax.AjaxBuilder, Constants
Exporting the object using Ajax command
- Version:
- $Id$
- Author:
- Vivek Kumar
Fields inherited from interface org.apache.jetspeed.layout.impl.Constants |
ABS, ACTION, CARTESIAN, COL, CUSTOM_MENUS, DEFAULT_LAYOUT, DESKTOP_EXTENDED, DESKTOP_PAGE_DECORATIONS, DESKTOP_PORTLET_DECORATIONS, DESTINATION, DOWN, FILTER, FOLDER, FOLDERS, FORMAT, FRAGMENTID, FRAGMENTS, GUESTUSERS, HEIGHT, INCLUDE_MENU_DEFS, IPADDRESS, LAYOUT, LAYOUTID, LAYOUTS, LEFT, LINK, LINKS, MENU, MENU_CONTEXT, MENU_DEFINITIONS, MENU_LOCALE, MENU_NAME, METADATA, NEWCOL, NEWROW, OFFLINE, OLD_DESKTOP_EXTENDED, OLD_HEIGHT, OLD_PORTLET_MODE, OLD_WIDTH, OLD_WINDOW_STATE, OLD_X, OLD_Y, OLD_Z, OLDCOL, OLDROW, ONLINE, PAGE, PAGE_DECORATIONS, PAGE_QUALIFIED_CREATE_ON_EDIT, PAGES, PORTLET_DECORATIONS, PORTLET_MODE, PORTLETENTITY, PORTLETID, PORTLETS, PROFILED_PATH, REASON, RESOURCE_NAME, RIGHT, ROLES, ROW, SECURITY_DEFS, SECURITY_OWNER, SECURITY_REFS, SESSIONS, SHORT_TITLE, SIZES, SOURCE, STANDARD_MENUS, STATUS, TITLE, TYPE, UP, USER_IS_ANONYMOUS, USERINFO, USERNAME, USERS, WIDTH, WINDOW_STATE, X, Y, Z |
Constructor Summary |
ExportObject(String template,
String errorTemplate,
org.apache.jetspeed.page.PageManager pageManager,
org.apache.jetspeed.layout.PortletActionSecurityBehavior securityBehavior,
org.apache.jetspeed.page.PageManager castorpagemanager,
String dir)
|
Method Summary |
private boolean |
cleanUserFolder(String userName)
|
private boolean |
deleteDir(File dir)
|
private String |
getDownloadLink(org.apache.jetspeed.request.RequestContext requestContext,
String ObjectName,
String userName,
String objectType)
|
private String |
getParentPath(String path)
|
private String |
getRealPath(String path)
|
private String |
getUserFolder(String userName,
boolean fullPath)
|
private org.apache.jetspeed.om.folder.Folder |
importFolder(org.apache.jetspeed.om.folder.Folder srcFolder,
String userName,
String destination)
|
private org.apache.jetspeed.om.folder.Folder |
lookupFolder(String path)
|
private org.apache.jetspeed.om.page.Link |
lookupLink(String path)
|
private org.apache.jetspeed.om.page.Page |
lookupPage(String path)
|
boolean |
run(org.apache.jetspeed.request.RequestContext requestContext,
Map resultMap)
|
private void |
zipFiles(File cpFile,
String sourcePath,
ZipOutputStream cpZipOutputStream)
|
private boolean |
zipObject(String sourcePath,
String target)
|
Methods inherited from class org.apache.jetspeed.layout.impl.BasePortletAction |
buildContext, buildErrorContext, checkAccess, createNewPageOnEdit, getActionParameter, getErrorTemplate, getFragmentIdFromLocation, getFragmentIdFromLocation, getNonNullActionParameter, getParentFragmentById, getTemplate, isCreateNewPageOnEditEnabled, isPageQualifiedForCreateNewPageOnEdit, runBatch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jetspeed.ajax.AjaxAction |
checkAccess, runBatch |
Methods inherited from interface org.apache.jetspeed.ajax.AjaxBuilder |
buildContext, buildErrorContext, getErrorTemplate, getTemplate |
log
protected org.apache.commons.logging.Log log
castorPageManager
protected org.apache.jetspeed.page.PageManager castorPageManager
pageRoot
protected String pageRoot
OBJECT_NAME
private static final String OBJECT_NAME
- See Also:
- Constant Field Values
OBJECT_TYPE
private static final String OBJECT_TYPE
- See Also:
- Constant Field Values
OBJECT_PATH
private static final String OBJECT_PATH
- See Also:
- Constant Field Values
RECURSIVE
private static final String RECURSIVE
- See Also:
- Constant Field Values
pathSeprator
String pathSeprator
ExportObject
public ExportObject(String template,
String errorTemplate,
org.apache.jetspeed.page.PageManager pageManager,
org.apache.jetspeed.layout.PortletActionSecurityBehavior securityBehavior,
org.apache.jetspeed.page.PageManager castorpagemanager,
String dir)
run
public boolean run(org.apache.jetspeed.request.RequestContext requestContext,
Map resultMap)
- Specified by:
run
in interface org.apache.jetspeed.ajax.AjaxAction
getDownloadLink
private String getDownloadLink(org.apache.jetspeed.request.RequestContext requestContext,
String ObjectName,
String userName,
String objectType)
throws Exception
- Throws:
Exception
cleanUserFolder
private boolean cleanUserFolder(String userName)
deleteDir
private boolean deleteDir(File dir)
getUserFolder
private String getUserFolder(String userName,
boolean fullPath)
getParentPath
private String getParentPath(String path)
zipObject
private boolean zipObject(String sourcePath,
String target)
zipFiles
private void zipFiles(File cpFile,
String sourcePath,
ZipOutputStream cpZipOutputStream)
importFolder
private org.apache.jetspeed.om.folder.Folder importFolder(org.apache.jetspeed.om.folder.Folder srcFolder,
String userName,
String destination)
throws org.apache.jetspeed.exception.JetspeedException
- Throws:
org.apache.jetspeed.exception.JetspeedException
lookupPage
private org.apache.jetspeed.om.page.Page lookupPage(String path)
lookupLink
private org.apache.jetspeed.om.page.Link lookupLink(String path)
lookupFolder
private org.apache.jetspeed.om.folder.Folder lookupFolder(String path)
getRealPath
private String getRealPath(String path)
Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.