|
OSGi Service Platform Release 4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.osgi.service.condpermadmin.ConditionInfo
Condition representation used by the Conditional Permission Admin service.
This class encapsulates two pieces of information: a Condition type (class name), which must implement Condition, and the arguments passed to its constructor.
In order for a Condition represented by a ConditionInfo to be instantiated and considered during a permission check, its Condition class must be available from the system classpath.
Constructor Summary | |
ConditionInfo(java.lang.String encodedCondition)
Constructs a ConditionInfo object from the given encoded ConditionInfo string. |
|
ConditionInfo(java.lang.String type,
java.lang.String[] args)
Constructs a ConditionInfo from the given type and args. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Determines the equality of two ConditionInfo objects. |
java.lang.String[] |
getArgs()
Returns arguments of this ConditionInfo. |
java.lang.String |
getEncoded()
Returns the string encoding of this ConditionInfo in a form suitable for restoring this ConditionInfo. |
java.lang.String |
getType()
Returns the fully qualified class name of the condition represented by this ConditionInfo. |
int |
hashCode()
Returns the hash code value for this object. |
java.lang.String |
toString()
Returns the string representation of this ConditionInfo. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConditionInfo(java.lang.String type, java.lang.String[] args)
type
- The fully qualified class name of the condition represented by
this ConditionInfo. The class must implement
Condition and must define a constructor that takes
a Bundle and the correct number of argument
strings.args
- The arguments that will be passed to the constructor of the
Conditon class identified by type.
java.lang.NullPointerException
- if type is null.public ConditionInfo(java.lang.String encodedCondition)
encodedCondition
- The encoded ConditionInfo.
java.lang.IllegalArgumentException
- if encodedCondition is not properly formatted.getEncoded()
Method Detail |
public final java.lang.String getEncoded()
The encoding format is:
[type "arg0" "arg1" ...]where argX are strings that are encoded for proper parsing. Specifically, the ", \, carriage return, and linefeed characters are escaped using \", \\, \r, and \n, respectively.
The encoded string must contain no leading or trailing whitespace characters. A single space character must be used between type and "arg0" and between all arguments.
public java.lang.String toString()
public final java.lang.String getType()
public final java.lang.String[] getArgs()
public boolean equals(java.lang.Object obj)
obj
- The object to test for equality with this
ConditionInfo object.
public int hashCode()
|
OSGi Service Platform Release 4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |