org.alfresco.web.bean.users
Class CreateUserWizard

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.wizard.BaseWizardBean
          extended by org.alfresco.web.bean.users.CreateUserWizard
All Implemented Interfaces:
java.io.Serializable, IDialogBean, IWizardBean
Direct Known Subclasses:
EditUserWizard

public class CreateUserWizard
extends BaseWizardBean

See Also:
Serialized Form

Field Summary
protected  java.lang.String companyId
           
protected  java.lang.String confirm
           
protected  java.lang.String email
           
protected static java.lang.String ERROR
           
protected static java.lang.String ERROR_DOMAIN_MISMATCH
           
protected  java.lang.String firstName
          form variables
protected  org.alfresco.service.cmr.repository.NodeRef homeSpaceLocation
           
protected  java.lang.String homeSpaceName
           
protected  java.lang.String jobtitle
           
protected  java.lang.String lastName
           
protected  java.lang.String location
           
protected  java.lang.String organisation
           
protected  java.lang.String password
           
protected  java.lang.String presenceProvider
           
protected  java.lang.String presenceUsername
           
protected static java.lang.String QUOTA_UNITS_GB
           
protected static java.lang.String QUOTA_UNITS_KB
           
protected static java.lang.String QUOTA_UNITS_MB
           
protected  java.lang.Long sizeQuota
           
protected  java.lang.String sizeQuotaUnits
           
protected  java.lang.String userName
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
CreateUserWizard()
           
 
Method Summary
 boolean checkTenantUserName()
           
protected  org.alfresco.util.Pair convertFromBytes(long size)
           
protected  long convertToBytes(long size, java.lang.String units)
           
protected  org.alfresco.service.cmr.repository.NodeRef createHomeSpace(java.lang.String locationId, java.lang.String spaceName, org.alfresco.service.cmr.repository.NodeRef oldHomeFolderRef, boolean error)
          Create the specified home space if it does not exist, and return the ID
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
protected  org.alfresco.service.cmr.repository.NodeRef getCompanyHomeSpace()
          Helper to return the company home space
 java.lang.String getCompanyId()
           
 java.lang.String getConfirm()
           
protected  org.alfresco.service.cmr.repository.NodeRef getDefaultHomeSpace()
           
 java.lang.String getEmail()
           
 boolean getFinishButtonDisabled()
          Determines whether the finish button on the dialog should be disabled
 java.lang.String getFirstName()
           
 org.alfresco.service.cmr.repository.NodeRef getHomeSpaceLocation()
           
 java.lang.String getHomeSpaceName()
           
 java.lang.String getJobtitle()
           
 java.lang.String getLastName()
           
 java.lang.String getLocation()
           
 java.lang.String getOrganization()
           
 java.lang.String getPassword()
           
 java.util.Map getPersonPropertiesImmutability()
           
 java.lang.String getPresenceProvider()
           
 java.lang.String getPresenceUsername()
           
 java.lang.Long getSizeQuota()
           
 java.lang.String getSizeQuotaUnits()
           
 java.lang.String getSummary()
           
 java.lang.String getUserName()
           
 void init(java.util.Map params)
          Initialises the wizard
 java.lang.String next()
          Called when the next button is pressed by the user
protected  void putSizeQuotaProperty(java.lang.String userName, java.lang.Long quota, java.lang.String quotaUnits)
           
 void setAuthenticationService(org.alfresco.service.cmr.security.MutableAuthenticationService authenticationService)
           
 void setCompanyId(java.lang.String companyId)
           
 void setConfirm(java.lang.String confirm)
           
 void setContentUsageService(org.alfresco.service.cmr.usage.ContentUsageService contentUsageService)
           
 void setEmail(java.lang.String email)
           
 void setFirstName(java.lang.String firstName)
           
 void setHomeSpaceLocation(org.alfresco.service.cmr.repository.NodeRef homeSpaceLocation)
           
 void setHomeSpaceName(java.lang.String homeSpaceName)
           
 void setJobtitle(java.lang.String jobtitle)
           
 void setLastName(java.lang.String lastName)
           
 void setLocation(java.lang.String location)
           
 void setOrganization(java.lang.String organisation)
           
 void setOwnableService(org.alfresco.service.cmr.security.OwnableService ownableService)
           
 void setPassword(java.lang.String password)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
protected  void setPersonPropertiesAndCreateHomeSpaceIfNeeded(java.util.Map props, org.alfresco.service.cmr.repository.NodeRef oldHomeFolderRef, javax.faces.context.FacesContext context)
           
 void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
           
 void setPresenceProvider(java.lang.String presenceProvider)
           
 void setPresenceUsername(java.lang.String presenceUsername)
           
 void setSizeQuota(java.lang.Long sizeQuota)
           
 void setSizeQuotaUnits(java.lang.String sizeQuotaUnits)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 void setupUsers(javax.faces.event.ActionEvent event)
          Init the users screen
 void setUserName(java.lang.String userName)
           
 void validatePassword(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Validate password field data is acceptable
 void validateUsername(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Validate Username field data is acceptable
 
Methods inherited from class org.alfresco.web.bean.wizard.BaseWizardBean
back, buildSummary, getBackButtonLabel, getDefaultCancelOutcome, getDefaultFinishOutcome, getFinishButtonLabel, getNextButtonDisabled, getNextButtonLabel, getStepDescription, getStepTitle
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, restored, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.web.bean.dialog.IDialogBean
cancel, finish, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getContainerDescription, getContainerSubTitle, getContainerTitle, getMoreActionsConfigId, isFinished, restored
 

Field Detail

ERROR

protected static final java.lang.String ERROR
See Also:
Constant Field Values

ERROR_DOMAIN_MISMATCH

protected static final java.lang.String ERROR_DOMAIN_MISMATCH
See Also:
Constant Field Values

QUOTA_UNITS_KB

protected static final java.lang.String QUOTA_UNITS_KB
See Also:
Constant Field Values

QUOTA_UNITS_MB

protected static final java.lang.String QUOTA_UNITS_MB
See Also:
Constant Field Values

QUOTA_UNITS_GB

protected static final java.lang.String QUOTA_UNITS_GB
See Also:
Constant Field Values

firstName

protected java.lang.String firstName
form variables


lastName

protected java.lang.String lastName

userName

protected java.lang.String userName

password

protected java.lang.String password

confirm

protected java.lang.String confirm

email

protected java.lang.String email

companyId

protected java.lang.String companyId

homeSpaceName

protected java.lang.String homeSpaceName

homeSpaceLocation

protected org.alfresco.service.cmr.repository.NodeRef homeSpaceLocation

presenceProvider

protected java.lang.String presenceProvider

presenceUsername

protected java.lang.String presenceUsername

organisation

protected java.lang.String organisation

jobtitle

protected java.lang.String jobtitle

location

protected java.lang.String location

sizeQuota

protected java.lang.Long sizeQuota

sizeQuotaUnits

protected java.lang.String sizeQuotaUnits
Constructor Detail

CreateUserWizard

public CreateUserWizard()
Method Detail

setAuthenticationService

public void setAuthenticationService(org.alfresco.service.cmr.security.MutableAuthenticationService authenticationService)
Parameters:
authenticationService - The AuthenticationService to set.

setPersonService

public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
Parameters:
personService - The person service.

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
Parameters:
tenantService - The tenantService to set.

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Parameters:
permissionService - The PermissionService to set.

setOwnableService

public void setOwnableService(org.alfresco.service.cmr.security.OwnableService ownableService)
Parameters:
ownableService - The ownableService to set.

setContentUsageService

public void setContentUsageService(org.alfresco.service.cmr.usage.ContentUsageService contentUsageService)
Parameters:
contentUsageService - The contentUsageService to set.

init

public void init(java.util.Map params)
Initialises the wizard

Specified by:
init in interface IDialogBean
Overrides:
init in class BaseDialogBean
Parameters:
params - Map of parameters for the dialog

next

public java.lang.String next()
Description copied from interface: IWizardBean
Called when the next button is pressed by the user

Specified by:
next in interface IWizardBean
Overrides:
next in class BaseWizardBean
Returns:
Reserved for future use

getSummary

public java.lang.String getSummary()
Returns:
Returns the summary data for the wizard.

setupUsers

public void setupUsers(javax.faces.event.ActionEvent event)
Init the users screen


getCompanyId

public java.lang.String getCompanyId()
Returns:
Returns the companyId.

setCompanyId

public void setCompanyId(java.lang.String companyId)
Parameters:
companyId - The companyId to set.

getPresenceProvider

public java.lang.String getPresenceProvider()
Returns:
Returns the presenceProvider.

setPresenceProvider

public void setPresenceProvider(java.lang.String presenceProvider)
Parameters:
presenceProvider - The presenceProvider to set.

getPresenceUsername

public java.lang.String getPresenceUsername()
Returns:
Returns the presenceUsername.

setPresenceUsername

public void setPresenceUsername(java.lang.String presenceUsername)
Parameters:
presenceUsername - The presenceUsername to set.

getEmail

public java.lang.String getEmail()
Returns:
Returns the email.

setEmail

public void setEmail(java.lang.String email)
Parameters:
email - The email to set.

getFirstName

public java.lang.String getFirstName()
Returns:
Returns the firstName.

setFirstName

public void setFirstName(java.lang.String firstName)
Parameters:
firstName - The firstName to set.

getHomeSpaceLocation

public org.alfresco.service.cmr.repository.NodeRef getHomeSpaceLocation()
Returns:
Returns the homeSpaceLocation.

setHomeSpaceLocation

public void setHomeSpaceLocation(org.alfresco.service.cmr.repository.NodeRef homeSpaceLocation)
Parameters:
homeSpaceLocation - The homeSpaceLocation to set.

getHomeSpaceName

public java.lang.String getHomeSpaceName()
Returns:
Returns the homeSpaceName.

setHomeSpaceName

public void setHomeSpaceName(java.lang.String homeSpaceName)
Parameters:
homeSpaceName - The homeSpaceName to set.

getLastName

public java.lang.String getLastName()
Returns:
Returns the lastName.

setLastName

public void setLastName(java.lang.String lastName)
Parameters:
lastName - The lastName to set.

getUserName

public java.lang.String getUserName()
Returns:
Returns the userName.

setUserName

public void setUserName(java.lang.String userName)
Parameters:
userName - The userName to set.

getPassword

public java.lang.String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - The password to set.

getConfirm

public java.lang.String getConfirm()
Returns:
Returns the confirm password.

setConfirm

public void setConfirm(java.lang.String confirm)
Parameters:
confirm - The confirm password to set.

getJobtitle

public java.lang.String getJobtitle()
Returns:
the jobtitle

setJobtitle

public void setJobtitle(java.lang.String jobtitle)
Parameters:
jobtitle - the jobtitle to set

getLocation

public java.lang.String getLocation()
Returns:
the location

setLocation

public void setLocation(java.lang.String location)
Parameters:
location - the location to set

getOrganization

public java.lang.String getOrganization()
Returns:
the organisation

setOrganization

public void setOrganization(java.lang.String organisation)
Parameters:
organisation - the organisation to set

getSizeQuota

public java.lang.Long getSizeQuota()

setSizeQuota

public void setSizeQuota(java.lang.Long sizeQuota)

getSizeQuotaUnits

public java.lang.String getSizeQuotaUnits()

setSizeQuotaUnits

public void setSizeQuotaUnits(java.lang.String sizeQuotaUnits)

validatePassword

public void validatePassword(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component,
                             java.lang.Object value)
                      throws javax.faces.validator.ValidatorException
Validate password field data is acceptable

Throws:
javax.faces.validator.ValidatorException

validateUsername

public void validateUsername(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component,
                             java.lang.Object value)
                      throws javax.faces.validator.ValidatorException
Validate Username field data is acceptable

Throws:
javax.faces.validator.ValidatorException

getCompanyHomeSpace

protected org.alfresco.service.cmr.repository.NodeRef getCompanyHomeSpace()
Helper to return the company home space

Returns:
company home space NodeRef

getDefaultHomeSpace

protected org.alfresco.service.cmr.repository.NodeRef getDefaultHomeSpace()

createHomeSpace

protected org.alfresco.service.cmr.repository.NodeRef createHomeSpace(java.lang.String locationId,
                                                                      java.lang.String spaceName,
                                                                      org.alfresco.service.cmr.repository.NodeRef oldHomeFolderRef,
                                                                      boolean error)
Create the specified home space if it does not exist, and return the ID

Parameters:
locationId - Parent location
spaceName - Home space to create, can be null to simply return the parent
oldHomeFolderRef - the previous home space, for the case where the the user is being updated. It may not have changed.
error - True to throw an error if the space already exists, else ignore and return
Returns:
ID of the home space

finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Throwable
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Throwable

setPersonPropertiesAndCreateHomeSpaceIfNeeded

protected void setPersonPropertiesAndCreateHomeSpaceIfNeeded(java.util.Map props,
                                                             org.alfresco.service.cmr.repository.NodeRef oldHomeFolderRef,
                                                             javax.faces.context.FacesContext context)

getFinishButtonDisabled

public boolean getFinishButtonDisabled()
Description copied from interface: IDialogBean
Determines whether the finish button on the dialog should be disabled

Specified by:
getFinishButtonDisabled in interface IDialogBean
Overrides:
getFinishButtonDisabled in class BaseDialogBean
Returns:
true if the button should be disabled

putSizeQuotaProperty

protected void putSizeQuotaProperty(java.lang.String userName,
                                    java.lang.Long quota,
                                    java.lang.String quotaUnits)

convertToBytes

protected long convertToBytes(long size,
                              java.lang.String units)

convertFromBytes

protected org.alfresco.util.Pair convertFromBytes(long size)

checkTenantUserName

public boolean checkTenantUserName()

getPersonPropertiesImmutability

public java.util.Map getPersonPropertiesImmutability()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.