org.w3c.tools.resources
Class ExternalContainer

java.lang.Object
  extended by org.w3c.tools.resources.AttributeHolder
      extended by org.w3c.tools.resources.Resource
          extended by org.w3c.tools.resources.FramedResource
              extended by org.w3c.tools.resources.AbstractContainer
                  extended by org.w3c.tools.resources.ContainerResource
                      extended by org.w3c.tools.resources.ExternalContainer
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, ContainerInterface, AttributeChangedListener, FrameEventListener, StructureChangedListener
Direct Known Subclasses:
AuthRealm, IndexersCatalog, RealmsCatalog, TemplateContainer

public abstract class ExternalContainer
extends ContainerResource

A Container which manage an external store, outside the space.


Field Summary
protected  java.io.File repository
          Our external repository.
protected  boolean transientFlag
          Our transientFlag, is true that container must not be saved.
 
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
ExternalContainer()
           
ExternalContainer(java.lang.String identifier, ResourceContext context, boolean transientFlag)
           
 
Method Summary
protected  void acquireChildren()
          acquire children and notify space if we will be saved.
 ResourceReference createDefaultResource(java.lang.String name)
          Create a default child resource in that container.
 void delete()
          Delete this Resource instance , and remove it from its store.
abstract  java.io.File getRepository(ResourceContext context)
          Get The repository for this external container.
 void initialize(java.lang.Object[] values)
          Initialize ourself.
 void markModified()
          Mark this resource as having been modified.
 
Methods inherited from class org.w3c.tools.resources.ContainerResource
addResource, delete, deleteChildren, enumerateResourceIdentifiers, getChildrenSpaceEntry, getClone, getKey, getMatchingCharsCount, getSpaceEntry, internalLookup, lookup, lookup, notifyUnload, registerResource, replace, resourceCreated, resourceModified, resourceRemoved, updateDefaultChildAttributes
 
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, perform, performFrames, postAttributeChangeEvent, postEvent, postStructureChangedEvent, postStructureChangedEvent, processEvent, registerFrame, registerFrameIfNone, removeAttributeChangedListener, removeStructureChangedListener, setSilentValue, setSilentValue, setValue, 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, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, 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, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transientFlag

protected boolean transientFlag
Our transientFlag, is true that container must not be saved.


repository

protected java.io.File repository
Our external repository.

Constructor Detail

ExternalContainer

public ExternalContainer(java.lang.String identifier,
                         ResourceContext context,
                         boolean transientFlag)
Parameters:
id - The identifier.
context - The default context.
transientFlag - The transient flag.

ExternalContainer

public ExternalContainer()
Method Detail

createDefaultResource

public ResourceReference createDefaultResource(java.lang.String name)
Description copied from class: ContainerResource
Create a default child resource in that container. This method is called by the editor to add a default resource in the container under the given name. The meaning of default is left up to the container here.

Overrides:
createDefaultResource in class ContainerResource
Parameters:
name - The identifier for the new resource.

markModified

public void markModified()
Mark this resource as having been modified.

Overrides:
markModified in class FramedResource

acquireChildren

protected void acquireChildren()
acquire children and notify space if we will be saved.

Overrides:
acquireChildren in class ContainerResource

delete

public void delete()
            throws MultipleLockException
Delete this Resource instance , and remove it from its store. This method will erase definitely this resource, for ever, by removing it from its resource store (when doable).

Overrides:
delete in class ContainerResource
Throws:
MultipleLockException - if someone has locked this resource.

getRepository

public abstract java.io.File getRepository(ResourceContext context)
Get The repository for this external container. Warning: called in the constructor!

Parameters:
context - The container context.
Returns:
A File instance

initialize

public void initialize(java.lang.Object[] values)
Description copied from class: ContainerResource
Initialize ourself. As we are a container resource that really contains something, we make sure our URL ends properly with a slash.

Overrides:
initialize in class ContainerResource
Parameters:
values - Our default attribute values.