com.wewebu.ow.server.plug.owshortcut
Class OwShortCutItemView

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.ui.OwView
          extended by com.wewebu.ow.server.plug.owshortcut.OwShortCutItemView
All Implemented Interfaces:
com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner, OwShortcutDocumentEventListner, OwShortCutItemContext, com.wewebu.ow.server.ui.OwBaseView, com.wewebu.ow.server.ui.OwUpdateTarget, EventListener

public class OwShortCutItemView
extends com.wewebu.ow.server.ui.OwView
implements OwShortCutItemContext, com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner, OwShortcutDocumentEventListner

Displays OwShortCutItems.
The view is based on the OwShortCutDocument model object and renders object-pointing shortcuts and non-object-pointing shortcuts into two separates lists.

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


Nested Class Summary
 class OwShortCutItemView.OwDeleteShortcutFunction
          Inline delete shortcut function to be used in lists displaying OwObject pointing shortcut
protected  class OwShortCutItemView.OwInstanceMapKey
          Utility class for mapping OwObject instances in Maps
 
Field Summary
static int SHORTCUT_ITEM_FILTER_ALL
           
static int SHORTCUT_ITEM_FILTER_DOCUMENTS
           
static int SHORTCUT_ITEM_FILTER_FOLDERS
           
static int SHORTCUT_ITEM_FILTER_REST
           
 
Fields inherited from class com.wewebu.ow.server.ui.OwView
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwShortCutItemView()
           
 
Method Summary
protected  void applyConfiguration(com.wewebu.ow.server.dmsdialogs.views.OwObjectListView listView_p)
          Applies a hard-coded/default configuration (egg.
protected  com.wewebu.ow.server.dmsdialogs.views.OwObjectListView createObjectListView()
          (overridable)
protected  com.wewebu.ow.server.app.OwMimeManager createOwMimeManager()
          (overridable) Factory method to create own OwMimeManager
protected  void createShortcutsStructures(OwShortCutDocument document_p, Map objectShortcuts_p, List nonObjectShortcuts_p)
          Fills the given data structures with shortcut information.
 void detach()
          remove view and all subviews from context
 String getDeleteIcon()
          get the URL to the favorites delete icon
 com.wewebu.ow.server.app.OwMimeManager getMimeManager()
          get a MIME manager
 OwShortCutDocument getShortcutDocument()
           
protected  OwShortCutItem getShortcutForObject(com.wewebu.ow.server.ecm.OwObject object_p)
           
 String getUnkownMimeIcon()
          get the URL to the unknown MIME icon
protected  void init()
           
protected  boolean isItemFiltered(OwShortCutItem item_p)
           
protected  void onActivate(int index_p, Object reason_p)
           
 void onObjectListViewFilterChange(com.wewebu.ow.server.field.OwSearchNode filterNode_p, com.wewebu.ow.server.ecm.OwObject parent_p)
           
 String onObjectListViewGetRowClassName(int index_p, com.wewebu.ow.server.ecm.OwObject obj_p)
           
 boolean onObjectListViewItemClick(com.wewebu.ow.server.ecm.OwObject obj_p)
           
 void onObjectListViewSelect(com.wewebu.ow.server.ecm.OwObject object_p, com.wewebu.ow.server.ecm.OwObject parent_p)
           
 void onObjectListViewSort(com.wewebu.ow.server.field.OwSort newSort_p, String strSortProperty_p)
           
 void onRemove(javax.servlet.http.HttpServletRequest request_p)
          called when user clicks on paste from clipboard
protected  void onRender(Writer w_p)
           
 void onShortcutDocumentChaged(OwShortCutDocument document_p)
          Called after the OwShortCutDocument state was changed
protected  void refreshDisplayedShortcuts(OwShortCutDocument document_p)
          Recreates all internal view state considering the given document.
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, addView, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.wewebu.ow.server.plug.owshortcut.OwShortCutItemContext
getContext
 

Field Detail

SHORTCUT_ITEM_FILTER_ALL

public static final int SHORTCUT_ITEM_FILTER_ALL
See Also:
Constant Field Values

SHORTCUT_ITEM_FILTER_DOCUMENTS

public static final int SHORTCUT_ITEM_FILTER_DOCUMENTS
See Also:
Constant Field Values

SHORTCUT_ITEM_FILTER_FOLDERS

public static final int SHORTCUT_ITEM_FILTER_FOLDERS
See Also:
Constant Field Values

SHORTCUT_ITEM_FILTER_REST

public static final int SHORTCUT_ITEM_FILTER_REST
See Also:
Constant Field Values
Constructor Detail

OwShortCutItemView

public OwShortCutItemView()
Method Detail

createOwMimeManager

protected com.wewebu.ow.server.app.OwMimeManager createOwMimeManager()
(overridable) Factory method to create own OwMimeManager

Returns:
OwMimeManager
Since:
2.5.3.0

onActivate

protected void onActivate(int index_p,
                          Object reason_p)
                   throws Exception
Overrides:
onActivate in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

init

protected void init()
             throws Exception
Overrides:
init in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

getShortcutDocument

public OwShortCutDocument getShortcutDocument()

applyConfiguration

protected void applyConfiguration(com.wewebu.ow.server.dmsdialogs.views.OwObjectListView listView_p)
                           throws Exception
Applies a hard-coded/default configuration (egg. sort configuration , column configuration) to the give list view.

Parameters:
listView_p -
Throws:
Exception

getShortcutForObject

protected OwShortCutItem getShortcutForObject(com.wewebu.ow.server.ecm.OwObject object_p)
Parameters:
object_p -
Returns:
the shortcut object that points to the given displayed object instance
Since:
2.5.3.0

createObjectListView

protected com.wewebu.ow.server.dmsdialogs.views.OwObjectListView createObjectListView()
                                                                               throws Exception
(overridable)

Returns:
the list view control to be used when displaying OwObject pointing shortcuts
Throws:
Exception
Since:
2.5.3.0

onRemove

public void onRemove(javax.servlet.http.HttpServletRequest request_p)
              throws Exception
called when user clicks on paste from clipboard

Throws:
OwShortCutException
Exception

detach

public void detach()
remove view and all subviews from context

Overrides:
detach in class com.wewebu.ow.server.ui.OwView

getDeleteIcon

public String getDeleteIcon()
                     throws Exception
get the URL to the favorites delete icon

Returns:
String URL
Throws:
Exception

getUnkownMimeIcon

public String getUnkownMimeIcon()
                         throws Exception
get the URL to the unknown MIME icon

Returns:
String URL
Throws:
Exception

onRender

protected void onRender(Writer w_p)
                 throws Exception
Overrides:
onRender in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

createShortcutsStructures

protected void createShortcutsStructures(OwShortCutDocument document_p,
                                         Map objectShortcuts_p,
                                         List nonObjectShortcuts_p)
                                  throws Exception
Fills the given data structures with shortcut information. Basically the shortcuts are divided into OwObject-pointing-shortcuts and NON-OwObject-pointing-shortcuts.

Parameters:
objectShortcuts_p - map of OwShortCutItemView.OwInstanceMapKey keys to their inner OwObject shortcut correspondent
nonObjectShortcuts_p - List of NON OwObject pointing OwShortCutItems
Throws:
Exception
Since:
2.5.3.0

isItemFiltered

protected boolean isItemFiltered(OwShortCutItem item_p)
Parameters:
item_p -
Returns:
true if the given item shouldn't be displayed, false otherwise

getMimeManager

public com.wewebu.ow.server.app.OwMimeManager getMimeManager()
Description copied from interface: OwShortCutItemContext
get a MIME manager

Specified by:
getMimeManager in interface OwShortCutItemContext

onObjectListViewFilterChange

public void onObjectListViewFilterChange(com.wewebu.ow.server.field.OwSearchNode filterNode_p,
                                         com.wewebu.ow.server.ecm.OwObject parent_p)
                                  throws Exception
Specified by:
onObjectListViewFilterChange in interface com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner
Throws:
Exception

onObjectListViewGetRowClassName

public String onObjectListViewGetRowClassName(int index_p,
                                              com.wewebu.ow.server.ecm.OwObject obj_p)
Specified by:
onObjectListViewGetRowClassName in interface com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner

onObjectListViewItemClick

public boolean onObjectListViewItemClick(com.wewebu.ow.server.ecm.OwObject obj_p)
                                  throws Exception
Specified by:
onObjectListViewItemClick in interface com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner
Throws:
Exception

onObjectListViewSelect

public void onObjectListViewSelect(com.wewebu.ow.server.ecm.OwObject object_p,
                                   com.wewebu.ow.server.ecm.OwObject parent_p)
                            throws Exception
Specified by:
onObjectListViewSelect in interface com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner
Throws:
Exception

onObjectListViewSort

public void onObjectListViewSort(com.wewebu.ow.server.field.OwSort newSort_p,
                                 String strSortProperty_p)
                          throws Exception
Specified by:
onObjectListViewSort in interface com.wewebu.ow.server.dmsdialogs.views.OwObjectListView.OwObjectListViewEventListner
Throws:
Exception

refreshDisplayedShortcuts

protected void refreshDisplayedShortcuts(OwShortCutDocument document_p)
                                  throws Exception
Recreates all internal view state considering the given document. m_objectInstanceToShortcut, m_nonObjectShortcuts and the contents of the m_listView should be refreshed with correct shrtcut info.

Parameters:
document_p -
Throws:
Exception

onShortcutDocumentChaged

public void onShortcutDocumentChaged(OwShortCutDocument document_p)
Description copied from interface: OwShortcutDocumentEventListner
Called after the OwShortCutDocument state was changed

Specified by:
onShortcutDocumentChaged in interface OwShortcutDocumentEventListner
Parameters:
document_p - the document that triggered the event


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.