com.jp.protection.pub.pro.lserver
Class LicensingServiceResultImpl

java.lang.Object
  extended by com.jp.protection.pub.pro.lserver.LicensingServiceResultImpl
All Implemented Interfaces:
LicensingServiceResult, java.io.Serializable
Direct Known Subclasses:
LicensingServiceResultImpl.CheckoutResultImpl, LicensingServiceResultImpl.LicenseResultImpl

public class LicensingServiceResultImpl
extends java.lang.Object
implements LicensingServiceResult, java.io.Serializable

Default implementation of the LicensingServiceResult interface

Since:
3.0
See Also:
Serialized Form

Nested Class Summary
static class LicensingServiceResultImpl.CheckoutResultImpl
          Default implementation of the CheckoutResult interface
static class LicensingServiceResultImpl.LicenseResultImpl
          Default implementation of the LicenseResult interface
 
Nested classes/interfaces inherited from interface com.jp.protection.pub.pro.lserver.LicensingServiceResult
LicensingServiceResult.CheckoutResult, LicensingServiceResult.ErrorCode, LicensingServiceResult.LicenseResult
 
Field Summary
protected  LicensingServiceResult.ErrorCode fErrorCode
           
protected  java.lang.String fMessage
           
protected  int fResult
           
protected  java.lang.String fTicket
           
protected  java.util.Map properties
           
static long serialVersionUID
           
 
Fields inherited from interface com.jp.protection.pub.pro.lserver.LicensingServiceResult
PROPERTY_CPU_LIMIT, PROPERTY_CPU_USAGE, PROPERTY_MEMORY_LIMIT, PROPERTY_MEMORY_USAGE, PROPERTY_MESSAGE, PROPERTY_RESULT, PROPERTY_TICKET, PROPERTY_USAGE_COUNT, PROPERTY_USAGE_LIMIT, RESULT_ERROR, RESULT_LICENSE_REVOKED, RESULT_OK, RESULT_SESSION_EXPIRED, RESULT_SYSTEM_ERROR
 
Constructor Summary
LicensingServiceResultImpl()
          Creates a new instance of the LicensingServiceResultImpl
LicensingServiceResultImpl(int aResult)
          Creates a new instance of the LicensingServiceResultImpl
LicensingServiceResultImpl(int aResult, java.lang.String aMessage)
          Creates a new instance of the LicensingServiceResultImpl
LicensingServiceResultImpl(int aResult, java.lang.String aMessage, LicensingServiceResult.ErrorCode anErrorCode)
          Creates a new instance of the LicensingServiceResultImpl
LicensingServiceResultImpl(int aResult, java.lang.String aMessage, java.lang.String aTicket)
          Creates a new instance of the LicensingServiceResultImpl
 
Method Summary
 LicensingServiceResult.ErrorCode getErrorCode()
          Returns error code
 java.lang.String getMessage()
          Returns the message text associated with the result
 java.util.Map getProperties()
          Returns result properties
 int getResult()
          Returns result code of the operation as one of RESULT_ constants
static java.lang.String getResultStr(int aResult)
          Returns textual representation of result code
 java.lang.String getTicket()
          Returns ticket value unique identifies a licensing session for acquired license lock
 void setErrorCode(LicensingServiceResult.ErrorCode aErrorCode)
           
 void setMessage(java.lang.String aMessage)
          Specifies message text
 void setProperties(java.util.Map aProperties)
           
 void setResult(int aResult)
          Specifies result code
 void setTicket(java.lang.String aTicket)
          Specifies ticket
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

fMessage

protected java.lang.String fMessage

fResult

protected int fResult

fTicket

protected java.lang.String fTicket

properties

protected java.util.Map properties

fErrorCode

protected LicensingServiceResult.ErrorCode fErrorCode
Constructor Detail

LicensingServiceResultImpl

public LicensingServiceResultImpl()
Creates a new instance of the LicensingServiceResultImpl


LicensingServiceResultImpl

public LicensingServiceResultImpl(int aResult)
Creates a new instance of the LicensingServiceResultImpl

Parameters:
aResult - result code

LicensingServiceResultImpl

public LicensingServiceResultImpl(int aResult,
                                  java.lang.String aMessage)
Creates a new instance of the LicensingServiceResultImpl

Parameters:
aResult - result code
aMessage - message text

LicensingServiceResultImpl

public LicensingServiceResultImpl(int aResult,
                                  java.lang.String aMessage,
                                  LicensingServiceResult.ErrorCode anErrorCode)
Creates a new instance of the LicensingServiceResultImpl

Parameters:
aResult - result code
aMessage - message text
anErrorCode - error code
Since:
5.0

LicensingServiceResultImpl

public LicensingServiceResultImpl(int aResult,
                                  java.lang.String aMessage,
                                  java.lang.String aTicket)
Creates a new instance of the LicensingServiceResultImpl

Parameters:
aResult - result code
aMessage - message text
aTicket - ticket
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMessage

public java.lang.String getMessage()
Description copied from interface: LicensingServiceResult
Returns the message text associated with the result

Specified by:
getMessage in interface LicensingServiceResult
Returns:
message text

setMessage

public void setMessage(java.lang.String aMessage)
Specifies message text

Parameters:
aMessage - message text to set

getResult

public int getResult()
Description copied from interface: LicensingServiceResult
Returns result code of the operation as one of RESULT_ constants

Specified by:
getResult in interface LicensingServiceResult
Returns:
result code of the operation

setResult

public void setResult(int aResult)
Specifies result code

Parameters:
aResult - result code to set

getTicket

public java.lang.String getTicket()
Description copied from interface: LicensingServiceResult
Returns ticket value unique identifies a licensing session for acquired license lock

Specified by:
getTicket in interface LicensingServiceResult
Returns:
ticket

setTicket

public void setTicket(java.lang.String aTicket)
Specifies ticket

Parameters:
aTicket - ticket to set

getProperties

public java.util.Map getProperties()
Description copied from interface: LicensingServiceResult
Returns result properties

Specified by:
getProperties in interface LicensingServiceResult
Returns:
result properties

setErrorCode

public void setErrorCode(LicensingServiceResult.ErrorCode aErrorCode)

getErrorCode

public LicensingServiceResult.ErrorCode getErrorCode()
Description copied from interface: LicensingServiceResult
Returns error code

Specified by:
getErrorCode in interface LicensingServiceResult
Returns:
error code

setProperties

public void setProperties(java.util.Map aProperties)

getResultStr

public static java.lang.String getResultStr(int aResult)
Returns textual representation of result code

Parameters:
aResult - result code to get textual representation for
Returns:
textual representation of result code