com.fatwire.services.beans.asset
Class PermissionBean<T>

java.lang.Object
  extended by com.fatwire.services.beans.BaseBean
      extended by com.fatwire.services.beans.ServiceBean<T>
          extended by com.fatwire.services.beans.asset.PermissionBean<T>
Type Parameters:
T - type of the entity encapsulated into the ServiceBean.
All Implemented Interfaces:
java.io.Serializable

public class PermissionBean<T>
extends ServiceBean<T>

The PermissionBean is the value object for authorization modules which determine permission for performing operations on an asset. It provides the following information:

  1. a flag set to true if permission is granted
  2. the asset identifier associated with the asset for which permission is checked
  3. a response object providing the success or error condition, along with localized messages and a status code
  4. an optional typed entity, which is customized to hold further information regarding the authorization (for example: if the asset is locked by some other user and hence cannot be accessed)

See Also:
ServiceBean, Serialized Form

Field Summary
 
Fields inherited from class com.fatwire.services.beans.ServiceBean
entity, response
 
Constructor Summary
PermissionBean()
           
 
Method Summary
 AssetId getAsset()
          Returns the asset identifier associated with the asset on which the permission is checked.
 java.lang.Boolean isPermitted()
          Returns true if an asset operation is authorized for an asset.
 void setAsset(AssetId asset)
          Sets the asset identifier associated with the asset on which the permission is checked.
 void setPermitted(java.lang.Boolean permitted)
          Sets authorized permission for an operation in the context of an asset.
 
Methods inherited from class com.fatwire.services.beans.ServiceBean
getEntity, getResponse, setEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionBean

public PermissionBean()
Method Detail

getAsset

public AssetId getAsset()
Returns the asset identifier associated with the asset on which the permission is checked.

Returns:
the asset identifier.

setAsset

public void setAsset(AssetId asset)
Sets the asset identifier associated with the asset on which the permission is checked.

Parameters:
asset - the asset identifier to set.

isPermitted

public final java.lang.Boolean isPermitted()
Returns true if an asset operation is authorized for an asset.

Returns:
true if an asset operation is authorized for an asset.

setPermitted

public final void setPermitted(java.lang.Boolean permitted)
Sets authorized permission for an operation in the context of an asset. Set to true if permission is granted.

Parameters:
permitted - permission flag to set. Set to true if permission is granted.


Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.