IFSFile
instead, as this package may be removed in the future.public class RIFSFile extends ChangeableResource
IFSFile
and
IFSJavaFile
except that it is a subclass of Resource
.
As a result, it can be used directly in conjunction with components
written for Resource objects.
The following attribute IDs are supported:
ABSOLUTE_PATH
CANONICAL_PATH
CAN_READ
CAN_WRITE
CCSID
CREATED
EXISTS
IS_ABSOLUTE
IS_DIRECTORY
IS_FILE
IS_HIDDEN
IS_READ_ONLY
LAST_ACCESSED
LAST_MODIFIED
LENGTH
NAME
PARENT
PATH
TYPE
Use any of these attribute IDs with
getAttributeValue()
and setAttributeValue()
to access the attribute values for an RIFSFile.
// Create an RIFSFile object to refer to a specific file. AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); RIFSFile file = new RIFSFile(system, "/home/myuserid/config.txt");
// Determine if the file is read only. boolean readOnly = ((Boolean)file.getAttributeValue(RIFSFile.IS_READ_ONLY)).booleanValue();
// Set the last modified date to now. file.setAttributeValue(RIFSFile.LAST_MODIFIED, new Date());
// Commit the attribute change. file.commitAttributeChanges();
RIFSFileList
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
ABSOLUTE_PATH
Deprecated.
Attribute ID for absolute path.
|
static java.lang.String |
CAN_READ
Deprecated.
Attribute ID for can read.
|
static java.lang.String |
CAN_WRITE
Deprecated.
Attribute ID for can write.
|
static java.lang.String |
CANONICAL_PATH
Deprecated.
Attribute ID for canonical path.
|
static java.lang.String |
CCSID
Deprecated.
Attribute ID for CCSID.
|
static java.lang.String |
CREATED
Deprecated.
Attribute ID for created.
|
static java.lang.String |
EXISTS
Deprecated.
Attribute ID for exists.
|
static java.lang.String |
IS_ABSOLUTE
Deprecated.
Attribute ID for is absolute.
|
static java.lang.String |
IS_DIRECTORY
Deprecated.
Attribute ID for is directory.
|
static java.lang.String |
IS_FILE
Deprecated.
Attribute ID for is file.
|
static java.lang.String |
IS_HIDDEN
Deprecated.
Attribute ID for is hidden.
|
static java.lang.String |
IS_READ_ONLY
Deprecated.
Attribute ID for is read only.
|
static java.lang.String |
LAST_ACCESSED
Deprecated.
Attribute ID for last accessed.
|
static java.lang.String |
LAST_MODIFIED
Deprecated.
Attribute ID for last modified.
|
static java.lang.String |
LENGTH
Deprecated.
Attribute ID for length.
|
static java.lang.String |
NAME
Deprecated.
Attribute ID for name.
|
static java.lang.String |
OWNERID
Deprecated.
Attribute ID for owner ID.
|
static java.lang.String |
PARENT
Deprecated.
Attribute ID for parent.
|
static java.lang.String |
PATH
Deprecated.
Attribute ID for path.
|
static java.lang.String |
TYPE
Deprecated.
Attribute ID for type.
|
static java.lang.String |
TYPE_DIRECTORY
Deprecated.
Attribute value indicating that this is a directory.
|
static java.lang.String |
TYPE_FILE
Deprecated.
Attribute value indicating that this is a file.
|
static java.lang.String |
TYPE_UNKNOWN
Deprecated.
Attribute value indicating that the tyype is unknown.
|
Constructor and Description |
---|
RIFSFile()
Deprecated.
Constructs an RIFSFile object.
|
RIFSFile(AS400 system,
java.lang.String path)
Deprecated.
Constructs an RIFSFile object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
commitAttributeChanges(java.lang.Object[] attributeIDs,
java.lang.Object[] values)
Deprecated.
Commits the specified attribute changes.
|
void |
delete()
Deprecated.
Deletes this file or directory.
|
protected void |
establishConnection()
Deprecated.
Establishes the connection to the system.
|
protected void |
freezeProperties()
Deprecated.
Freezes any property changes.
|
java.lang.Object |
getAttributeUnchangedValue(java.lang.Object attributeID)
Deprecated.
Returns the unchanged value of an attribute.
|
java.lang.String |
getPath()
Deprecated.
Returns the file path name.
|
void |
refreshAttributeValues()
Deprecated.
Refreshes the values for all attributes.
|
void |
setPath(java.lang.String path)
Deprecated.
Sets the file path name.
|
void |
setSystem(AS400 system)
Deprecated.
Sets the system.
|
cancelAttributeChanges, commitAttributeChanges, commitAttributeChanges, fireAttributeChangesCanceled, fireAttributeChangesCommitted, fireAttributeValueChanged, fireResourceCreated, fireResourceDeleted, getAttributeUnchangedValue, getAttributeValue, getAttributeValue, hasUncommittedAttributeChanges, initializeAttributeValue, setAttributeValue, setAttributeValue
addActiveStatusListener, addPropertyChangeListener, addResourceListener, addVetoableChangeListener, arePropertiesFrozen, equals, fireAttributeValuesRefreshed, fireBusy, fireIdle, firePropertyChange, fireVetoableChange, getAttributeMetaData, getAttributeMetaData, getPresentation, getResourceKey, getSystem, isBidiEnabled, isConnectionEstablished, removeActiveStatusListener, removePropertyChangeListener, removeResourceListener, removeVetoableChangeListener, setPresentation, setResourceKey, toString
public static final java.lang.String ABSOLUTE_PATH
public static final java.lang.String CANONICAL_PATH
public static final java.lang.String CAN_READ
public static final java.lang.String CAN_WRITE
public static final java.lang.String CCSID
public static final java.lang.String CREATED
public static final java.lang.String EXISTS
public static final java.lang.String IS_ABSOLUTE
public static final java.lang.String IS_DIRECTORY
public static final java.lang.String IS_FILE
public static final java.lang.String IS_HIDDEN
public static final java.lang.String IS_READ_ONLY
public static final java.lang.String LAST_ACCESSED
public static final java.lang.String LAST_MODIFIED
public static final java.lang.String LENGTH
public static final java.lang.String NAME
public static final java.lang.String OWNERID
public static final java.lang.String PARENT
public static final java.lang.String PATH
public static final java.lang.String TYPE
TYPE_DIRECTORY
- This is a directory.
TYPE_FILE
- This is a file.
TYPE_UNKNOWN
- The type is unknown.
public static final java.lang.String TYPE_DIRECTORY
TYPE
,
Constant Field Valuespublic static final java.lang.String TYPE_FILE
TYPE
,
Constant Field Valuespublic static final java.lang.String TYPE_UNKNOWN
TYPE
,
Constant Field Valuespublic RIFSFile()
public RIFSFile(AS400 system, java.lang.String path)
system
- The system.path
- The file path name.protected void commitAttributeChanges(java.lang.Object[] attributeIDs, java.lang.Object[] values) throws ResourceException
commitAttributeChanges
in class ChangeableResource
attributeIDs
- The attribute IDs for the specified attribute changes.values
- The specified attribute changesResourceException
- If an error occurs.public void delete() throws ResourceException
ResourceException
- If an error occurs.protected void establishConnection() throws ResourceException
The method is called by the resource framework automatically when the connection needs to be established.
establishConnection
in class Resource
ResourceException
- If an error occurs.protected void freezeProperties() throws ResourceException
The method is called by the resource framework automatically when the properties need to be frozen.
freezeProperties
in class Resource
ResourceException
- If an error occurs.public java.lang.Object getAttributeUnchangedValue(java.lang.Object attributeID) throws ResourceException
getAttributeUnchangedValue
in class ChangeableResource
attributeID
- Identifies the attribute.ResourceException
- If an error occurs.public java.lang.String getPath()
public void refreshAttributeValues() throws ResourceException
refreshAttributeValues
in class ChangeableResource
ResourceException
- If an error occurs.public void setPath(java.lang.String path)
path
- The file path name.public void setSystem(AS400 system) throws java.beans.PropertyVetoException