## org.w3c.tools.resources
Class PassDirectory

    java.lang.Object
      |
      +--org.w3c.tools.resources.AttributeHolder
            |
            +--org.w3c.tools.resources.Resource
                  |
                  +--org.w3c.tools.resources.FramedResource
                        |
                        +--org.w3c.tools.resources.AbstractContainer
                              |
                              +--org.w3c.tools.resources.ContainerResource
                                    |
                                    +--org.w3c.tools.resources.DirectoryResource
                                          |
                                          +--org.w3c.tools.resources.PassDirectory

public class PassDirectory
extends DirectoryResource

A directory resource able to pass (jump) into some non-related directory. This resource provides something similar to the PASSS rule of the CERN server: it allows you to export a directory that is not strictly under the server physicall space (e.g. none of its parent directory is the server space directory).

Using this resource means that your exported space is no more restrained to the server space directory, which can be considered as a security problem.

Field Summary
`protected static int` `ATTR_PASSTARGET` Attribute index - The target physicall directory of this resource.

Fields inherited from class org.w3c.tools.resources.DirectoryResource
`ATTR_DIRECTORY, ATTR_DIRSTAMP, ATTR_EXTENSIBLE, ATTR_INDEXER, ATTR_SHRINKABLE`

Fields inherited from class org.w3c.tools.resources.ContainerResource
`acquired, ATTR_KEY, debug`

Fields inherited from class org.w3c.tools.resources.AbstractContainer
`ur`

Fields inherited from class org.w3c.tools.resources.FramedResource
`ATTR_OID, attrListener, debugEvent, event_disabled, framesRef, structListener`

Fields inherited from class org.w3c.tools.resources.Resource
`ATTR_CONTEXT, ATTR_HELP_URL, ATTR_IDENTIFIER, ATTR_LAST_MODIFIED, ATTR_PARENT, ATTR_RESOURCE_FRAMES, ATTR_STORE_ENTRY, ATTR_URL, co, id`

Fields inherited from class org.w3c.tools.resources.AttributeHolder
`attributes, values`

Constructor Summary
`PassDirectory()`

Method Summary
`java.io.File` `getDirectory()` The getDirectory method now returns the pass-directory.
`void` `initialize(java.lang.Object[] values)` Make the directory attribute default to the target location.
`void` `setValue(int idx, java.lang.Object value)` Catch side-effects on pass-target, to absolutize it.

Methods inherited from class org.w3c.tools.resources.DirectoryResource
`createDefaultResource, createDefaultResource, createDirectoryResource, createResource, createResource, delete, enumerateAllResourceIdentifiers, enumerateResourceIdentifiers, getDirStamp, getExtensibleFlag, getIndexedName, getIndexer, getShrinkableFlag, index, lookup, reindex, resourceRemoved, unsafeGetDirectory, unsafeGetShrinkableFlag, updateDefaultChildAttributes, verify`

Methods inherited from class org.w3c.tools.resources.ContainerResource
`acquireChildren, addResource, delete, deleteChildren, getChildrenSpaceEntry, getClone, getKey, getMatchingCharsCount, getSpaceEntry, internalLookup, lookup, notifyUnload, registerResource, replace, resourceCreated, resourceModified`

Methods inherited from class org.w3c.tools.resources.AbstractContainer
`attributeChanged, enumerateResourceIdentifiers, resourceUnloaded`

Methods inherited from class org.w3c.tools.resources.FramedResource

`addAttributeChangedListener, addStructureChangedListener, collectFramesReference, disableEvent, displayEvent, enableEvent, eventDisabled, fireAttributeChangeEvent, fireStructureChangedEvent, fireStructureChangedEvent, frameAdded, frameModified, frameRemoved, getFrame, getFrame, getFrameReference, getFrameReference, getFramesReference, getOid, markModified, perform, performFrames, postAttributeChangeEvent, postEvent, postStructureChangedEvent, postStructureChangedEvent, processEvent, registerFrame, registerFrameIfNone, removeAttributeChangedListener, removeStructureChangedListener, setSilentValue, setSilentValue, unregisterFrame`

Methods inherited from class org.w3c.tools.resources.Resource
`acceptUnload, checkMultipleLock, collectFrames, getContext, getFrame, getFrames, getHelpURL, getHelpURL, getIdentifier, getLastModified, getParent, getResourceReference, getServer, getSpace, getStoreEntry, getURLPath, getValue, getValue, initialize, isInitialized, isUnloaded, pickleValues, setContext, setContext, setValue, unsafeGetContext, unsafeGetIdentifier, unsafeGetValue, updateAttributes`

Methods inherited from class org.w3c.tools.resources.AttributeHolder
`definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeGetString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ATTR_PASSTARGET

    protected static int ATTR_PASSTARGET

  Attribute index - The target physicall directory of this resource.

Constructor Detail

### PassDirectory

    public PassDirectory()

Method Detail

### setValue

    public void setValue(int idx,
                         java.lang.Object value)

  Catch side-effects on pass-target, to absolutize it.
  Overrides:
    setValue in class DirectoryResource
  Parameters:
    `idx` - The attribute to set.
    `value` - The new value.

### getDirectory

    public java.io.File getDirectory()

  The getDirectory method now returns the pass-directory.
  Overrides:
    getDirectory in class DirectoryResource
  Returns:
    The pass target location.

### initialize

    public void initialize(java.lang.Object[] values)

  Make the directory attribute default to the target location. This is required for classes that rely on the directory attribute to compute their own attributes.
  Overrides:
    initialize in class DirectoryResource
  Parameters:
    `values` - The values we should initialized from.