com.wewebu.ow.server.plug.owdocview
Class OwDownloadAsZipDocumentFunction

java.lang.Object
  extended by com.wewebu.ow.server.app.OwFunction
      extended by com.wewebu.ow.server.app.OwDocumentFunction
          extended by com.wewebu.ow.server.plug.owdocview.OwDownloadAsZipDocumentFunction
All Implemented Interfaces:
com.wewebu.ow.server.app.OwPlugin

public class OwDownloadAsZipDocumentFunction
extends com.wewebu.ow.server.app.OwDocumentFunction

Implementation of the Document Function that zips the selected files and provide a download for that zip.

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


Field Summary
protected static String DEFAULT_URL
          Default value if the download URL is not defined or empty
protected static String TAG_DOWNLOAD_URL
          Tag name of the element which define the servlet URL to call download
 
Fields inherited from class com.wewebu.ow.server.app.OwFunction
DESCRIPTION_KEY_CLASSES, DESCRIPTION_KEY_OBJ_TYPES, DESCRIPTION_KEY_TYPE, DRAG_DROP_PROPERTY_MAX_FILESIZE, m_MainContext
 
Constructor Summary
OwDownloadAsZipDocumentFunction()
           
 
Method Summary
 String getBigIcon()
          get the big (24x24 pixels) icon URL for this plugin to be displayed
 String getIcon()
          get the small (16x16 pixels) icon URL for this plugin to be displayed
 String getServletUrl()
          Get the defined servlet URL part, which was assigned during initialization
 void init(com.wewebu.ow.server.util.OwXMLUtil node_p, com.wewebu.ow.server.app.OwMainAppContext context_p)
           
 boolean isEnabled(com.wewebu.ow.server.ecm.OwObject object_p, com.wewebu.ow.server.ecm.OwObject parent_p, int context_p)
          check if function is enabled for the given object parameters (called only for single select operations)
 void onClickEvent(com.wewebu.ow.server.ecm.OwObject oObject_p, com.wewebu.ow.server.ecm.OwObject oParent_p, com.wewebu.ow.server.app.OwClientRefreshContext refreshCtx_p)
          event called when user clicked the plugin label / icon
 void onMultiselectClickEvent(Collection objects_p, com.wewebu.ow.server.ecm.OwObject parent_p, com.wewebu.ow.server.app.OwClientRefreshContext refreshCtx_p)
           
protected  void setServletUrl(String servletUrl_p)
          Set the servlet URL part of the link, which is used during link creation.
 
Methods inherited from class com.wewebu.ow.server.app.OwDocumentFunction
addHistoryEvent, addHistoryEvent, getBigDefaultIconHTML, getBigIconHTML, getColumnTitle, getContextMenu, getDefaultIconHTML, getDefaultLabel, getDisplayNameFromUserId, getEnableColumnClickEvent, getIconHTML, getLabel, getMultiselect, getNeedParent, getObjectInstance, getPluginType, getRetrievalPropertyNames, getShowInEditViews, isEnabled, isObjectTypeSupported, onColumnClickEvent
 
Methods inherited from class com.wewebu.ow.server.app.OwFunction
getConfigNode, getContext, getDragDropProperties, getEventManager, getHelpPath, getName, getNoEvent, getPluginID, getPluginTitle, getPluginTypeDisplayName, getSafeSetting, getSupportedObjectClassesFromDescriptor, getSupportedObjectTypesFromDescriptor, getTooltip, isDragDropTarget, isObjectClassSupported, setSafeSetting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_URL

protected static final String DEFAULT_URL
Default value if the download URL is not defined or empty

See Also:
Constant Field Values

TAG_DOWNLOAD_URL

protected static final String TAG_DOWNLOAD_URL
Tag name of the element which define the servlet URL to call download

See Also:
Constant Field Values
Constructor Detail

OwDownloadAsZipDocumentFunction

public OwDownloadAsZipDocumentFunction()
Method Detail

getIcon

public String getIcon()
               throws Exception
get the small (16x16 pixels) icon URL for this plugin to be displayed

Specified by:
getIcon in interface com.wewebu.ow.server.app.OwPlugin
Overrides:
getIcon in class com.wewebu.ow.server.app.OwFunction
Returns:
String icon URL
Throws:
Exception

getBigIcon

public String getBigIcon()
                  throws Exception
get the big (24x24 pixels) icon URL for this plugin to be displayed

Overrides:
getBigIcon in class com.wewebu.ow.server.app.OwFunction
Returns:
String icon URL
Throws:
Exception

isEnabled

public boolean isEnabled(com.wewebu.ow.server.ecm.OwObject object_p,
                         com.wewebu.ow.server.ecm.OwObject parent_p,
                         int context_p)
                  throws Exception
check if function is enabled for the given object parameters (called only for single select operations)

Overrides:
isEnabled in class com.wewebu.ow.server.app.OwDocumentFunction
Parameters:
object_p - OwObject where event was triggered
parent_p - Parent which listed the Object
context_p - OwStatusContextDefinitions
Returns:
true = enabled, false otherwise
Throws:
Exception

onClickEvent

public void onClickEvent(com.wewebu.ow.server.ecm.OwObject oObject_p,
                         com.wewebu.ow.server.ecm.OwObject oParent_p,
                         com.wewebu.ow.server.app.OwClientRefreshContext refreshCtx_p)
                  throws Exception
event called when user clicked the plugin label / icon

Specified by:
onClickEvent in class com.wewebu.ow.server.app.OwDocumentFunction
Parameters:
oObject_p - OwObject where event was triggered
oParent_p - Parent which listed the Object
refreshCtx_p - OwFunctionRefreshContext callback interface for the function plugins to signal refresh events to clients, can be null if no refresh is needed
Throws:
Exception

onMultiselectClickEvent

public void onMultiselectClickEvent(Collection objects_p,
                                    com.wewebu.ow.server.ecm.OwObject parent_p,
                                    com.wewebu.ow.server.app.OwClientRefreshContext refreshCtx_p)
                             throws Exception
Overrides:
onMultiselectClickEvent in class com.wewebu.ow.server.app.OwDocumentFunction
Throws:
Exception

init

public void init(com.wewebu.ow.server.util.OwXMLUtil node_p,
                 com.wewebu.ow.server.app.OwMainAppContext context_p)
          throws Exception
Overrides:
init in class com.wewebu.ow.server.app.OwDocumentFunction
Throws:
Exception

setServletUrl

protected void setServletUrl(String servletUrl_p)
Set the servlet URL part of the link, which is used during link creation.

Parameters:
servletUrl_p -
Since:
2.5.3.0

getServletUrl

public String getServletUrl()
Get the defined servlet URL part, which was assigned during initialization

Returns:
String representing the servlet URL part
Since:
2.5.3.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.