Package com.cmobilecom.af.model.system
Class AccessDeniedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.cmobilecom.af.util.ExecException
-
- com.cmobilecom.af.entity.system.SystemException
-
- com.cmobilecom.af.model.system.AccessDeniedException
-
- All Implemented Interfaces:
java.io.Serializable
public class AccessDeniedException extends SystemException
Access denied exception- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.cmobilecom.af.util.ExecException
ExecException.Severity
-
-
Field Summary
-
Fields inherited from class com.cmobilecom.af.util.ExecException
localized, messageId, params, severity
-
-
Constructor Summary
Constructors Constructor Description AccessDeniedException(java.lang.String message)
Constructor.AccessDeniedException(java.lang.String messageId, boolean localized, java.lang.Object[] params)
Constructor.AccessDeniedException(java.lang.String messageId, AccessType accessType, DataDescriptor dataDescriptor, java.lang.String property, DataAccessUnit dataAccessUnit)
Constructor with access denied for accessing data described by the dataDescriptor.AccessDeniedException(java.lang.String messageId, AccessType accessType, java.lang.Class entityType)
Constructor with access denied for accessing the entity type.AccessDeniedException(java.lang.String messageId, AccessType accessType, java.lang.Class entityType, java.lang.String property)
Constructor with access denied for accessing the property.AccessDeniedException(java.lang.String messageId, java.lang.Object[] params)
Constructor.AccessDeniedException(java.lang.Throwable t)
Constructor: wrapper over a Throwable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessType
getAccessType()
Get access type for access deniedjava.lang.Class
getEntityType()
Get entity type for access deniedjava.lang.String
getLocalizedMessage()
java.lang.String
getMessage()
ParameterizedMessage
getParameterizedMessage()
Get the ParameterizedMessage.java.lang.String
getProperty()
Get the name of the property for access deniedvoid
setAccessType(AccessType accessType)
Set access type for access deniedvoid
setEntityType(java.lang.Class entityType)
Set entity type for access deniedvoid
setProperty(java.lang.String property)
Set the name of the property for access denied-
Methods inherited from class com.cmobilecom.af.util.ExecException
getLogLevel, getMessage, getMessageId, getParams, getRootCause, getSeverity, isLocalized, setSeverity
-
-
-
-
Constructor Detail
-
AccessDeniedException
public AccessDeniedException(java.lang.String messageId, java.lang.Object[] params)
Constructor. The messageId is not localized, resource bundle will be used to translate the message.- Parameters:
messageId
- message key in resource bundle whose value can contain parameters {n}.params
- an array of parameter values
-
AccessDeniedException
public AccessDeniedException(java.lang.String messageId, boolean localized, java.lang.Object[] params)
Constructor. if the message is not localized, resource bundle will be used to translate the message.- Parameters:
messageId
- if localized is false, message key in resource bundle whose value can contain parameters {n}. if localized is true, a message that can contain parameters {n}.localized
- whether the messageId is localized.params
- an array of parameter values
-
AccessDeniedException
public AccessDeniedException(java.lang.String message)
Constructor.- Parameters:
message
- a localized message. Resource bundle will not be used.
-
AccessDeniedException
public AccessDeniedException(java.lang.Throwable t)
Constructor: wrapper over a Throwable- Parameters:
t
- a Throwable
-
AccessDeniedException
public AccessDeniedException(java.lang.String messageId, AccessType accessType, java.lang.Class entityType, java.lang.String property)
Constructor with access denied for accessing the property.- Parameters:
messageId
- message key in resource bundle whose value can contain parameters {n}.accessType
- access typeentityType
- entity typeproperty
- property name
-
AccessDeniedException
public AccessDeniedException(java.lang.String messageId, AccessType accessType, java.lang.Class entityType)
Constructor with access denied for accessing the entity type.- Parameters:
messageId
- message key in resource bundle whose value can contain parameters {n}.accessType
- access typeentityType
- entity type
-
AccessDeniedException
public AccessDeniedException(java.lang.String messageId, AccessType accessType, DataDescriptor dataDescriptor, java.lang.String property, DataAccessUnit dataAccessUnit)
Constructor with access denied for accessing data described by the dataDescriptor.- Parameters:
messageId
- message key in resource bundle whose value can contain parameters {n}.accessType
- access typedataDescriptor
- the data being accessedproperty
- the property being accessed if not nulldataAccessUnit
- the associated dataAccessUnit- Since:
- 5.16
-
-
Method Detail
-
getAccessType
public AccessType getAccessType()
Get access type for access denied- Returns:
- access type, can be null.
-
setAccessType
public void setAccessType(AccessType accessType)
Set access type for access denied- Parameters:
accessType
- access type
-
getEntityType
public java.lang.Class getEntityType()
Get entity type for access denied- Returns:
- entity type
-
setEntityType
public void setEntityType(java.lang.Class entityType)
Set entity type for access denied- Parameters:
entityType
- entity type
-
getProperty
public java.lang.String getProperty()
Get the name of the property for access denied- Returns:
- property name
-
setProperty
public void setProperty(java.lang.String property)
Set the name of the property for access denied- Parameters:
property
- property name
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classExecException
- Since:
- 5.16
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in classjava.lang.Throwable
- Since:
- 5.16
-
getParameterizedMessage
public ParameterizedMessage getParameterizedMessage()
Description copied from class:SystemException
Get the ParameterizedMessage.- Overrides:
getParameterizedMessage
in classSystemException
- Returns:
- parameterized message
- Since:
- 5.16
-
-