com.wewebu.ow.server.plug.owrecord
Class OwRecordSetView

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.owrecord.OwRecordSetView
All Implemented Interfaces:
com.wewebu.ow.server.ui.OwBaseView, com.wewebu.ow.server.ui.OwUpdateTarget

public class OwRecordSetView
extends com.wewebu.ow.server.ui.OwView

View Module to store and display an object set. Used for the recent record list.

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
static class OwRecordSetView.OwObjectSetEntry
           Class defining a single object reference instance.
 
Field Summary
protected static String BASE_NODE_NODE_NAME
          base node name for the serialization XML DOM document
protected static String DISPLAY_NAME_NODE_NAME
          node name for display name serialization in DOM node
protected static String DMS_ID_NODE_NAME
          node name for DMSID serialization in DOM node
protected  int m_iMaxRecentRecordSize
           
protected  List m_recentobjectlist
          map that contains OwObjectSetEntrys, keeps order
protected static String OBJECT_ENTRY_NODE_NAME
          node name for object entry serialization in DOM node
static String PLUGIN_SETTING_RECENT_OBJECT_LIST
          setting name for the recent object list
static String QUERY_KEY_OBJECT_HASHCODE
          query string key for the hashcode parameter
static String QUERY_KEY_OPEN_OBJECT
          query string key for the open object event parameter
 
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
OwRecordSetView()
           
 
Method Summary
 void addObject(com.wewebu.ow.server.ecm.OwObject object_p, String strSubFolderPath_p)
          add an object to the set
protected  void addRecentEntry(OwRecordSetView.OwObjectSetEntry newEntry_p)
          Add an entry to recent entry list.
 OwRecordSetView.OwObjectSetEntry findObjectEntry(com.wewebu.ow.server.ecm.OwObject object_p)
           
 List getRecentObjectList()
          getter for the private recent object list
protected  void init()
          init the view after the context is set.
protected  void load()
          load list from ECM system
 void onOpenObject(javax.servlet.http.HttpServletRequest request_p)
          event called when user clicked on a object link
protected  void onRender(Writer w_p)
          called when the view should create its HTML content to be displayed
 void onUpdate(com.wewebu.ow.server.ui.OwEventTarget caller_p, int iCode_p, Object param_p)
          called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender.
 void removeObjectEntry(com.wewebu.ow.server.ecm.OwObject object_p)
           
protected  void save()
          save list to ECM system
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, addView, detach, getBreadcrumbPart, getDocument, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, 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
 

Field Detail

PLUGIN_SETTING_RECENT_OBJECT_LIST

public static final String PLUGIN_SETTING_RECENT_OBJECT_LIST
setting name for the recent object list

See Also:
Constant Field Values

DISPLAY_NAME_NODE_NAME

protected static final String DISPLAY_NAME_NODE_NAME
node name for display name serialization in DOM node

See Also:
Constant Field Values

DMS_ID_NODE_NAME

protected static final String DMS_ID_NODE_NAME
node name for DMSID serialization in DOM node

See Also:
Constant Field Values

OBJECT_ENTRY_NODE_NAME

protected static final String OBJECT_ENTRY_NODE_NAME
node name for object entry serialization in DOM node

See Also:
Constant Field Values

BASE_NODE_NODE_NAME

protected static final String BASE_NODE_NODE_NAME
base node name for the serialization XML DOM document

See Also:
Constant Field Values

QUERY_KEY_OBJECT_HASHCODE

public static final String QUERY_KEY_OBJECT_HASHCODE
query string key for the hashcode parameter

See Also:
Constant Field Values

QUERY_KEY_OPEN_OBJECT

public static final String QUERY_KEY_OPEN_OBJECT
query string key for the open object event parameter

See Also:
Constant Field Values

m_recentobjectlist

protected List m_recentobjectlist
map that contains OwObjectSetEntrys, keeps order


m_iMaxRecentRecordSize

protected int m_iMaxRecentRecordSize
Constructor Detail

OwRecordSetView

public OwRecordSetView()
Method Detail

init

protected void init()
             throws Exception
init the view after the context is set.

Overrides:
init in class com.wewebu.ow.server.ui.OwView
Throws:
Exception

onUpdate

public void onUpdate(com.wewebu.ow.server.ui.OwEventTarget caller_p,
                     int iCode_p,
                     Object param_p)
              throws Exception
called by the framework to update the view when OwDocument.Update was called NOTE: We can not use the onRender method to update, because we do not know the call order of onRender. onUpdate is always called before all onRender methods.

Specified by:
onUpdate in interface com.wewebu.ow.server.ui.OwUpdateTarget
Overrides:
onUpdate in class com.wewebu.ow.server.ui.OwView
Parameters:
caller_p - OwEventTarget target that called update
iCode_p - int optional reason code
param_p - Object optional parameter representing the refresh, depends on the value of iCode_p, can be null
Throws:
Exception

findObjectEntry

public OwRecordSetView.OwObjectSetEntry findObjectEntry(com.wewebu.ow.server.ecm.OwObject object_p)
                                                 throws Exception
Throws:
Exception

removeObjectEntry

public void removeObjectEntry(com.wewebu.ow.server.ecm.OwObject object_p)
                       throws Exception
Throws:
Exception

addObject

public void addObject(com.wewebu.ow.server.ecm.OwObject object_p,
                      String strSubFolderPath_p)
               throws Exception
add an object to the set

Parameters:
object_p - OwObject to add to the set
Throws:
Exception

addRecentEntry

protected void addRecentEntry(OwRecordSetView.OwObjectSetEntry newEntry_p)
Add an entry to recent entry list. The entry is not added if it is a virtual object.

Parameters:
newEntry_p - - the entry to be added.
Since:
3.1.0.0

save

protected void save()
             throws Exception
save list to ECM system

Throws:
Exception

load

protected void load()
             throws Exception
load list from ECM system

Throws:
Exception

onOpenObject

public void onOpenObject(javax.servlet.http.HttpServletRequest request_p)
                  throws Exception
event called when user clicked on a object link

Parameters:
request_p - a HttpServletRequest
Throws:
Exception

getRecentObjectList

public List getRecentObjectList()
getter for the private recent object list


onRender

protected void onRender(Writer w_p)
                 throws Exception
called when the view should create its HTML content to be displayed

Overrides:
onRender in class com.wewebu.ow.server.ui.OwView
Parameters:
w_p - Writer object to write HTML to
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.