com.wewebu.ow.server.ecmimpl.cmis.ui
Class OwCMISUIUserSelectionModul

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.ecm.ui.OwUISubModul
              extended by com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul
                  extended by com.wewebu.ow.server.ecmimpl.cmis.ui.OwCMISUIUserSelectionModul
All Implemented Interfaces:
com.wewebu.ow.server.ui.OwBaseView, com.wewebu.ow.server.ui.OwUpdateTarget

public class OwCMISUIUserSelectionModul
extends com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul

OwCMISUserSelectionModul.
A UI component which is used to retrieve and display different groups, user and/or roles.

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

Since:
3.1.0.0

Nested Class Summary
protected static class OwCMISUIUserSelectionModul.OwCMISInfoItem
          Used only for rendering the list.
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul
com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul.OwEventListner
 
Field Summary
protected static String SEARCH_FIELD_ID
           
protected static String SEARCH_USER_LST
           
 
Fields inherited from class com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul
TYPE_GROUP, TYPE_ROLE, TYPE_USER
 
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
OwCMISUIUserSelectionModul()
           
 
Method Summary
protected  OwCMISUIUserSelectionModul.OwCMISInfoItem createGroupInfo(String name_p)
          Factory method to create a instance representing a group with given name.
protected  OwCMISUIUserSelectionModul.OwCMISInfoItem createRoleInfo(String name_p)
          Factory method to create a instance representing a role with given name.
protected  OwCMISUIUserSelectionModul.OwCMISInfoItem createUserInfo(String name_p)
          Factory method to create a instance representing a user with given name.
protected  OwCMISNetwork getCurrentNetwork()
          Helper to return a OwCMISNetwork, which cast the OwUISubModul.getNetwork() return value to OwCMISNetwork.
 String getCurrentUserID()
           
 List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getExtendedType(int extendedType_p)
          (overridable) Method for additional type search which should be added to the info list (getInfoList()).
 int[] getFilter()
          Return an array of int values, which represents filter for the search.
protected  List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getInfoList()
          List of OwBaseUserInfo containing the users which were retrieved with last search, and filtered by defined getFilter().
protected  String getLastEnteredString()
          Return the last entered string, which was used for searching.
 List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getTypeGroup()
          Method to return a list of user matching the getLastEnteredString(), which will be called if getFilter() contains OwUIUserSelectModul.TYPE_GROUP.
 List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getTypeRole()
          Method to return a list of user matching the getLastEnteredString(), which will be called if getFilter() contains OwUIUserSelectModul.TYPE_ROLE.
 List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getTypeUser()
          Method to return a list of user matching the getLastEnteredString(), which will be called if getFilter() contains OwUIUserSelectModul.TYPE_USER.
protected  void init()
           
 boolean isRoleSelection()
           
 void onRender(Writer w_p)
           
 void onSearch(javax.servlet.http.HttpServletRequest request_p)
           
 void onSelectUser(javax.servlet.http.HttpServletRequest request_p)
           
protected  void renderResultList(Writer w_p)
           
protected  void renderSearchCriteriaBox(Writer w_p)
           
protected  void renderUserSelectButton(Writer w_p)
          Render the button for acceptance of User selection.
 void setCurrentUserID(String currentUserID_p)
           
 void setFilter(int[] filter_p)
          Set the filter value for the next search.
protected  void setLastEneteredString(String content_p)
          Set the value which should be used for search.
protected  String usesFormWithAttributes()
           
 
Methods inherited from class com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul
getDefaultRoleNames, getEventListner, getMultiselect, searchDefaultRoleNames, setEventListner, setMultiselect
 
Methods inherited from class com.wewebu.ow.server.ecm.ui.OwUISubModul
getNetwork, init
 
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, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal
 
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

SEARCH_FIELD_ID

protected static final String SEARCH_FIELD_ID
See Also:
Constant Field Values

SEARCH_USER_LST

protected static final String SEARCH_USER_LST
See Also:
Constant Field Values
Constructor Detail

OwCMISUIUserSelectionModul

public OwCMISUIUserSelectionModul()
Method Detail

getCurrentUserID

public String getCurrentUserID()

init

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

setCurrentUserID

public void setCurrentUserID(String currentUserID_p)

getFilter

public int[] getFilter()
Return an array of int values, which represents filter for the search.

If the filter is null or an empty array, no search will be executed.

Returns:
array of int, can be null
See Also:
OwUIUserSelectModul.TYPE_GROUP, OwUIUserSelectModul.TYPE_ROLE, OwUIUserSelectModul.TYPE_USER

setFilter

public void setFilter(int[] filter_p)
Set the filter value for the next search.

Parameters:
filter_p - array of int representing the types
See Also:
OwUIUserSelectModul.TYPE_GROUP, OwUIUserSelectModul.TYPE_ROLE, OwUIUserSelectModul.TYPE_USER

onRender

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

renderUserSelectButton

protected void renderUserSelectButton(Writer w_p)
                               throws IOException
Render the button for acceptance of User selection.

Parameters:
w_p - Writer to execute rendering
Throws:
IOException

renderSearchCriteriaBox

protected void renderSearchCriteriaBox(Writer w_p)
                                throws Exception
Throws:
Exception

renderResultList

protected void renderResultList(Writer w_p)
                         throws com.wewebu.ow.server.exceptions.OwException
Throws:
com.wewebu.ow.server.exceptions.OwException

usesFormWithAttributes

protected String usesFormWithAttributes()
Overrides:
usesFormWithAttributes in class com.wewebu.ow.server.ui.OwView

getLastEnteredString

protected String getLastEnteredString()
Return the last entered string, which was used for searching. Can return null if no search was executed.

Returns:
String or null

setLastEneteredString

protected void setLastEneteredString(String content_p)
Set the value which should be used for search.

Parameters:
content_p - String

getInfoList

protected List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getInfoList()
List of OwBaseUserInfo containing the users which were retrieved with last search, and filtered by defined getFilter().

Returns:
List of OwBaseUserInfo

onSearch

public void onSearch(javax.servlet.http.HttpServletRequest request_p)
              throws com.wewebu.ow.server.exceptions.OwException
Throws:
com.wewebu.ow.server.exceptions.OwException

onSelectUser

public void onSelectUser(javax.servlet.http.HttpServletRequest request_p)
                  throws Exception
Throws:
Exception

getTypeUser

public List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getTypeUser()
                                                            throws com.wewebu.ow.server.exceptions.OwException
Method to return a list of user matching the getLastEnteredString(), which will be called if getFilter() contains OwUIUserSelectModul.TYPE_USER.

Must return an empty list if no matching entries could be found!

Returns:
List of OwBaseUserInfo
Throws:
com.wewebu.ow.server.exceptions.OwException
See Also:
OwUIUserSelectModul.TYPE_USER

getTypeGroup

public List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getTypeGroup()
                                                             throws com.wewebu.ow.server.exceptions.OwException
Method to return a list of user matching the getLastEnteredString(), which will be called if getFilter() contains OwUIUserSelectModul.TYPE_GROUP.

Must return an empty list if no matching entries could be found!

Returns:
List of OwBaseUserInfo
Throws:
com.wewebu.ow.server.exceptions.OwException
See Also:
OwUIUserSelectModul.TYPE_GROUP

getTypeRole

public List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getTypeRole()
                                                            throws com.wewebu.ow.server.exceptions.OwException
Method to return a list of user matching the getLastEnteredString(), which will be called if getFilter() contains OwUIUserSelectModul.TYPE_ROLE.

Must return an empty list if no matching entries could be found!

Returns:
List of OwBaseUserInfo
Throws:
com.wewebu.ow.server.exceptions.OwException
See Also:
OwUIUserSelectModul.TYPE_ROLE

isRoleSelection

public boolean isRoleSelection()

getExtendedType

public List<OwCMISUIUserSelectionModul.OwCMISInfoItem> getExtendedType(int extendedType_p)
(overridable) Method for additional type search which should be added to the info list (getInfoList()).

This method will return by default an empty list.

Parameters:
extendedType_p - int extended type search
Returns:
List of OwBaseUserInfo

getCurrentNetwork

protected OwCMISNetwork getCurrentNetwork()
Helper to return a OwCMISNetwork, which cast the OwUISubModul.getNetwork() return value to OwCMISNetwork.

Returns:
OwCMISNetwork

createGroupInfo

protected OwCMISUIUserSelectionModul.OwCMISInfoItem createGroupInfo(String name_p)
Factory method to create a instance representing a group with given name.

Parameters:
name_p - String name of group
Returns:
OwBaseUserInfo

createUserInfo

protected OwCMISUIUserSelectionModul.OwCMISInfoItem createUserInfo(String name_p)
Factory method to create a instance representing a user with given name.

Parameters:
name_p - String name of group
Returns:
OwBaseUserInfo

createRoleInfo

protected OwCMISUIUserSelectionModul.OwCMISInfoItem createRoleInfo(String name_p)
Factory method to create a instance representing a role with given name.

Parameters:
name_p - String name of group
Returns:
OwBaseUserInfo


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.