Class ProcessAccessBean
java.lang.Object
de.xima.fc.inbox.bean.ProcessAccessBean
- All Implemented Interfaces:
IDataContainer, Serializable
@ViewScoped
@Named
public class ProcessAccessBean
extends Object
implements Serializable, IDataContainer
- Since:
- 8.4.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteAccess(FormRecordAccess access) Deletes the given access from the database.getAccessDisplayName(FormRecordAccess access) Returns the display name of the user associated with the given access.Returns a list ofFormRecordAccessfor the current form record.getAccessUser(FormRecordAccess access) Returns aUserViewModelfor the given access.Returns a list ofUserViewModelfor the current form record.booleanChecks if the current form record has any accesses.booleanisExpired(FormRecordAccess access) Checks if the access is expired.booleanisSubmitter(FormRecordAccess access) Checks if the user is a submitter of the form record.toReadableDate(Instant instant) Converts the given instant to a readable date string.voidShould update data when called
-
Constructor Details
-
ProcessAccessBean
public ProcessAccessBean()
-
-
Method Details
-
hasAccesses
public boolean hasAccesses()Checks if the current form record has any accesses.- Returns:
- true if the form record has accesses, false otherwise
-
getAccesses
Returns a list ofFormRecordAccessfor the current form record. The list is loaded from the database if it is null.- Returns:
- the list of
FormRecordAccessfor the current form record
-
getAccessUsers
Returns a list ofUserViewModelfor the current form record. The list is loaded from the database if it is null.- Returns:
- the list of
UserViewModelfor the current form record and all users with access to it.
-
getAccessUser
Returns aUserViewModelfor the given access. If the user is not found, it creates a newUserViewModelwith the access.- Parameters:
access- the access to check- Returns:
- the
UserViewModelfor the access
-
getAccessDisplayName
Returns the display name of the user associated with the given access. If the user is not found or has no display name, it returns a default value.- Parameters:
access- the access to check- Returns:
- the display name of the user, or a default value if not found
-
deleteAccess
Deletes the given access from the database. This method is used to remove access rights for a user.- Parameters:
access- the access to delete
-
isExpired
Checks if the access is expired. An access is considered expired if the accessGrantedUntil field is not null and the current time is after the accessGrantedUntil time.- Parameters:
access- the access to check- Returns:
- true if the access is expired, false otherwise
-
toReadableDate
-
isSubmitter
Checks if the user is a submitter of the form record.- Parameters:
access- the access to check- Returns:
- true if the user's access grant type is REVIEW or PROVIDE , false otherwise
-
getAccessGrantTypeTooltip
- Parameters:
access- the access to check- Returns:
- Returns a tooltip string for the access grant type of the given access.
-
updateData
public void updateData()Description copied from interface:IDataContainerShould update data when called- Specified by:
updateDatain interfaceIDataContainer
-