org.exoplatform.calendar.webui.popup
Class UISharedForm

java.lang.Object
  extended by org.exoplatform.webui.core.UIComponent
      extended by org.exoplatform.webui.core.UIContainer
          extended by org.exoplatform.webui.form.UIForm
              extended by org.exoplatform.calendar.webui.popup.UISharedForm
All Implemented Interfaces:
UIPopupComponent

public class UISharedForm
extends org.exoplatform.webui.form.UIForm
implements UIPopupComponent

Created by The eXo Platform SARL Author : Hung Nguyen hung.nguyen@exoplatform.com Aus 01, 2007 2:48:18 PM
modified by: Anh-Tu NGUYEN


Nested Class Summary
static class UISharedForm.AddEntryActionListener
           
static class UISharedForm.CancelActionListener
           
static class UISharedForm.DeleteEntryActionListener
           
static class UISharedForm.OpenSelectGroupFormActionListener
           
static class UISharedForm.OpenSelectMembershipFormActionListener
          open select membership popup
static class UISharedForm.OpenSelectUserFormActionListener
           
static class UISharedForm.Permission
          represents a permission with its owner and his status of edit permission
static class UISharedForm.PermissionOwner
           
static class UISharedForm.SaveActionListener
           
static class UISharedForm.SelectGroupActionListener
           
static class UISharedForm.SelectMembershipActionListener
           
static class UISharedForm.SelectUserActionListener
           
 
Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer
org.exoplatform.webui.core.UIContainer.SelectTabActionListener
 
Field Summary
static String ADD_ENTRY
           
static String ADD_ICON
           
static String CLOSE
           
static String DELETE_ENTRY
           
static String GROUP_ICON
           
static String INPUT_PERMISSION_OWNER
           
static String INPUT_PERMISSION_OWNER_LABEL
           
protected  boolean isAddNew_
           
static String MEMBERSHIP_ICON
           
static String OPEN_SELECT_GROUP_FORM
           
static String OPEN_SELECT_MEMBERSHIP_FORM
           
static String OPEN_SELECT_USER_FORM
           
static String PERMISSION_ENTRY
           
static String PERMISSION_GRID
           
static String POPUP_GROUP_MEMBERSHIP_SELECTOR
           
static String POPUP_USER_SELECTOR
           
static String SAVE
           
static int TYPE_BUTTON
           
static String USER_ICON
           
 
Fields inherited from class org.exoplatform.webui.form.UIForm
ACTION, SUBCOMPONENT_ID
 
Fields inherited from class org.exoplatform.webui.core.UIComponent
AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent
 
Constructor Summary
UISharedForm()
           
 
Method Summary
 void activate()
           
 void addPermission(UISharedForm.Permission aPermission)
          add a permission to be displayed
static boolean canUserEditCalendar(String userId, org.exoplatform.calendar.service.Calendar calendar)
           
 boolean containsPermission(String permissionId)
          check whether the permission is included in the Permission Grid
 void deActivate()
           
 Set<org.exoplatform.webui.form.UIFormInputWithActions.ActionData> getActionField(String fieldName)
           
 Set<UISharedForm.Permission> getCalendarPermissions()
           
 String getLabel(String id)
           
static Set<String> getUsersAbleToEditSharedCalendar(org.exoplatform.calendar.service.Calendar calendar)
          check edit permission of user on shared calendar
 void init(String username, org.exoplatform.calendar.service.Calendar calendar, boolean isAddNew)
          init the shared form
 void removePermission(String permissionId)
          remove a permission from the grid
 void setActionField(String fieldName, Set<org.exoplatform.webui.form.UIFormInputWithActions.ActionData> actions)
           
 void updatePermissionOwnerInputWith(String permissionId)
          update the value of the permission input after selecting permission from popup
 
Methods inherited from class org.exoplatform.webui.form.UIForm
addUIComponentInput, addUIFormInput, addUIFormInput, begin, end, event, event, event, getActions, getLabel, getSubmitAction, getUICheckBoxInput, getUIComponentName, getUIFormCheckBoxInput, getUIFormDateTimeInput, getUIFormInputInfo, getUIFormSelectBox, getUIFormTextAreaInput, getUIInput, getUIStringInput, invokeGetBindingBean, invokeSetBindingBean, isMultipart, processRender, renderField, renderField, reset, setActions, setMultiPart, setSubmitAction, url
 
Methods inherited from class org.exoplatform.webui.core.UIContainer
addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypes
 
Methods inherited from class org.exoplatform.webui.core.UIComponent
broadcast, createEvent, createUIComponent, createUIComponent, createUIComponent, doAsync, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getName, getParent, getTemplate, getTemplateResourceResolver, isRendered, loadConfirmMesssage, processAction, processDecode, renderEventURL, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibling, url, url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isAddNew_

protected boolean isAddNew_

PERMISSION_GRID

public static final String PERMISSION_GRID
See Also:
Constant Field Values

PERMISSION_ENTRY

public static final String PERMISSION_ENTRY
See Also:
Constant Field Values

POPUP_USER_SELECTOR

public static final String POPUP_USER_SELECTOR
See Also:
Constant Field Values

POPUP_GROUP_MEMBERSHIP_SELECTOR

public static final String POPUP_GROUP_MEMBERSHIP_SELECTOR
See Also:
Constant Field Values

OPEN_SELECT_USER_FORM

public static final String OPEN_SELECT_USER_FORM
See Also:
Constant Field Values

OPEN_SELECT_MEMBERSHIP_FORM

public static final String OPEN_SELECT_MEMBERSHIP_FORM
See Also:
Constant Field Values

OPEN_SELECT_GROUP_FORM

public static final String OPEN_SELECT_GROUP_FORM
See Also:
Constant Field Values

ADD_ENTRY

public static final String ADD_ENTRY
See Also:
Constant Field Values

DELETE_ENTRY

public static final String DELETE_ENTRY
See Also:
Constant Field Values

USER_ICON

public static final String USER_ICON
See Also:
Constant Field Values

MEMBERSHIP_ICON

public static final String MEMBERSHIP_ICON
See Also:
Constant Field Values

GROUP_ICON

public static final String GROUP_ICON
See Also:
Constant Field Values

ADD_ICON

public static final String ADD_ICON
See Also:
Constant Field Values

INPUT_PERMISSION_OWNER

public static final String INPUT_PERMISSION_OWNER
See Also:
Constant Field Values

INPUT_PERMISSION_OWNER_LABEL

public static final String INPUT_PERMISSION_OWNER_LABEL
See Also:
Constant Field Values

TYPE_BUTTON

public static final int TYPE_BUTTON
See Also:
Constant Field Values

SAVE

public static final String SAVE
See Also:
Constant Field Values

CLOSE

public static final String CLOSE
See Also:
Constant Field Values
Constructor Detail

UISharedForm

public UISharedForm()
             throws Exception
Throws:
Exception
Method Detail

getCalendarPermissions

public Set<UISharedForm.Permission> getCalendarPermissions()

addPermission

public void addPermission(UISharedForm.Permission aPermission)
                   throws Exception
add a permission to be displayed

Parameters:
aPermission -
Throws:
Exception

containsPermission

public boolean containsPermission(String permissionId)
check whether the permission is included in the Permission Grid

Parameters:
permissionId -
Returns:

removePermission

public void removePermission(String permissionId)
remove a permission from the grid


setActionField

public void setActionField(String fieldName,
                           Set<org.exoplatform.webui.form.UIFormInputWithActions.ActionData> actions)
                    throws Exception
Throws:
Exception

getActionField

public Set<org.exoplatform.webui.form.UIFormInputWithActions.ActionData> getActionField(String fieldName)

activate

public void activate()
              throws Exception
Specified by:
activate in interface UIPopupComponent
Throws:
Exception

deActivate

public void deActivate()
                throws Exception
Specified by:
deActivate in interface UIPopupComponent
Throws:
Exception

init

public void init(String username,
                 org.exoplatform.calendar.service.Calendar calendar,
                 boolean isAddNew)
          throws Exception
init the shared form

Parameters:
username -
calendar -
isAddNew -
Throws:
Exception

getLabel

public String getLabel(String id)
Overrides:
getLabel in class org.exoplatform.webui.form.UIForm

updatePermissionOwnerInputWith

public void updatePermissionOwnerInputWith(String permissionId)
                                    throws Exception
update the value of the permission input after selecting permission from popup

Parameters:
permissionId -
Throws:
Exception

getUsersAbleToEditSharedCalendar

public static Set<String> getUsersAbleToEditSharedCalendar(org.exoplatform.calendar.service.Calendar calendar)
                                                    throws Exception
check edit permission of user on shared calendar

Parameters:
calendar -
Returns:
Throws:
Exception

canUserEditCalendar

public static boolean canUserEditCalendar(String userId,
                                          org.exoplatform.calendar.service.Calendar calendar)
                                   throws Exception
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.