com.novell.admin.ns.fs
Interface FSNamespace

All Superinterfaces:
AdminNamespace, MultiObjModificationNamespace, NamespaceSnapin, Snapin
All Known Subinterfaces:
NWFSNamespace

public interface FSNamespace
extends AdminNamespace, NamespaceSnapin, , MultiObjModificationNamespace

Extends the AdminNamespace and provides the interface for the management of files and directories.


Field Summary
static java.lang.String name
           
static java.lang.String separator
           
 
Method Summary
 boolean canVolumeCompress(ObjectEntry obj)
          A check to determine if the selected File System volume can perform compressions.
 boolean canVolumeMigrate(ObjectEntry obj)
          A check to determine if the selected File System volume can perform migrations.
 void create(ObjectEntry parent, java.lang.String child, ObjectEntry trusteeOE, FSRights rights)
          creates a File System directory and assigns a trustee with rights to it
 ObjectEntry createObjectEntry(ObjectEntry parent, java.lang.String context)
          Deprecated. This routine was used to keep track of the federation point into the file system namespace. This was done in a dangerous way which could cause namespace inconsistencies. Please use getFSRootOE(ObjectEntry federationPointObject) to create initial or root ObjectEntries within the file system namespace.
 ObjectAttribute[] getAttributes(ObjectEntry obj)
          gets the attributes of a file, directory or volume in the File System
 java.lang.Object getContext(ObjectEntry objEntry)
          return the initial context to be used.
 java.util.Enumeration getDeletedObjectInformationList(ObjectEntry parent)
           
 java.util.Enumeration getDeletedObjectList(ObjectEntry parent, ResultModifier modifier)
           
 java.lang.String getDSFullName(java.lang.String fsDSName)
          converts the FileSystem DS name to a full DS name
 java.lang.String getDSFullName(java.lang.String dsName, java.lang.String treeName)
          converts the DS name to a full DS name
 java.lang.String getDSName(java.lang.String fsDSName)
          converts the FileSystem DS name to a regular DS name
 FSEntryAttribute getEntryAttribute(long attribute)
          Creates an EntryAttribute and initializes it with the attribute value.
 ObjectEntry getFederationObjectEntry()
          Deprecated. This routine may return erronous results unless specific namespace routines are called in a specific sequence. It will also return incorrect results if the filesystem namespace was federated into from multiple points using now deprecated namespace calls. The file system namespace should be federated into using getFSRootOE(ObjectEntry federationPointObject). Please use getFederationObjectEntry(ObjectEntry obj) in place of this routine.
 ObjectEntry getFederationObjectEntry(ObjectEntry obj)
          gets the Object Entry that the File System federated off of.
 java.lang.String[] getFederationObjectEntryTypeList()
          gets the list of names of the types of Object Entry that the File System federates off of.
 java.io.InputStream getFileInputStream(ObjectEntry objToUse)
          Returns an InputStream for the specified ObjectEntry.
 java.io.OutputStream getFileOutputStream(ObjectEntry objToUse)
          Returns an OutputStream for the specified ObjectEntry.
 long getFileSize(ObjectEntry fileOE)
          Returns athe size of the file
 java.lang.String getFSDSName(java.lang.String dsName)
          converts the NDS name to a File System DS name
 FSRootObjectEntry getFSRootOE(ObjectEntry federationPointObject)
          get an FSRootObjectEntry for a NDS volume object.
 java.lang.String getFullDirectoryPath(ObjectEntry obj)
          Determines the full directory path based on the ObjectEntry name.
 FSMODEntryAttr getMODEntryAttr()
          Creates an MODEntryAttr and initializes it as no values
 Rights getObjectEffectiveRights(ObjectEntry obj)
          Gets the effect rights the current user has on a particular File System object
 Rights getObjectEffectiveRights(ObjectEntry obj, java.lang.String trustee)
          Gets the effect rights a trustee has on a particular File System object
 ObjectEntry getObjectEntry(java.lang.String objEntryStr, boolean bUseStoredRootName)
          Deprecated. This routine may return erronous results unless specific namespace routines are called in a specific sequence. It will also return incorrect results if the filesystem namespace was federated into from multiple points using now deprecated namespace calls. The file system namespace should be federated into using getFSRootOE(ObjectEntry federationPointObject). Please use getObjectEntry(ObjectEntry parentEntry, String objEntryStr) in place of this routine.
 java.lang.String getRootServer(ObjectEntry obj)
          Gets the root Server name from an ObjectEntry.
 java.lang.String getRootTree(ObjectEntry obj)
          Gets the NDS root Tree name for an ObjectEntry in the file system namespace.
 java.lang.String[] getTrusteePathList(ObjectEntry obj, java.lang.String trustee)
          return the list of files and directories the trustee has explicit rights to.
 int getUserSpaceInUse(ObjectEntry volumeObj, java.lang.String user)
          Gets the User Space In Use for a volume where a file system object entry resides
 long getVolumeBlockSize(ObjectEntry volumeObj)
          Gets the Block size from a volume
 boolean hasDeletedObjects()
          A check to determine if the File System handles deleted objects and has the capability to salvage and purge those objects
 boolean hasDeleteInhibit()
          return true if the File System has capability of inhibiting deletions, false otherwise.
 boolean hasDirectorySpaceRestrictions()
          A check to determine if the File System has the capability of handling directory space restrictions.
 boolean hasRenameInhibit()
          return true if the File System has capability of inhibiting renames, false otherwise.
 boolean hasTransactional()
          return true if the File System has capability of setting the tranactional attribute for objects, false otherwise.
 boolean hasTrustees()
          A check to determine if the File System has the capability of handling trustees of its objects.
 boolean hasUserVolumeSpaceRestrictions()
          A check to determine if the File System has the capability of handling user space restictions for a volume.
 boolean hasVolumeCompression()
          A check to determine if the File System has the capability of handling compressions for a volume.
 boolean hasVolumeMigration()
          A check to determine if the File System has the capability of handling migrations for a volume.
 boolean isDeleteInhibit(ObjectEntry obj)
          return true if the object is delete inhibited, false otherwise.
 boolean isReadOnly(ObjectEntry obj)
          return true if the object is read-only, false otherwise.
 boolean isRenameInhibit(ObjectEntry obj)
          return true if the object is rename inhibited, false otherwise.
 boolean isTransactional(ObjectEntry obj)
          return true if the object is transactional, false otherwise.
 java.lang.String mapVolumeToRootName(ObjectEntry volumeObj)
          return the root name of the File System based on the Federation volume.
 void purge(ObjectEntry parent, java.util.Vector deletedFileList)
          purges a deleted file from the File System
 void removeDeleteReadOnly(ObjectEntry obj)
          remove the delete read-only attributes from the object.
 void removeReadOnly(ObjectEntry obj)
          remove the read-only attributes from the object.
 void removeRenameReadOnly(ObjectEntry obj)
          remove the rename read-only attributes from the object.
 void replaceRenameReadOnly(ObjectEntry obj, boolean isReadOnly)
          replaces the rename read-only attributes to the object.
 void salvage(ObjectEntry parent, java.lang.Object facade, java.lang.String newName)
          salvages a deleted object in a particular location back to the File System
 void setTrusteeRestriction(ObjectEntry volumeObj, ObjectEntry trusteeOE, int limit)
          Modifies a File System volume by assigning a trustee with restrictions to it.
 void setTrusteeRights(ObjectEntry objEntry, ObjectEntry trusteeOE, int rights)
          Modifies a File System object by assigning a trustee with rights to it
 void unAuthenticate(ObjectEntry obj)
          UnAuthenticates the object from any filesystem (i.e server/filesystem) that it may have created an authenticated identity to.
 
Methods inherited from interface com.novell.admin.ns.AdminNamespace
create, createNSObject, createNSObject, createObjectEntry, delete, doesExist, freeDetails, getAttributeDefinition, getAttributes, getChildren, getChildren, getClassDefinition, getDetails, getDetails, getFullName, getMaxNameLength, getObjectEffectiveRights, getObjectEntry, getObjectEntry, getObjectType, getObjectTypes, getPropertyEffectiveRights, getSchemaDefinition, move, rename, setAttributes, update
 
Methods inherited from interface com.novell.application.console.snapin.NamespaceSnapin
getChildContainers, getInitialObjectEntries, getUniqueID
 
Methods inherited from interface com.novell.admin.ns.MultiObjModificationNamespace
getMODDetails, updateMultipleObjects
 
Methods inherited from interface com.novell.application.console.snapin.Snapin
getSnapinDescription, getSnapinName, initSnapin, shutdownSnapin
 

Field Detail

name

public static final java.lang.String name

separator

public static final java.lang.String separator
Method Detail

createObjectEntry

public ObjectEntry createObjectEntry(ObjectEntry parent,
                                     java.lang.String context)
                              throws NamespaceException,
                                     SPIException
Deprecated. This routine was used to keep track of the federation point into the file system namespace. This was done in a dangerous way which could cause namespace inconsistencies. Please use getFSRootOE(ObjectEntry federationPointObject) to create initial or root ObjectEntries within the file system namespace.
Create an ObjectEntry for a context. this one exists specifically to keep track of the object that was selected which caused the namespace to be federated.
Parameters:
parent - The ObjectEntry which is part of the parent Namespace where the federation into the File System Namespace occurred.
context - The context of the ObjectEntry. The name it will use. example "simpleServerName/volName" or "elvis/sys" If parent is a NDS Volume object this parameter is ignored.
Returns:
The ObjectEntry associated with the context. If possible this will be a FSRootObjectEntry which is the new way of doing things.

getFSRootOE

public FSRootObjectEntry getFSRootOE(ObjectEntry federationPointObject)
                              throws SPIException
get an FSRootObjectEntry for a NDS volume object.
Parameters:
federationPointObject - The ObjectEntry which is part of the parent Namespace where the federation into the File System Namespace occurred. This is the NDS volume object
Returns:
The ObjectEntry in the file system namespace associated with the federation object in the NDS namespace.

create

public void create(ObjectEntry parent,
                   java.lang.String child,
                   ObjectEntry trusteeOE,
                   FSRights rights)
            throws SPIException,
                   SnapinVetoException,
                   NamespaceException,
                   IncompatibleComponentException
creates a File System directory and assigns a trustee with rights to it
Parameters:
parent - The parent directory ObjectEntry
child - The name of the child directory
trusteeOE - The trustee NDS User ObjectEntry
rights - The trustee's rights for the newly created directory

getFederationObjectEntry

public ObjectEntry getFederationObjectEntry()
Deprecated. This routine may return erronous results unless specific namespace routines are called in a specific sequence. It will also return incorrect results if the filesystem namespace was federated into from multiple points using now deprecated namespace calls. The file system namespace should be federated into using getFSRootOE(ObjectEntry federationPointObject). Please use getFederationObjectEntry(ObjectEntry obj) in place of this routine.
gets the Object Entry that the File System federated off of.
Returns:
the federation ObjectEntry

getFederationObjectEntry

public ObjectEntry getFederationObjectEntry(ObjectEntry obj)
gets the Object Entry that the File System federated off of.
Parameters:
obj - an object entry from the file - this does not have to be a root/volume type of object. Any directory or file type of OE will do
Returns:
the federation ObjectEntry from the parent namespace (ndsnamespace)

getFederationObjectEntryTypeList

public java.lang.String[] getFederationObjectEntryTypeList()
gets the list of names of the types of Object Entry that the File System federates off of.
Returns:
the list of federation ObjectType names

getFSDSName

public java.lang.String getFSDSName(java.lang.String dsName)
converts the NDS name to a File System DS name
Parameters:
dsName - the NDS name to be converted.
Returns:
the FS DS name of the NDS name.

getDSName

public java.lang.String getDSName(java.lang.String fsDSName)
converts the FileSystem DS name to a regular DS name
Parameters:
fsDSName - the FS DS name.
Returns:
the regular DS name

getDSFullName

public java.lang.String getDSFullName(java.lang.String fsDSName)
converts the FileSystem DS name to a full DS name
Parameters:
fsDSName - the FS DS name.
Returns:
the full DS name.

getDSFullName

public java.lang.String getDSFullName(java.lang.String dsName,
                                      java.lang.String treeName)
converts the DS name to a full DS name
Parameters:
dsName - the unrooted DS name.
treeName - the tree name associated with the DS name.
Returns:
the full DS name.

getAttributes

public ObjectAttribute[] getAttributes(ObjectEntry obj)
                                throws SPIException
gets the attributes of a file, directory or volume in the File System
Parameters:
obj - The file, directory, or volume to get the list of attributes for
Returns:
the list of Object Attributes associated with the file, directory, or volume

getObjectEffectiveRights

public Rights getObjectEffectiveRights(ObjectEntry obj,
                                       java.lang.String trustee)
                                throws SPIException
Gets the effect rights a trustee has on a particular File System object
Parameters:
obj - the object to check the rights on.
trustee - the trustee to check the object rights for.
Returns:
The rights the trustee has on the specified object
Throws:
SPIException - The ObjectEntry does not exist.

getObjectEffectiveRights

public Rights getObjectEffectiveRights(ObjectEntry obj)
                                throws SPIException
Gets the effect rights the current user has on a particular File System object
Parameters:
obj - the object to check the rights on.
Returns:
The rights the current user has on the specified object
Throws:
SPIException - The ObjectEntry does not exist.

getObjectEntry

public ObjectEntry getObjectEntry(java.lang.String objEntryStr,
                                  boolean bUseStoredRootName)
                           throws SPIException
Deprecated. This routine may return erronous results unless specific namespace routines are called in a specific sequence. It will also return incorrect results if the filesystem namespace was federated into from multiple points using now deprecated namespace calls. The file system namespace should be federated into using getFSRootOE(ObjectEntry federationPointObject). Please use getObjectEntry(ObjectEntry parentEntry, String objEntryStr) in place of this routine.
gets a File System ObjectEntry based on the name of the ObjectEntry

The object must exist in the namespace, or this method will fail.

Parameters:
objEntryStr - the name of the ObjectEntry to retrieve. If a stored root name is used, the format is "dir1/dir2/file". If the stored root name is not used, the format is "simpleServerName/volName/dir1/dir2/file"
bUseStoredRootName - If false, then the root name must be part of the objEntryStr. If true, then the stored root name from the previous call to createObjectEntry(ObjectEntry parent, String context) is used. That is also a deprecated call.
Returns:
the ObjectEntry newly created from the name

hasDeletedObjects

public boolean hasDeletedObjects()
A check to determine if the File System handles deleted objects and has the capability to salvage and purge those objects
Returns:
true if it handles deleted objects; false otherwise

purge

public void purge(ObjectEntry parent,
                  java.util.Vector deletedFileList)
           throws SPIException,
                  SnapinVetoException
purges a deleted file from the File System
Parameters:
parent - The File System ObjectEntry representing the location of the deleted file
deletedFileList - The array of the deleted files

salvage

public void salvage(ObjectEntry parent,
                    java.lang.Object facade,
                    java.lang.String newName)
             throws SPIException,
                    SnapinVetoException
salvages a deleted object in a particular location back to the File System
Parameters:
parent - The File System ObjectEntry representing the location of the deleted object.
facade - The deleted object information
newName - The name to salvage the deleted object to

getDeletedObjectList

public java.util.Enumeration getDeletedObjectList(ObjectEntry parent,
                                                  ResultModifier modifier)
                                           throws SPIException
Parameters:
parent - The File System ObjectEntry representing the location of the deleted objects.
modifier - The filtering information
Returns:
the list of deleted objects that can be found in the specified directory.

getDeletedObjectInformationList

public java.util.Enumeration getDeletedObjectInformationList(ObjectEntry parent)
                                                      throws SPIException
Parameters:
parent - The File System ObjectEntry representing the location of the deleted objects.
Returns:
the list of deleted file information's ValueLists that can be found in the specified directory.

hasTrustees

public boolean hasTrustees()
A check to determine if the File System has the capability of handling trustees of its objects.
Returns:
true if it handles trustees; false otherwise

setTrusteeRights

public void setTrusteeRights(ObjectEntry objEntry,
                             ObjectEntry trusteeOE,
                             int rights)
                      throws SPIException,
                             IncompatibleComponentException
Modifies a File System object by assigning a trustee with rights to it
Parameters:
objEntry - The File System ObjectEntry
trusteeOE - The trustee NDS User ObjectEntry
rights - The trustee's rights for the File System object

setTrusteeRestriction

public void setTrusteeRestriction(ObjectEntry volumeObj,
                                  ObjectEntry trusteeOE,
                                  int limit)
                           throws SPIException,
                                  IncompatibleComponentException
Modifies a File System volume by assigning a trustee with restrictions to it. The restriction limits the amount of space a trustee is allowed for the specified volume.
Parameters:
volumeObj - The File System Volume ObjectEntry
trusteeOE - The trustee NDS User ObjectEntry
limit - The trustee's restriction for the File System volume

getTrusteePathList

public java.lang.String[] getTrusteePathList(ObjectEntry obj,
                                             java.lang.String trustee)
                                      throws SPIException
return the list of files and directories the trustee has explicit rights to.

hasUserVolumeSpaceRestrictions

public boolean hasUserVolumeSpaceRestrictions()
A check to determine if the File System has the capability of handling user space restictions for a volume.
Returns:
true if it handles the restrictions; false otherwise

hasDirectorySpaceRestrictions

public boolean hasDirectorySpaceRestrictions()
A check to determine if the File System has the capability of handling directory space restrictions.
Returns:
true if it handles the restrictions; false otherwise

getUserSpaceInUse

public int getUserSpaceInUse(ObjectEntry volumeObj,
                             java.lang.String user)
                      throws SPIException
Gets the User Space In Use for a volume where a file system object entry resides
Parameters:
obj - a ObjectEntry in the file system namespace
user - the user whose space restriction in use is being looked for.
Returns:
The space in use in # of 4K pieces.
Throws:
SPIException -  

getRootTree

public java.lang.String getRootTree(ObjectEntry obj)
Gets the NDS root Tree name for an ObjectEntry in the file system namespace.
Parameters:
obj - a FileSystem ObjectEntry.
Returns:
The NDS root tree of the FileSystem ObjectEntry. Example If the name is "serverName/volName/dir1/dir2/file" and the serverName is a server in NDS in the tree named "fooTree" then "fooTree" is returned

getRootServer

public java.lang.String getRootServer(ObjectEntry obj)
Gets the root Server name from an ObjectEntry.
Parameters:
obj - a FileSystem ObjectEntry.
Returns:
The root server of the FileSystem ObjectEntry. if the name of the object was "serverName/volName/dir1/dir2/file" then this would return "serverName"

getFullDirectoryPath

public java.lang.String getFullDirectoryPath(ObjectEntry obj)
Determines the full directory path based on the ObjectEntry name.
Parameters:
obj - a FileSystem ObjectEntry.
Returns:
The full directory path of the FileSystem ObjectEntry.

mapVolumeToRootName

public java.lang.String mapVolumeToRootName(ObjectEntry volumeObj)
return the root name of the File System based on the Federation volume.
Parameters:
volumeObj - an NDS Volume ObjectEntry from the NDSNamespace.
Returns:
The File System Volume root name of the NDS Volume ObjectEntry. It is the "simpleServerName/volname" (i.e elvis/sys not elvis.prv.novell/sys)

getVolumeBlockSize

public long getVolumeBlockSize(ObjectEntry volumeObj)
Gets the Block size from a volume
Parameters:
volumeObj - the volume as an ObjectEntry.
Returns:
The block size of the specified volume

hasVolumeMigration

public boolean hasVolumeMigration()
A check to determine if the File System has the capability of handling migrations for a volume.
Returns:
true if it handles the migrations; false otherwise

canVolumeMigrate

public boolean canVolumeMigrate(ObjectEntry obj)
                         throws SPIException
A check to determine if the selected File System volume can perform migrations.
Parameters:
obj - the File System ObjectEntry associated with a volume.
Returns:
true if it can perform the migrations; false otherwise
Throws:
SPIException - The ObjectEntry is not associated with a volume.

hasVolumeCompression

public boolean hasVolumeCompression()
A check to determine if the File System has the capability of handling compressions for a volume.
Returns:
true if it handles the compressions; false otherwise

canVolumeCompress

public boolean canVolumeCompress(ObjectEntry obj)
                          throws SPIException
A check to determine if the selected File System volume can perform compressions.
Parameters:
obj - the File System ObjectEntry associated with a volume.
Returns:
true if it can perform the compressions; false otherwise
Throws:
SPIException - The ObjectEntry is not associated with a volume.

getMODEntryAttr

public FSMODEntryAttr getMODEntryAttr()
Creates an MODEntryAttr and initializes it as no values
Returns:
an FSMODEntryAttr object

getEntryAttribute

public FSEntryAttribute getEntryAttribute(long attribute)
Creates an EntryAttribute and initializes it with the attribute value.
Parameters:
attribute - the attribute containing the file system attribute bits that are set or not set.
Returns:
an FSEntryAttribute object

isReadOnly

public boolean isReadOnly(ObjectEntry obj)
return true if the object is read-only, false otherwise.

hasDeleteInhibit

public boolean hasDeleteInhibit()
return true if the File System has capability of inhibiting deletions, false otherwise.

isDeleteInhibit

public boolean isDeleteInhibit(ObjectEntry obj)
return true if the object is delete inhibited, false otherwise.

hasRenameInhibit

public boolean hasRenameInhibit()
return true if the File System has capability of inhibiting renames, false otherwise.

isRenameInhibit

public boolean isRenameInhibit(ObjectEntry obj)
return true if the object is rename inhibited, false otherwise.

hasTransactional

public boolean hasTransactional()
return true if the File System has capability of setting the tranactional attribute for objects, false otherwise.

isTransactional

public boolean isTransactional(ObjectEntry obj)
return true if the object is transactional, false otherwise.

removeReadOnly

public void removeReadOnly(ObjectEntry obj)
remove the read-only attributes from the object.

removeDeleteReadOnly

public void removeDeleteReadOnly(ObjectEntry obj)
remove the delete read-only attributes from the object.

removeRenameReadOnly

public void removeRenameReadOnly(ObjectEntry obj)
remove the rename read-only attributes from the object.

replaceRenameReadOnly

public void replaceRenameReadOnly(ObjectEntry obj,
                                  boolean isReadOnly)
replaces the rename read-only attributes to the object.

getContext

public java.lang.Object getContext(ObjectEntry objEntry)
                            throws SPIException
return the initial context to be used.

getFileSize

public long getFileSize(ObjectEntry fileOE)
                 throws SPIException
Returns athe size of the file
Parameters:
fileOE - The File System Object Entry representing the file. It is expected to be a File objecttype.
Returns:
the length of the file
Throws:
SPIException - The file does not exist

getFileInputStream

public java.io.InputStream getFileInputStream(ObjectEntry objToUse)
                                       throws SPIException
Returns an InputStream for the specified ObjectEntry. It is the responsibility of the caller to make sure this stream will be closed.
Parameters:
objToUse - The File System Object Entry representing the file
Returns:
the InputStream to the specified file

getFileOutputStream

public java.io.OutputStream getFileOutputStream(ObjectEntry objToUse)
                                         throws SPIException
Returns an OutputStream for the specified ObjectEntry. It is the responsibility of the caller to make sure this stream will be closed.
Parameters:
objToUse - The File System Object Entry representing the file
Returns:
the OutputStream to the specified file

unAuthenticate

public void unAuthenticate(ObjectEntry obj)
                    throws SPIException
UnAuthenticates the object from any filesystem (i.e server/filesystem) that it may have created an authenticated identity to. This is similar to logging out.
Parameters:
obj - The object to unauthenticate.
Throws:
SPIException - Thrown when the service provider returns an error.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.