com.wewebu.ow.server.ui
Class OwDocument

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.ui.OwDocument
All Implemented Interfaces:
OwAttributeBag, OwAttributeBagWriteable
Direct Known Subclasses:
OwMasterDocument, OwObjectLinksDocument, OwPermissionsDocument, OwPolicyLevelDocument, OwPrivilegesDocument, OwPrivilegeSetEditorDocument, OwSplitObjectListDocument

public class OwDocument
extends OwEventTarget
implements OwAttributeBagWriteable

Document Base Class. Documents can share several Views.

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  ArrayList m_ViewList
          list of attached views if any
 
Constructor Summary
OwDocument()
           
 
Method Summary
 void attachView(OwUpdateTarget view_p)
          attach a view to the document, which will receive onUpdate events when OwDocument.Update is called
 int attributecount()
          (implements OwAttributeBagWriteable) get non persistent attributes count NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 void clear()
          (implements OwAttributeBagWriteable) clear non persistent attributes NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 void detachView(OwUpdateTarget view_p)
          detach a view to the document, which will receive onUpdate events when OwDocument.Update is called
 Object getAttribute(int iIndex_p)
          (implements OwAttributeBagWriteable) get non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 Object getAttribute(String strName_p)
          (implements OwAttributeBagWriteable) get non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 Collection getAttributeNames()
          (implements OwAttributeBagWriteable) get non persistent attribute names NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 OwAttributeBagWriteable getPersistentAttributeBagWriteable()
          (overridable) get a persistent OwAttributeBagWriteable (application scope) NOTE: use the OwAttributeBagWriteable implementation of this class to access non persistent (session scope) scalars
 Object getSafeAttribute(String strName_p, Object default_p)
          (implements OwAttributeBagWriteable) get non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 boolean hasAttribute(String strName_p)
          (implements OwAttributeBagWriteable) check for non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
protected  void init()
          init the target after the context is set.
 void remove(String strName_p)
          (implements OwAttributeBagWriteable) remove non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 void save()
          (implements OwAttributeBagWriteable) save non persistent attributes, does nothing NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 void setAttribute(String strName_p, Object value_p)
          (implements OwAttributeBagWriteable) set non persistent attributes NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable
 void update(OwEventTarget caller_p, int iCode_p, Object param_p)
          causes all attached views to receive an onUpdate event
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getFormName, getFormTarget, getID, onExternalRequest, onFormEvent, onRequest, setExternalFormTarget, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_ViewList

protected ArrayList m_ViewList
list of attached views if any

Constructor Detail

OwDocument

public OwDocument()
Method Detail

init

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

Specified by:
init in class OwEventTarget
Throws:
Exception

attachView

public void attachView(OwUpdateTarget view_p)
attach a view to the document, which will receive onUpdate events when OwDocument.Update is called

Parameters:
view_p - OwView to receive onUpdate events

detachView

public void detachView(OwUpdateTarget view_p)
detach a view to the document, which will receive onUpdate events when OwDocument.Update is called

Parameters:
view_p - OwView to detach

update

public void update(OwEventTarget caller_p,
                   int iCode_p,
                   Object param_p)
            throws Exception
causes all attached views to receive an onUpdate event

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

getPersistentAttributeBagWriteable

public OwAttributeBagWriteable getPersistentAttributeBagWriteable()
                                                           throws Exception
(overridable) get a persistent OwAttributeBagWriteable (application scope) NOTE: use the OwAttributeBagWriteable implementation of this class to access non persistent (session scope) scalars

Returns:
OwAttributeBagWriteable to read and write persistent scalars
Throws:
Exception

clear

public void clear()
           throws Exception
(implements OwAttributeBagWriteable) clear non persistent attributes NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
clear in interface OwAttributeBagWriteable
Throws:
Exception

remove

public void remove(String strName_p)
(implements OwAttributeBagWriteable) remove non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
remove in interface OwAttributeBagWriteable
Parameters:
strName_p - String name of attribute

save

public void save()
          throws Exception
(implements OwAttributeBagWriteable) save non persistent attributes, does nothing NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
save in interface OwAttributeBagWriteable
Throws:
Exception

setAttribute

public void setAttribute(String strName_p,
                         Object value_p)
                  throws Exception
(implements OwAttributeBagWriteable) set non persistent attributes NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
setAttribute in interface OwAttributeBagWriteable
Throws:
Exception

attributecount

public int attributecount()
(implements OwAttributeBagWriteable) get non persistent attributes count NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
attributecount in interface OwAttributeBag

getAttribute

public Object getAttribute(int iIndex_p)
                    throws Exception
(implements OwAttributeBagWriteable) get non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
getAttribute in interface OwAttributeBag
Parameters:
iIndex_p - int index
Returns:
Object
Throws:
Exception

getAttribute

public Object getAttribute(String strName_p)
                    throws Exception
(implements OwAttributeBagWriteable) get non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
getAttribute in interface OwAttributeBag
Throws:
Exception

getAttributeNames

public Collection getAttributeNames()
(implements OwAttributeBagWriteable) get non persistent attribute names NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
getAttributeNames in interface OwAttributeBag

getSafeAttribute

public Object getSafeAttribute(String strName_p,
                               Object default_p)
(implements OwAttributeBagWriteable) get non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
getSafeAttribute in interface OwAttributeBag

hasAttribute

public boolean hasAttribute(String strName_p)
(implements OwAttributeBagWriteable) check for non persistent attribute NOTE: use getPersistentAttributeBagWriteable() to obtain a persistent OwAttributeBagWriteable

Specified by:
hasAttribute in interface OwAttributeBag


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.