com.ibm.opencard.service
Class MFCCardObjectInfo
java.lang.Object
|
+--com.ibm.opencard.service.MFCCardObjectInfo
- Direct Known Subclasses:
- MFCFileInfo, MFCKeyInfo
- public class MFCCardObjectInfo
- extends java.lang.Object
Holds information on objects located on a smartcard.
Objects on a smartcard may be files, keys, or other. The information
expected to be common to all kinds of objects is access information.
For selecting objects, it is also important whether an object is a
container, that is a directory.
- Version:
- $Id: MFCCardObjectInfo.java,v 1.1 1999/12/02 16:06:07 damke Exp $
- See Also:
AccessInformation
|
Method Summary |
AccessConditions |
getAccessConditions(int cmdclass)
Gets access conditions to the card object for a particular command class.
|
AccessInformation |
getAccessInfo()
Gets the access information to the card object.
|
boolean |
isContainer()
Queries whether the object is a container object. |
void |
setAccessInfo(AccessInformation accinfo)
Sets the access information to the card object.
|
void |
setContainer(boolean container)
Specifies whether the object is a container object.
|
java.lang.String |
toString()
Builds a human-readable string representation of this object. |
protected void |
toStringHook(java.lang.StringBuffer sb)
A hook where derived classes may add info to the string representation. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
MFCCardObjectInfo
public MFCCardObjectInfo()
- Instantiates new object information.
The actual information must be stored later. This is done by a
select response parser. If the parser resides in the same package
as this class, it may set the attributes directly. For parsers in
other packages, access methods are provided.
- See Also:
MFC35ObjectSRParser.parseObjectHeader(com.ibm.opencard.service.MFCCardObjectInfo, byte[])
getAccessInfo
public final AccessInformation getAccessInfo()
- Gets the access information to the card object.
The access information combines all access conditions for all command
classes supported by the smartcard. Typically, only the access conditions
to a particular command class are of interest. They can be queried from
the info obtained here, or by calling getAccessConditions in
this class.
- Returns:
- the access information to the card object described by this object
- See Also:
getAccessConditions(int)
setAccessInfo
public final void setAccessInfo(AccessInformation accinfo)
- Sets the access information to the card object.
This method is provided for card services that use the service
implementations that rely on this class, but want to implement
a parser which resides in a different package.
- Parameters:
accinfo - the access information for the card object
getAccessConditions
public final AccessConditions getAccessConditions(int cmdclass)
- Gets access conditions to the card object for a particular command class.
This is a convenience method that invokes the corresponding method in the
access information that can be obtained by calling getAccessInfo.
For a description of the argument and return values, refer to that class.
- Parameters:
cmdclass - the command class for which to return access conditions- Returns:
- the access conditions for the specified command class
- See Also:
AccessInformation.getAccessConditions(int)
isContainer
public final boolean isContainer()
- Queries whether the object is a container object.
- Returns:
- true iff the object is a container
- See Also:
#is_container
setContainer
public final void setContainer(boolean container)
- Specifies whether the object is a container object.
This method is provided for card services that use the service
implementations that rely on this class, but want to implement
a parser which resides in a different package.
- Parameters:
container - true if the object represents a
container, that is the object is a directory
toString
public java.lang.String toString()
- Builds a human-readable string representation of this object.
- Returns:
- a string describing this object info
- Overrides:
- toString in class java.lang.Object
toStringHook
protected void toStringHook(java.lang.StringBuffer sb)
- A hook where derived classes may add info to the string representation.
- Parameters:
sb - the buffer that holds the string composed so far
|