PCSC4Java  0.2
Library PCSC for Java language.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
fr.redbilled.pcscforjava.CardPermission Class Reference
Inheritance diagram for fr.redbilled.pcscforjava.CardPermission:
Collaboration diagram for fr.redbilled.pcscforjava.CardPermission:

List of all members.

Public Member Functions

 CardPermission (String terminalName, String actions)
String getActions ()
boolean implies (Permission permission)
boolean equals (Object obj)
int hashCode ()

Detailed Description

A permission for Smart Card operations. A CardPermission consists of the name of the card terminal the permission applies to and a set of actions that are valid for that terminal.

A CardPermission with a name of * applies to all card terminals. The actions string is a comma separated list of the actions listed below, or * to signify "all actions."

Individual actions are:

connect

connect to a card using CardTerminal::connect CardTerminal.connect()}

reset

reset the card using Card::disconnect Card.disconnect(true)}

exclusive

establish exclusive access to a card using Card::beginExclusive} and Card::endExclusive endExclusive()}

transmitControl

transmit a control command using Card::transmitControlCommand Card.transmitControlCommand()}

getBasicChannel

obtain the basic logical channel using Card::getBasicChannel}

openLogicalChannel

open a new logical channel using Card::openLogicalChannel}

Since:
1.6
Author:
Andreas Sterbenz
JSR 268 Expert Group

Definition at line 73 of file CardPermission.java.


Constructor & Destructor Documentation

fr.redbilled.pcscforjava.CardPermission.CardPermission ( String  terminalName,
String  actions 
)

Constructs a new CardPermission with the specified actions. terminalName is the name of a CardTerminal or * if this permission applies to all terminals. actions contains a comma-separated list of the individual actions or * to signify all actions. For more information, see the documentation at the top of this CardPermission class}.

Parameters:
terminalNamethe name of the card terminal, or *
actionsthe action string (or null if the set of permitted actions is empty)
Exceptions:
NullPointerExceptionif terminalName is null
IllegalArgumentExceptionif actions is an invalid actions specification

Definition at line 156 of file CardPermission.java.

Here is the caller graph for this function:


Member Function Documentation

Compares the specified object with this CardPermission for equality. This CardPermission is equal to another Object object, if and only if

Parameters:
objthe object to be compared for equality with this CardPermission
Returns:
true if and only if the specified object is equal to this CardPermission

Definition at line 281 of file CardPermission.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String fr.redbilled.pcscforjava.CardPermission.getActions ( )

Returns the canonical string representation of the actions. It is * to signify all actions defined by this class or the string concatenation of the comma-separated, lexicographically sorted list of individual actions.

Returns:
the canonical string representation of the actions.

Definition at line 224 of file CardPermission.java.

Returns the hash code value for this CardPermission object.

Returns:
the hash code value for this CardPermission object.

Definition at line 297 of file CardPermission.java.

boolean fr.redbilled.pcscforjava.CardPermission.implies ( Permission  permission)

Checks if this CardPermission object implies the specified permission. That is the case, if and only if

  • permission is an instance of CardPermission,

  • permission's actions are a proper subset of this object's actions, and

  • this object's getName() method is either * or equal to permission's name.

Parameters:
permissionthe permission to check against
Returns:
true if and only if this CardPermission object implies the specified permission.

Definition at line 247 of file CardPermission.java.

Here is the call graph for this function:


The documentation for this class was generated from the following file: