org.osgi.service.condpermadmin.ConditionInfo Class Reference

List of all members.


Detailed Description

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.

The Condition class must either:

Version:
Revision
1.13

Definition at line 50 of file ConditionInfo.java.


Public Member Functions

 ConditionInfo (String type, String[] args)
 Constructs a ConditionInfo from the specified type and args.
 ConditionInfo (String encodedCondition)
 Constructs a ConditionInfo object from the specified encoded ConditionInfo string.
final String getEncoded ()
 Returns the string encoding of this ConditionInfo in a form suitable for restoring this ConditionInfo.
String toString ()
 Returns the string representation of this ConditionInfo.
final String getType ()
 Returns the fully qualified class name of the condition represented by this ConditionInfo.
final String[] getArgs ()
 Returns arguments of this ConditionInfo.
boolean equals (Object obj)
 Determines the equality of two ConditionInfo objects.
int hashCode ()
 Returns the hash code value for this object.

Constructor & Destructor Documentation

org.osgi.service.condpermadmin.ConditionInfo.ConditionInfo ( String  type,
String[]  args 
)

Constructs a ConditionInfo from the specified type and args.

Parameters:
type The fully qualified class name of the Condition represented by this ConditionInfo.
args The arguments for the Condition. These arguments are available to the newly created Condition by calling the getArgs() method.
Exceptions:
java.lang.NullPointerException If type is null.

Definition at line 66 of file ConditionInfo.java.

org.osgi.service.condpermadmin.ConditionInfo.ConditionInfo ( String  encodedCondition  ) 

Constructs a ConditionInfo object from the specified encoded ConditionInfo string.

White space in the encoded ConditionInfo string is ignored.

Parameters:
encodedCondition The encoded ConditionInfo.
See also:
getEncoded
Exceptions:
java.lang.IllegalArgumentException If the encodedCondition is not properly formatted.

Definition at line 84 of file ConditionInfo.java.


Member Function Documentation

final String org.osgi.service.condpermadmin.ConditionInfo.getEncoded (  ) 

Returns the string encoding of this ConditionInfo in a form suitable for restoring this ConditionInfo.

The encoding format is:

   [type "arg0" "arg1" ...]
 

where argN are strings that are encoded for proper parsing. Specifically, the ", </code>, carriage return, and linefeed characters are escaped using \", \, , and
, respectively.

The encoded string contains no leading or trailing whitespace characters. A single space character is used between type and "<i>arg0</i>" and between the arguments.

Returns:
The string encoding of this ConditionInfo.

Definition at line 191 of file ConditionInfo.java.

Referenced by org.osgi.service.condpermadmin.ConditionInfo.toString().

String org.osgi.service.condpermadmin.ConditionInfo.toString (  ) 

Returns the string representation of this ConditionInfo.

The string is created by calling the getEncoded method on this ConditionInfo.

Returns:
The string representation of this ConditionInfo.

Definition at line 214 of file ConditionInfo.java.

References org.osgi.service.condpermadmin.ConditionInfo.getEncoded().

final String org.osgi.service.condpermadmin.ConditionInfo.getType (  ) 

Returns the fully qualified class name of the condition represented by this ConditionInfo.

Returns:
The fully qualified class name of the condition represented by this ConditionInfo.

Definition at line 225 of file ConditionInfo.java.

Referenced by org.osgi.service.condpermadmin.BundleSignerCondition.getCondition(), and org.osgi.service.condpermadmin.BundleLocationCondition.getCondition().

final String [] org.osgi.service.condpermadmin.ConditionInfo.getArgs (  ) 

Returns arguments of this ConditionInfo.

Returns:
The arguments of this ConditionInfo. An empty array is returned if the ConditionInfo has no arguments.

Definition at line 236 of file ConditionInfo.java.

Referenced by org.osgi.service.condpermadmin.BundleSignerCondition.getCondition(), and org.osgi.service.condpermadmin.BundleLocationCondition.getCondition().

boolean org.osgi.service.condpermadmin.ConditionInfo.equals ( Object  obj  ) 

Determines the equality of two ConditionInfo objects.

This method checks that specified object has the same type and args as this ConditionInfo object.

Parameters:
obj The object to test for equality with this ConditionInfo object.
Returns:
true if obj is a ConditionInfo, and has the same type and args as this ConditionInfo object; false otherwise.

Definition at line 253 of file ConditionInfo.java.

References org.osgi.service.condpermadmin.ConditionInfo.args, and org.osgi.service.condpermadmin.ConditionInfo.type.

int org.osgi.service.condpermadmin.ConditionInfo.hashCode (  ) 

Returns the hash code value for this object.

Returns:
A hash code value for this object.

Definition at line 280 of file ConditionInfo.java.


The documentation for this class was generated from the following file:
Generated on Mon Jan 11 21:19:24 2010 for OpenMobileIS by  doxygen 1.5.4