org.vrspace.server.object
Class PublicVrmlFile

java.lang.Object
  extended byjava.util.Observable
      extended byorg.vrspace.server.VRObject
          extended byorg.vrspace.server.DBObject
              extended byorg.vrspace.server.PublicDBObject
                  extended byorg.vrspace.server.OwnedDBObject
                      extended byorg.vrspace.server.object.File
                          extended byorg.vrspace.server.object.VrmlFile
                              extended byorg.vrspace.server.object.PublicVrmlFile
All Implemented Interfaces:
java.lang.Cloneable, HasTransform, java.util.Observer, Owned

public class PublicVrmlFile
extends VrmlFile

This class represents the most public type of a vrml file requiring event broadcasting. Its use is intended for those vrml files whose shared events require no database persistence, and no server-side event processing. All of the events expected by a VrmlFile (e.g. download, upload, and clone ) are dealt with in the exact same way as for a VrmlFile. All other events sent to this object will be forwarded to all observers. This is in stark contrast to other VRObjects which filter out any request with an event not corresponding to a field or set_ method.

Administrators: Provide this class with great caution as it is essentially is an open relay in the server.


Nested Class Summary
 
Nested classes inherited from class org.vrspace.server.object.VrmlFile
VrmlFile.ParsedUploadFilter
 
Nested classes inherited from class org.vrspace.server.object.File
File.GZippedUploadFilter, File.UploadFilter
 
Field Summary
 java.util.HashMap state
           
 
Fields inherited from class org.vrspace.server.object.VrmlFile
transform
 
Fields inherited from class org.vrspace.server.object.File
_downloads, _lastUpdate, _uploads, name, ownerRole, publicRole, url
 
Fields inherited from class org.vrspace.server.DBObject
db
 
Fields inherited from class org.vrspace.server.VRObject
db_id, primitiveMap, primitives
 
Constructor Summary
PublicVrmlFile()
           
 
Method Summary
 void sendEvent(Request req)
          Overrides OwnedDBObject.sendEvent().
 void set_parentRotation(Request req, java.lang.String args)
           
 void set_parentScale(Request req, java.lang.String args)
           
 void set_parentTranslation(Request req, java.lang.String args)
           
 void verifyEvent(Request req)
          Verifies that the request was meant to be received by a VRObject of this class and with this database id.
 
Methods inherited from class org.vrspace.server.object.VrmlFile
createTransform, getTransform, getTransformID, set__clone, set_download, set_upload, set_url, setTransform, update
 
Methods inherited from class org.vrspace.server.object.File
encodeAsURI, getClassAndId, grantAccess, processEvent, setValue
 
Methods inherited from class org.vrspace.server.OwnedDBObject
addOwner, isOwned, notifyOwners, ownershipRequired, removeOwner
 
Methods inherited from class org.vrspace.server.DBObject
delete, get, put, put
 
Methods inherited from class org.vrspace.server.VRObject
arrayToString, canRead, canWrite, clone, equals, fieldToText, fromString, fromText, getClassName, getField, getFields, getId, getID, getMemebers, hasField, hasMethod, isNew, newInstance, sendResponse, setField, setField, setField, setFields, setFields, stringToArray, toString, toText, toText, toText
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

state

public java.util.HashMap state
Constructor Detail

PublicVrmlFile

public PublicVrmlFile()
Method Detail

set_parentTranslation

public void set_parentTranslation(Request req,
                                  java.lang.String args)
                           throws java.lang.Exception
Throws:
java.lang.Exception

set_parentRotation

public void set_parentRotation(Request req,
                               java.lang.String args)
                        throws java.lang.Exception
Throws:
java.lang.Exception

set_parentScale

public void set_parentScale(Request req,
                            java.lang.String args)
                     throws java.lang.Exception
Throws:
java.lang.Exception

verifyEvent

public void verifyEvent(Request req)
                 throws RequestException
Verifies that the request was meant to be received by a VRObject of this class and with this database id. A RequestException is thrown if this is not verified.

Throws:
RequestException

sendEvent

public void sendEvent(Request req)
               throws RequestException
Overrides OwnedDBObject.sendEvent(). This method calls super.sendEvent() and if a RequestException is not thrown, the method exits. Otherwise the method calls setChanged() and then setValue(). In effect, this implements all the functionality of its ancestors, but if the event corresponds to an unknown field or method, simply forwards it to all observers.

Overrides:
sendEvent in class File
Throws:
RequestException