Package com.avoka.fc.core.dao
Class RoleDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.RoleDao
Provides a DAO for the Role entity.
- See Also:
-
Field Summary
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate the pre-defined anonymous role (unless a role with the name defined inRole.ANONYMOUS_ROLE
already exists) and assigns it all permissions associated with the Anonymous Rolevoid
Create the pre-defined root administrator role (unless a role with the name defined inRole.ADMINISTRATOR_ROLE
already exists) and assigns it all permissions associated with the Administration ConsoleCreate the pre-defined service role (unless a role with the name defined inRole.SERVICE_USER_ROLE
already exists) and assigns it all permissions associated with the Service User RolegetAssignableRolesForAdmin
(UserAccount userAccount) Return all roles that the given user is allowed to assign to other users, ordered by name Only active roles will be offered.getGlobalRolesForAdmin
(String userId) Return all non-client assignable user roles associated with the given user accountReturn the role with the specified OIDgetRoleForName
(String name) Return the role with the specified namegetRoleList
(UserAccount userAccount, String keyword, boolean activeOnly) Return the list of roles matching the specified search criteria, ordered by namegetRoleList
(UserAccount userAccount, String keyword, Object portalId, boolean activeOnly) Return the list of roles matching the specified search criteria, ordered by namegetRoles()
Return all roles, ordered by nameMethods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
Constructor Details
-
RoleDao
public RoleDao()
-
-
Method Details
-
getRole
Return the role with the specified OID- Parameters:
id
- the OID- Returns:
- the matching role, or null if not found
-
getRoleList
Return the list of roles matching the specified search criteria, ordered by name- Parameters:
userAccount
- the non-null user accountkeyword
- the search keywordactiveOnly
- whether to return only active roles, or all roles- Returns:
- the list of matching roles
-
getRoleList
public List<Role> getRoleList(UserAccount userAccount, String keyword, Object portalId, boolean activeOnly) Return the list of roles matching the specified search criteria, ordered by name- Parameters:
userAccount
- the non-null user accountkeyword
- the search keywordportalId
- the portalIdactiveOnly
- whether to return only active roles, or all roles- Returns:
- the list of matching roles
- Since:
- 4.3.0
-
getRoleForName
Return the role with the specified name- Parameters:
name
- the role name- Returns:
- the matching role
-
getRoles
Return all roles, ordered by name- Returns:
- the list of all roles, including inactive roles
-
getAssignableRolesForAdmin
Return all roles that the given user is allowed to assign to other users, ordered by name Only active roles will be offered.- Parameters:
userAccount
- the non-null user account- Returns:
- the list of matching roles
-
getGlobalRolesForAdmin
Return all non-client assignable user roles associated with the given user account- Parameters:
userId
- the OID of an existing SmartForm Manager user- Returns:
- the list of matching user roles
-
assignDefaultPermissions
public void assignDefaultPermissions()Create the pre-defined root administrator role (unless a role with the name defined inRole.ADMINISTRATOR_ROLE
already exists) and assigns it all permissions associated with the Administration Console -
assignDefaultAnonymousPermissions
Create the pre-defined anonymous role (unless a role with the name defined inRole.ANONYMOUS_ROLE
already exists) and assigns it all permissions associated with the Anonymous Role- Since:
- 21.11.0
-
assignDefaultServiceUserPermissions
Create the pre-defined service role (unless a role with the name defined inRole.SERVICE_USER_ROLE
already exists) and assigns it all permissions associated with the Service User Role- Since:
- 21.11.0
-