Package com.avoka.fc.core.dao
Class PermissionDao
java.lang.Object
com.avoka.core.dao.BaseDao
com.avoka.fc.core.dao.AbstractDao
com.avoka.fc.core.dao.PermissionDao
Provides a DAO for the Permission 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 TypeMethodDescriptiongetPermission
(Object id) Return the permission with the specified OIDgetPermissionByName
(String name, String portalId) Return the permission with the given namegetPermissionByNameAndPortal
(String name, Portal portal) Return the permission with the given name belonging to the portal with the given namegetPermissionByNameAndPortal
(String name, String portalName) Return the permission with the given name belonging to the portal with the given namegetPermissionNamesForRolePortal
(String roleName, String portalId) Return the set of permissions for a Role on a given portalgetPermissionsForPortal
(String portalId) Return all permissions for a specific portal, ordered by namegetPermissionsForPortalName
(String portalName) Return all permissions for a specific portal, ordered by namevoid
Load the pre-defined system permissionsvoid
Purge obsolete permissions from the database.Methods 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
-
PermissionDao
public PermissionDao()
-
-
Method Details
-
getPermission
Return the permission with the specified OID- Parameters:
id
- the OID- Returns:
- the matching permission, or null if not found
-
getPermissionByName
Return the permission with the given name- Parameters:
name
- the non-empty name of the permissionportalId
- the OID of the portal associated with the permission- Returns:
- the permission object for the given name
-
getPermissionByNameAndPortal
Return the permission with the given name belonging to the portal with the given name- Parameters:
name
- the non-empty name of the permissionportalName
- the non-empty name of the portal associated with the permission- Returns:
- the matching permission object
-
getPermissionByNameAndPortal
Return the permission with the given name belonging to the portal with the given name- Parameters:
name
- the non-empty name of the permission (required)portal
- the portal associated with the permission (required)- Returns:
- the matching permission object
- Since:
- 5.1.0
-
getPermissionsForPortal
Return all permissions for a specific portal, ordered by name- Parameters:
portalId
- the OID of the portal- Returns:
- the list of permissions
-
getPermissionsForPortalName
Return all permissions for a specific portal, ordered by name- Parameters:
portalName
- the portal name- Returns:
- the list of permissions
-
getPermissionNamesForRolePortal
Return the set of permissions for a Role on a given portal- Parameters:
roleName
- the name of a roleportalId
- the Id of a portal- Returns:
- the set of permission names that are assigned to the user for the given portal
-
loadDefaultPermissions
public void loadDefaultPermissions()Load the pre-defined system permissions -
purgeObsoleteValues
public void purgeObsoleteValues()Purge obsolete permissions from the database. Will only remove permissions associated with the administration console.
-