pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core.accesscontrol.admin
Class UserEditor

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.core.accesscontrol.admin.AbstractAccessControlEditor
          extended by org.torweg.pulse.component.core.accesscontrol.admin.UserEditor
All Implemented Interfaces:
DeprecatedConfigurable

public class UserEditor
extends AbstractAccessControlEditor
implements DeprecatedConfigurable

the editor for a User of the access-control. This editor is shown as a tab of the CENTER-panel pulse-web-site-administration.

Version:
$Revision: 2022 $
Author:
Daniel Dietz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Field Summary
 
Fields inherited from class org.torweg.pulse.component.core.accesscontrol.admin.AbstractAccessControlEditor
LOGGER
 
Constructor Summary
UserEditor()
           
 
Method Summary
 void changePassword(Bundle bundle, ServiceRequest request)
          sets a new password for a User within the pulse -web-site-administration.
 void createUser(Bundle bundle, ServiceRequest request)
          creates a new User within the access-control of the pulse-web-site-administration.
 void deleteUser(Bundle bundle, ServiceRequest request)
          saves value changes for a User of the access-control of the pulse-web-site-administration.
 void init(ConfigBean c)
          initializes the UserEditor.
 AccessControlEditorResult initEditor(Bundle bundle, ServiceRequest request)
          Initializes the editor for a User within the pulse -web-site-administration.
 Result initOverview(Bundle bundle, ServiceRequest request)
          initializes the User-overview-grid within the pulse -web-site-administration.
 Result loadAttribute(Bundle bundle, ServiceRequest request)
          loads an attribute for the users' attribute-editor and the the attribute-values for the user.
 Result loadGrid(Bundle bundle, ServiceRequest request)
          loads the data for the User-overview-grid within the pulse-web-site-administration.
 void loadGroups(Bundle bundle, ServiceRequest request)
          loads the Groups of a User specified by request-parameter "id" for the groups-assorter of the user-editor within the pulse-web-site-administration.
 void loadPermissions(Bundle bundle, ServiceRequest request)
          loads the Permissions of a User specified by request-parameter "id" for the permissions-assorter of the user-editor within the pulse-web-site-administration.
 void loadRoles(Bundle bundle, ServiceRequest request)
          loads the Roles of a User specified by request-parameter "id" for the roles-assorter of the user-editor within the pulse-web-site-administration.
 void saveUser(Bundle bundle, ServiceRequest request)
          saves value changes for a User of the access-control of the pulse-web-site-administration.
 void toggleUserState(Bundle bundle, ServiceRequest request)
          toggles the active-state of a User within the pulse -web-site-administration.
 
Methods inherited from class org.torweg.pulse.component.core.accesscontrol.admin.AbstractAccessControlEditor
buildCriterionFromRequest, buildIdCriterionFromRequest, buildLoadAssorterCriteria, buildLoadAssorterCriteria, getReqParamIgnoreEmptyValue, getReqParamOrNullIfValueEmpty, loadAssorterData, loadAssorterData, processCriteriaForPaging, retrieveAssorterObjects
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserEditor

public UserEditor()
Method Detail

initOverview

@RequireToken
@Action(value="userOverviewInit", generate=true)
@Permission(value="userOverviewInit")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final Result initOverview(Bundle bundle, ServiceRequest request)
initializes the User-overview-grid within the pulse -web-site-administration.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialization Result for the UserEditor

loadGrid

@RequireToken
@Action(value="loadUserOverviewGrid", generate=true)
@Permission(value="loadUserOverviewGrid")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final Result loadGrid(Bundle bundle, ServiceRequest request)
loads the data for the User-overview-grid within the pulse-web-site-administration.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
a JSON-response

createUser

@RequireToken
@Action(value="createUserEditor", generate=true)
@Permission(value="createUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void createUser(Bundle bundle, ServiceRequest request)
creates a new User within the access-control of the pulse-web-site-administration.

possible errors:

Sends a JSON-response with the id and FQ-class-name of the new user on success, JSONObject error otherwise.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

initEditor

@RequireToken
@Action(value="initUserEditor", generate=true)
@Permission(value="initUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final AccessControlEditorResult initEditor(Bundle bundle, ServiceRequest request)
Initializes the editor for a User within the pulse -web-site-administration.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialization Result for the AccessControlEditor

saveUser

@RequireToken
@Action(value="saveUserEditor", generate=true)
@Permission(value="saveUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void saveUser(Bundle bundle, ServiceRequest request)
saves value changes for a User of the access-control of the pulse-web-site-administration.

possible errors:

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

deleteUser

@RequireToken
@Action(value="deleteUserEditor", generate=true)
@Permission(value="deleteUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void deleteUser(Bundle bundle, ServiceRequest request)
saves value changes for a User of the access-control of the pulse-web-site-administration.

possible errors:

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

toggleUserState

@RequireToken
@Action(value="toggleStateUserEditor", generate=true)
@Permission(value="toggleStateUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void toggleUserState(Bundle bundle, ServiceRequest request)
toggles the active-state of a User within the pulse -web-site-administration.

possible errors:

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

changePassword

@RequireToken
@Action(value="changePasswordUserEditor", generate=true)
@Permission(value="editUsers")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void changePassword(Bundle bundle, ServiceRequest request)
sets a new password for a User within the pulse -web-site-administration.

possible errors:

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadRoles

@RequireToken
@Action(value="loadRolesUserEditor", generate=true)
@Permission(value="loadRolesUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void loadRoles(Bundle bundle, ServiceRequest request)
loads the Roles of a User specified by request-parameter "id" for the roles-assorter of the user-editor within the pulse-web-site-administration.

Use: load the associated and the un-associated roles of the user according to given request-parameter "unasoc" (default false).

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadGroups

@RequireToken
@Action(value="loadGroupsUserEditor", generate=true)
@Permission(value="loadGroupsUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void loadGroups(Bundle bundle, ServiceRequest request)
loads the Groups of a User specified by request-parameter "id" for the groups-assorter of the user-editor within the pulse-web-site-administration.

Use: load the associated and the un-associated groups of the user according to given request-parameter "unasoc" (default false).

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadPermissions

@RequireToken
@Action(value="loadPermissionsUserEditor", generate=true)
@Permission(value="loadPermissionsUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final void loadPermissions(Bundle bundle, ServiceRequest request)
loads the Permissions of a User specified by request-parameter "id" for the permissions-assorter of the user-editor within the pulse-web-site-administration.

Use: load the associated and the un-associated permissions of the user according to given request-parameter "unasoc" (default false).

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadAttribute

@RequireToken
@Action(value="loadAttributeUserEditor", generate=true)
@Permission(value="loadAttributeUserEditor")
@Groups(values={"AccessControl:Administrator","AccessControl:UserEditor"})
public final Result loadAttribute(Bundle bundle, ServiceRequest request)
loads an attribute for the users' attribute-editor and the the attribute-values for the user.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
null

init

public final void init(ConfigBean c)
initializes the UserEditor.

Specified by:
init in interface DeprecatedConfigurable
Parameters:
c - the ConfigBean of this Controller