| java.lang.Object org.w3c.tools.resources.AttributeHolder org.w3c.tools.resources.Resource org.w3c.tools.resources.FramedResource
All known Subclasses: org.w3c.jigedit.tools.ToolsLister, org.w3c.jigedit.filters.PutListResource, org.w3c.jigsaw.resources.DirectoryLister, org.w3c.jigsaw.servlet.ServletWrapper, org.w3c.tools.resources.AbstractContainer, org.w3c.jigsaw.admin.ResourceBroker, org.w3c.jigsaw.resources.CheckpointResource, org.w3c.tools.resources.FileResource, org.w3c.tools.resources.ResourceFrame, org.w3c.jigsaw.pics.LabelBureauResource, org.w3c.jigsaw.resources.PasswordEditor, org.w3c.jigsaw.tests.AttRes, org.w3c.tools.resources.UnknownResource,
FramedResource | public class FramedResource extends Resource implements FrameEventListener(Code) | | A FramedResource manage frames which are called during the
lookup and the perform.
|
Method Summary | |
public void | addAttributeChangedListener(AttributeChangedListener l) Add an attribute change listener. | public void | addStructureChangedListener(StructureChangedListener l) Add a structure change listener. | public synchronized ResourceReference[] | collectFramesReference(Class c) Collect any frame reference pointing to an instance of the given class.
Parameters: cls - The class of frames we are looking for. | public synchronized void | delete() Delete this Resource instance, and remove it from its store. | protected void | disableEvent() | protected void | displayEvent(FramedResource fr, EventObject evt) | protected void | enableEvent() | protected boolean | eventDisabled() | protected void | fireAttributeChangeEvent(AttributeChangedEvent evt) Fire an attribute change event. | protected void | fireStructureChangedEvent(int type) Fire an structure change event. | protected void | fireStructureChangedEvent(StructureChangedEvent evt) Fire an structure change event. | public void | frameAdded(FrameEvent evt) This handles the FRAME_ADDED kind of events. | public void | frameModified(FrameEvent evt) This handles the FRAME_MODIFIED kind of events. | public void | frameRemoved(FrameEvent evt) A frame is about to be removed
This handles the FRAME_REMOVED kind of events. | public Object | getClone(Object values) | public synchronized ResourceFrame | getFrame(Class c, String identifier) Get the frame of the given class and identifier. | public synchronized ResourceFrame | getFrame(String classname) Get the frame of the given class. | public synchronized ResourceReference | getFrameReference(Class c) Get the first occurence of a frame of the given class.
Parameters: cls - The class of te frame to look for. | public synchronized ResourceReference | getFrameReference(ResourceFrame frame) Get The FrameReference of the given frame, or null
if the frame is not registered.
Parameters: frame - The ResourceFrame. | public synchronized ResourceReference[] | getFramesReference() Collect all frames references. | public int | getOid() Get this resource's object identifier.
An object identifier is to be used specifically in etags. | public void | initialize(Object values) Initialize the frames of that framed resource. | public boolean | lookup(LookupState ls, LookupResult lr) Lookup the target resource. | public void | markModified() Mark this resource as having been modified. | public void | notifyUnload() This resource is being unloaded. | public ReplyInterface | perform(RequestInterface request) Perform the request. | protected ReplyInterface | performFrames(RequestInterface request) Perform the request on all the frames of that resource. | protected void | postAttributeChangeEvent(int idx, Object newvalue) post an attribute change event. | public void | postEvent(ResourceEvent evt) Post an Event in the Event Queue. | protected void | postStructureChangedEvent(ResourceReference rr, int type) post an structure change event. | protected void | postStructureChangedEvent(int type) post an structure change event. | public void | processEvent(ResourceEvent evt) (AWT Like), dspatch the Event to all our listeners. | public void | registerFrame(ResourceFrame frame, Hashtable defs) Initialize and attach a new ResourceFrame to that resource. | protected void | registerFrameIfNone(String classname, String identifier) Register a new ResourceFrame if none (from the same class) has been
registered. | public void | removeAttributeChangedListener(AttributeChangedListener l) Remove an attribute change listener. | public void | removeStructureChangedListener(StructureChangedListener l) Remove a structure change listener. | public synchronized void | setSilentValue(int idx, Object value) Set a value, without posting event. | public synchronized void | setSilentValue(String name, Object value) Set a value, without posting event. | public synchronized void | setValue(int idx, Object value) Set some of this resource attribute. | public synchronized void | unregisterFrame(ResourceFrame frame) Unregister a resource frame from the given resource. | ResourceFrame | unsafeGetFrame(Class c, String identifier) Get the frame of the given class and identifier. |
ATTR_OID | protected static int ATTR_OID(Code) | | Attribute index - The object identifier.
|
debugEvent | final protected boolean debugEvent(Code) | | Debug flag
|
event_disabled | protected boolean event_disabled(Code) | | Do we handle events?
|
addAttributeChangedListener | public void addAttributeChangedListener(AttributeChangedListener l)(Code) | | Add an attribute change listener.
Parameters: l - The new attribute change listener. |
addStructureChangedListener | public void addStructureChangedListener(StructureChangedListener l)(Code) | | Add a structure change listener.
Parameters: l - The new structure change listener. |
collectFramesReference | public synchronized ResourceReference[] collectFramesReference(Class c)(Code) | | Collect any frame reference pointing to an instance of the given class.
Parameters: cls - The class of frames we are looking for. An array of ResourceReference, containing a set of FrameReference pointing to instances of the given class, or null if no resource frame is available. |
delete | public synchronized void delete() throws MultipleLockException(Code) | | 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).
exception: MultipleLockException - if someone has locked this resource. |
disableEvent | protected void disableEvent()(Code) | | |
enableEvent | protected void enableEvent()(Code) | | |
eventDisabled | protected boolean eventDisabled()(Code) | | |
fireAttributeChangeEvent | protected void fireAttributeChangeEvent(AttributeChangedEvent evt)(Code) | | Fire an attribute change event.
Parameters: evt - the AttributeChangedEvent to fire. |
fireStructureChangedEvent | protected void fireStructureChangedEvent(int type)(Code) | | Fire an structure change event.
Parameters: type - The type of the event. |
fireStructureChangedEvent | protected void fireStructureChangedEvent(StructureChangedEvent evt)(Code) | | Fire an structure change event.
Parameters: evt - the StructureChangedEvent to fire. |
frameAdded | public void frameAdded(FrameEvent evt)(Code) | | This handles the FRAME_ADDED kind of events.
Parameters: evt - The FrameEvent. |
frameModified | public void frameModified(FrameEvent evt)(Code) | | This handles the FRAME_MODIFIED kind of events.
Parameters: evt - The event describing the change. |
frameRemoved | public void frameRemoved(FrameEvent evt)(Code) | | A frame is about to be removed
This handles the FRAME_REMOVED kind of events.
Parameters: evt - The event describing the change. |
getFrame | public synchronized ResourceFrame getFrame(Class c, String identifier)(Code) | | Get the frame of the given class and identifier.
Parameters: cls - The class of frames we are looking for. Parameters: identifier - the frame identifier a ResourceFrame instance of null |
getFrame | public synchronized ResourceFrame getFrame(String classname)(Code) | | Get the frame of the given class.
Parameters: classname - the class name a ResourceFrame instance of null. |
getFrameReference | public synchronized ResourceReference getFrameReference(Class c)(Code) | | Get the first occurence of a frame of the given class.
Parameters: cls - The class of te frame to look for. A ResourceReference instance, or null. |
getFrameReference | public synchronized ResourceReference getFrameReference(ResourceFrame frame)(Code) | | Get The FrameReference of the given frame, or null
if the frame is not registered.
Parameters: frame - The ResourceFrame. A ResourceReference instance. |
getFramesReference | public synchronized ResourceReference[] getFramesReference()(Code) | | Collect all frames references.
An array of ResourceReference, containing a set of FrameReference instances or null if no resourceframe is available. |
getOid | public int getOid()(Code) | | Get this resource's object identifier.
An object identifier is to be used specifically in etags. It's purpose
is to uniquify the etag of a resource. It's computed as a random number
, on demand only.
A uniq object identifier for that resource, as an inteeger. |
initialize | public void initialize(Object values)(Code) | | Initialize the frames of that framed resource.
Parameters: values - Default attribute values. |
markModified | public void markModified()(Code) | | Mark this resource as having been modified.
|
notifyUnload | public void notifyUnload()(Code) | | This resource is being unloaded.
The resource is being unloaded from memory, perform any additional
cleanup required.
|
postAttributeChangeEvent | protected void postAttributeChangeEvent(int idx, Object newvalue)(Code) | | post an attribute change event. Actually this kind of event should
not be posted. So fire them!
Parameters: idx - The index of the attribute that has changed. Parameters: newvalue - The new value for that attribute. |
postEvent | public void postEvent(ResourceEvent evt)(Code) | | Post an Event in the Event Queue.
Parameters: evt - The Event to post. |
postStructureChangedEvent | protected void postStructureChangedEvent(ResourceReference rr, int type)(Code) | | post an structure change event.
Parameters: rr - the ResourceReference of the source. Parameters: type - The type of the event. |
postStructureChangedEvent | protected void postStructureChangedEvent(int type)(Code) | | post an structure change event.
Parameters: type - The type of the event. |
processEvent | public void processEvent(ResourceEvent evt)(Code) | | (AWT Like), dspatch the Event to all our listeners.
Parameters: evt - The resourceEvent to dispatch. |
registerFrame | public void registerFrame(ResourceFrame frame, Hashtable defs)(Code) | | Initialize and attach a new ResourceFrame to that resource.
Parameters: frame - An uninitialized ResourceFrame instance. Parameters: defs - A default set of attribute values. |
removeAttributeChangedListener | public void removeAttributeChangedListener(AttributeChangedListener l)(Code) | | Remove an attribute change listener.
Parameters: l - The listener to remove. |
removeStructureChangedListener | public void removeStructureChangedListener(StructureChangedListener l)(Code) | | Remove a structure change listener.
Parameters: l - The listener to remove. |
setSilentValue | public synchronized void setSilentValue(int idx, Object value)(Code) | | Set a value, without posting event.
Parameters: idx - The attribute index, in the list of attributes advertized by the resource. Parameters: value - The new value for this attribute. |
setSilentValue | public synchronized void setSilentValue(String name, Object value)(Code) | | Set a value, without posting event.
Parameters: name - The attribute name. Parameters: value - The new value for the attribute. |
setValue | public synchronized void setValue(int idx, Object value)(Code) | | Set some of this resource attribute. We overide setValue to post
events.
|
unregisterFrame | public synchronized void unregisterFrame(ResourceFrame frame)(Code) | | Unregister a resource frame from the given resource.
Parameters: frame - The frame to unregister from the resource. |
unsafeGetFrame | ResourceFrame unsafeGetFrame(Class c, String identifier)(Code) | | Get the frame of the given class and identifier.
Parameters: cls - The class of frames we are looking for. Parameters: identifier - the frame identifier a ResourceFrame instance of null |
Methods inherited from org.w3c.tools.resources.AttributeHolder | public boolean definesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc) public boolean definesAttribute(String name) throws IllegalAttributeAccess(Code)(Java Doc) public Attribute[] getAttributes()(Code)(Java Doc) public boolean getBoolean(int idx, boolean def)(Code)(Java Doc) public char getChar(int idx, char def)(Code)(Java Doc) public Object getClone(Object values)(Code)(Java Doc) public synchronized Object getClone()(Code)(Java Doc) public synchronized Object getClone(Hashtable defs)(Code)(Java Doc) public double getDouble(int idx, double def)(Code)(Java Doc) public float getFloat(int idx, float def)(Code)(Java Doc) public int getInt(int idx, int def)(Code)(Java Doc) public long getLong(int idx, long def)(Code)(Java Doc) public String getString(int idx, String def)(Code)(Java Doc) public synchronized Object getValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc) public Object getValue(String name, Object def) throws IllegalAttributeAccess(Code)(Java Doc) public synchronized void initialize(Object nvalues)(Code)(Java Doc) public synchronized void initialize(Hashtable defs)(Code)(Java Doc) public int lookupAttribute(String name)(Code)(Java Doc) public synchronized void pickleValues(Hashtable defs)(Code)(Java Doc) public void print(PrintStream out)(Code)(Java Doc) public void setBoolean(int idx, boolean b)(Code)(Java Doc) public void setChar(int idx, char ch) throws IllegalAttributeAccess(Code)(Java Doc) public void setDouble(int idx, double d) throws IllegalAttributeAccess(Code)(Java Doc) public void setFloat(int idx, float f) throws IllegalAttributeAccess(Code)(Java Doc) public void setInt(int idx, int i) throws IllegalAttributeAccess(Code)(Java Doc) public void setLong(int idx, long l) throws IllegalAttributeAccess(Code)(Java Doc) public void setString(int idx, String s) throws IllegalAttributeAccess(Code)(Java Doc) public synchronized void setValue(int idx, Object value)(Code)(Java Doc) public void setValue(String name, Object value)(Code)(Java Doc) public boolean unsafeDefinesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc) public double unsafeGetDouble(int idx, double def)(Code)(Java Doc) public String unsafeGetString(int idx, String def)(Code)(Java Doc) public Object unsafeGetValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc)
|
|
|