Class Add

java.lang.Object
org.vrspace.server.dto.Add
All Implemented Interfaces:
Command, SceneChange

public class Add extends Object implements SceneChange
Add is both a Command and a DTO. Add command is issued by a client to add some object(s) to the world. The client becomes owner of all added objects. Add DTO is sent to clients when new objects (typically users) enter the scene. JSON message structure for both cases is the same.
Author:
joe
  • Constructor Details

  • Method Details

    • addObject

      public Add addObject(VRObject t)
    • execute

      public ClientResponse execute(WorldManager world, Client client)
      Add objects to the world and to the scene scene, returns List of object identifiers (classname+id pairs). Performs check if object script url is allowed.
      Specified by:
      execute in interface Command
    • getObjects

      public List<VRObject> getObjects()
      List of VRObjects to add.
    • setObjects

      public void setObjects(List<VRObject> objects)
      List of VRObjects to add.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object