com.sap.security.api

Interface IMessage


public interface IMessage


Field Summary
static int CATEGORY_OBJECT
           
static int CATEGORY_PROCESS
           
static int LIFETIME_ONCE
           
static int LIFETIME_ONCE_TRX
           
static int LIFETIME_PERMANENT
           
static int TYPE_ERROR
           
static int TYPE_INFO
           
static int TYPE_SUCCESS
           
static int TYPE_WARNING
           
 
Method Summary
 int getCategory()
          Returns the category of the message.
 String getGuid()
          Returns a generated unique ID to identify the message.
 int getLifeTime()
          Returns the life time of the message.
 String getLocalizedMessage(Locale locale)
          Returns the localized message text.
 String getMessage()
          Returns a not localized clear text which might be assigned to the message, or null.
 Date getTimeStamp()
          Returns the java.util.Date object that represents the time when the message was added to the message buffer.
 int getType()
          Returns the type of the message.
 

Field Detail

TYPE_ERROR

static final int TYPE_ERROR
See Also:
Constant Field Values

TYPE_WARNING

static final int TYPE_WARNING
See Also:
Constant Field Values

TYPE_INFO

static final int TYPE_INFO
See Also:
Constant Field Values

TYPE_SUCCESS

static final int TYPE_SUCCESS
See Also:
Constant Field Values

LIFETIME_PERMANENT

static final int LIFETIME_PERMANENT
See Also:
Constant Field Values

LIFETIME_ONCE

static final int LIFETIME_ONCE
See Also:
Constant Field Values

LIFETIME_ONCE_TRX

static final int LIFETIME_ONCE_TRX
See Also:
Constant Field Values

CATEGORY_OBJECT

static final int CATEGORY_OBJECT
See Also:
Constant Field Values

CATEGORY_PROCESS

static final int CATEGORY_PROCESS
See Also:
Constant Field Values
Method Detail

getLocalizedMessage

String getLocalizedMessage(Locale locale)
Returns the localized message text. If this is not possible, a localized generic text is returned. The generic text includes the clear text message (getMessage()) which is not a translated text and not related to the given locale object.

Parameters:
locale - The locale for which the text should be returned.
Returns:
The localized message.

getType

int getType()
Returns the type of the message. Possible types are: TYPE_ERROR,TYPE_WARNING,TYPE_INFO,TYPE_SUCCESS TYPE_ERROR means: The message text explains an error. TYPE_WARNING means: The message text explains a warning. TYPE_INFO means: The message text is informational. TYPE_SUCCESS means: The message text explains a successfully completed operation. This type is not in use.

Returns:
The type of the message.

getLifeTime

int getLifeTime()
Returns the life time of the message. Possible life times are: LIFETIME_PERMANENT,LIFETIME_ONCE,LIFETIME_ONCE_TRX LIFETIME_PERMANENT means: Message is valid until explicitly deleted. This is the default for all messages. LIFETIME_ONCE means: Message is valid only once. After it has been displayed once, it should not appear again. LIFETIME_ONCE_TRX means: Message is only valid in the current transaction. This life time is not in use.

Returns:
The life time of the message.

getCategory

int getCategory()
Returns the category of the message. Possible life times are: CATEGORY_OBJECT,CATEGORY_PROCESS CATEGORY_OBJECT means: The message is related to a specific IPrincipal object. CATEGORY_PROCESS means: The message is realted to a process (like search).

Returns:
The category of the message.

getTimeStamp

Date getTimeStamp()
Returns the java.util.Date object that represents the time when the message was added to the message buffer.

Returns:
The time when the message was added to the buffer.

getMessage

String getMessage()
Returns a not localized clear text which might be assigned to the message, or null. This message is used to enrich the localized generic message (getLocalizedMessage(Locale).

Returns:
The not localized clear text which is assigned to this message or null

getGuid

String getGuid()
Returns a generated unique ID to identify the message. This GUID can be used in order to trace or log messages on client and server side.

Returns:
The generated GUID
Access Rights

This class can be accessed from:


SC DC
[sap.com] ENGINEAPI [sap.com] com.sap.security.api.sda
[sap.com] ENGFACADE [sap.com] tc/je/usermanagement/api
[sap.com] CORE-TOOLS [sap.com] com.sap.engine.client.lib


Copyright 2010 SAP AG Complete Copyright Notice