@Name(value="certActions") @Scope(value=CONVERSATION) public class CertActions extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected DocumentModel |
certificate |
protected CertService |
certService |
protected NuxeoPrincipal |
currentUser |
protected CUserService |
cUserService |
protected CoreSession |
documentManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected DocumentModel |
lastVisitedDocument |
protected NavigationContext |
navigationContext |
protected ResourcesAccessor |
resourcesAccessor |
protected UserManager |
userManager |
protected WebActions |
webActions |
Constructor and Description |
---|
CertActions() |
Modifier and Type | Method and Description |
---|---|
String |
backToDocument() |
boolean |
canGenerateCertificate()
Indicates whether a user has the right to generate a certificate.
|
void |
createCertificate(String firstPassword,
String secondPassword)
Launches certificate generation.
|
void |
deleteCertificate() |
void |
downloadRootCertificate() |
DocumentModel |
getCertificate()
Retrieves a user certificate and returns a certificate's document model object
|
protected DocumentModel |
getCurrentUserModel() |
String |
goToCertificateManagement() |
boolean |
hasCertificate()
Checks if a specified user has a certificate
|
boolean |
hasCertificate(DocumentModel user)
Checks if a specified user has a certificate
|
boolean |
hasCertificate(String userID)
Checks if a specified user has a certificate
|
void |
validatePasswords(String firstPassword,
String secondPassword)
Validates that the password follows business rules.
|
void |
validateRequiredUserFields()
Validates user identity fields required for certificate generation NXP-6485
|
@In(create=true) protected transient CertService certService
@In(create=true) protected transient CUserService cUserService
@In(create=true) protected transient NavigationContext navigationContext
@In(create=true, required=false) protected org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true) protected ResourcesAccessor resourcesAccessor
@In(create=true, required=false) protected transient CoreSession documentManager
@In(create=true) protected transient NuxeoPrincipal currentUser
@In(create=true) protected transient UserManager userManager
@In(create=true, required=false) protected WebActions webActions
protected DocumentModel lastVisitedDocument
protected DocumentModel certificate
public CertActions()
public DocumentModel getCertificate()
public boolean hasCertificate(DocumentModel user)
user
- public boolean hasCertificate(String userID)
userID
- public boolean hasCertificate()
public boolean canGenerateCertificate()
user
- public void createCertificate(String firstPassword, String secondPassword)
user
- firstPassword
- secondPassword
- public void deleteCertificate()
public void validatePasswords(String firstPassword, String secondPassword)
The password must be typed in twice correctly, follow minimum length, and be different than the application login password.
The validations are performed in the following sequence cheapest validations first, then the ones requiring more system resources.
firstPassword
- secondPassword
- public void validateRequiredUserFields()
public void downloadRootCertificate() throws CertException
CertException
public String goToCertificateManagement()
public String backToDocument()
protected DocumentModel getCurrentUserModel()
Copyright © 2016 Nuxeo SA. All rights reserved.