Skip navigation links
com.fatwire.services.authorization
Interface AuthorizationHandler<T>
- Type Parameters:
T
- type of the entity encapsulated into the PermissionBean
.
- All Superinterfaces:
- Service
-
public interface AuthorizationHandler<T>
- extends Service
This interface validates authorization for asset operations.
The contract enforces implementation of a single method, getPermission
, which decides if a user is authorized to perform the operation on an asset in a site.
- See Also:
AuthorizationRequestBean
, PermissionBean
getPermission
PermissionBean<T> getPermission(AuthorizationRequestBean request)
throws ServiceException
-
Decides if a user is authorized to perform the operation on an asset in a site.
Typical use of this method is as follows:
AuthorizationHandler<MyData> authHandler = ...; // get the service object
AuthorizationRequestBean req = ...; // Populate request object
PermissionBean<MyData> perm = authHandler.getPermission();
// If the operation is permitted
boolean permitted = perm.isPermitted();
AssetId asset = perm.getAsset();
// Further information
MyData data = perm.getEntity();
-
- Parameters:
request
- input to this service.
- Returns:
- the permission object.
- Throws:
ServiceException
- in case of any server side exceptions.
- See Also:
Function
Skip navigation links
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.