public class SubscriptionException extends WcmException
Each SubscriptionException
has a type associated with it that represents the
reason why the exception was thrown.
This information can be accessed using a SubscriptionException
:
- message describing the exception's root cause
- type containing the exception's root cause
(see Field Description)
Copyright (c) SAP AG
Modifier and Type | Field and Description |
---|---|
static int |
ANNOTATION_TO_LONG
Create
Subscription or set Subscription
failed, because the annotation exeeds the length limit. |
static int |
CREATE_EXISTS
Create failed because a subscription with this name already
exists for this owner (owner/name must be unique for each manager) |
static int |
EVENT_MISMATCH
Deprecated.
as of NW04.
An
INVALID_CONDITION is thrown instead. |
static int |
INVALID_CHANNEL
Create or add failed because the channel of
the subscription and the recipient/channel combinations do not match
(e.g. the channel says SMS, but for a newly added recipient no
SMS channel is available). |
static int |
INVALID_CONDITION
Create or add failed because the condition of
the subscription and the resource/event combinations do not match
(e.g. the condition says ALWAYS, but for a newly added resource no
events are sent by the repository). |
static int |
INVALID_OWNER
The owner given for this subscription is not valid.
|
protected int |
m_FieldLength
Maximum length of a field (default)
|
protected IRecipientList |
m_InvalidRecipientsForChannel
Internal list of all invalid recipients for a channel
|
protected int |
m_Type
Internal type of exception
|
static int |
NAME_TOO_LONG
Create
Subscription or set Subscription
failed, because the name exeeds the length limit. |
static int |
NO_EVENTMAPPER_FOR_REPOSITORY
Repository has no SubscriptionEventMapping configured.
|
static int |
NO_VALID_OWNER
Deprecated.
as of NW04.
An
INVALID_OWNER is thrown instead. |
static int |
NOACCESS
Access error, for example, the user is not the owner of the subscription
but is trying to delete it.
|
static int |
RECIPIENT_IS_PART_OF_GROUP
The recipient is part of group.
|
static int |
SUBSCRIPTION_ALREADY_DELETED
Repository has no SubscriptionEventMapping configured.
|
static int |
SUBSCRIPTION_MANAGER_UNAVAILABLE
A SubscriptionManager is requested for a resource, but the repository of
this resource does not implement a subscription service.
|
static int |
UNKNOWN_ID
The subscription's ID is not known to the manager.
|
ex
Constructor and Description |
---|
SubscriptionException(int type)
Creates a subscription exception for a given type.
|
SubscriptionException(int type,
boolean log)
Creates a subscription exception for a given type with defined logging settings.
|
SubscriptionException(int type,
boolean log,
int maxLength)
Creates a subscription exception for a given type with defined logging settings.
|
SubscriptionException(int type,
String message)
Creates a subscription exception for a given type with an additional message.
|
SubscriptionException(int type,
String message,
IRecipientList invalids)
Creates a subscription exception for a given type with an additional message and an
IRecipientList containing invalid recipients. |
Modifier and Type | Method and Description |
---|---|
IRecipientList |
getInvalidRecipientsForChannel()
Gets the list of invalid recipients for a channel.
|
int |
getMaxAnnotationLength()
Deprecated.
as of NW04. Use SubscriptionException.getMaxFieldLength() instead
|
int |
getMaxFieldLength()
Gets the maximum field length.
|
String |
getMessage()
Returns the message for this
SubscriptionException . |
protected String |
getMessageForType(int type)
Gets the default message for the exception type.
|
int |
getType()
Gets the type of this
SubscriptionException . |
getContainedException, isLogged, setContainedException
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int NOACCESS
get
...() method
can cause this error.public static final int UNKNOWN_ID
public static final int CREATE_EXISTS
Create
failed because a subscription with this name already
exists for this owner (owner/name must be unique for each manager)public static final int EVENT_MISMATCH
INVALID_CONDITION
is thrown instead.public static final int SUBSCRIPTION_MANAGER_UNAVAILABLE
public static final int NO_VALID_OWNER
INVALID_OWNER
is thrown instead.public static final int INVALID_OWNER
public static final int INVALID_CONDITION
Create
or add
failed because the condition of
the subscription and the resource/event combinations do not match
(e.g. the condition says ALWAYS, but for a newly added resource no
events are sent by the repository).public static final int INVALID_CHANNEL
Create
or add
failed because the channel of
the subscription and the recipient/channel combinations do not match
(e.g. the channel says SMS, but for a newly added recipient no
SMS channel is available).public static final int ANNOTATION_TO_LONG
Subscription
or set Subscription
failed, because the annotation exeeds the length limit.
Try to have a smaller annotation.public static final int NAME_TOO_LONG
Subscription
or set Subscription
failed, because the name exeeds the length limit.
Try to have a shorter name.public static final int NO_EVENTMAPPER_FOR_REPOSITORY
public static final int SUBSCRIPTION_ALREADY_DELETED
public static final int RECIPIENT_IS_PART_OF_GROUP
protected int m_Type
protected int m_FieldLength
protected IRecipientList m_InvalidRecipientsForChannel
public SubscriptionException(int type)
type
- an int
with the exception's typepublic SubscriptionException(int type, String message)
type
- an int
with the exception's typemessage
- a String
with the exception's messagepublic SubscriptionException(int type, boolean log)
false
as second parametertype
- an int
with the exception's typelog
- a boolean
false if no logging is to be done.public SubscriptionException(int type, boolean log, int maxLength)
false
as second parameter.SubscriptionException
of type = ANNOTATION_TO_LONG or
NAME_TOO_LONG.type
- an int
with the exception's typelog
- a boolean
false if no logging is to be done.maxLength
- a int
with the maximum length of the field.public SubscriptionException(int type, String message, IRecipientList invalids)
IRecipientList
containing invalid recipients. type
- an int
with the exception's type.message
- a String
with the exception's messageinvalids
- an IRecipientList
with all invalid recipients for a channelprotected String getMessageForType(int type)
type
- an int
with the exception typeString
with a message text for this typepublic int getType()
SubscriptionException
. int
with the exception's typepublic int getMaxFieldLength()
int
with the exception's typepublic int getMaxAnnotationLength()
int
with the exception's typepublic IRecipientList getInvalidRecipientsForChannel()
IRecipientList
with all invalid recipients for a channelpublic String getMessage()
SubscriptionException
. getMessage
in class Throwable
String
with the exception's messageAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice