com.guiseframework.platform.web
Class WebCommandDepictEvent<C extends java.lang.Enum<C> & WebPlatformCommand>

java.lang.Object
  extended by java.util.EventObject
      extended by com.globalmentor.event.AbstractEvent
          extended by com.guiseframework.event.AbstractGuiseEvent
              extended by com.guiseframework.platform.AbstractPlatformEvent
                  extended by com.guiseframework.platform.AbstractDepictEvent
                      extended by com.guiseframework.platform.web.AbstractWebDepictEvent
                          extended by com.guiseframework.platform.web.WebCommandDepictEvent<C>
Type Parameters:
C - The type of command.
All Implemented Interfaces:
com.globalmentor.event.Event, GuiseEvent, DepictEvent, PlatformCommandMessage<C>, PlatformEvent, PlatformMessage, WebDepictEvent, WebPlatformCommandMessage<C>, WebPlatformEvent, WebPlatformMessage, java.io.Serializable

public class WebCommandDepictEvent<C extends java.lang.Enum<C> & WebPlatformCommand>
extends AbstractWebDepictEvent
implements WebPlatformCommandMessage<C>

A command to or from a depicted object on the web platform.

Author:
Garret Wilson Copyright (c) 2007 GlobalMentor, Inc.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WebCommandDepictEvent(DepictedObject depictedObject, C command, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Depicted object, command, and parameters map constructor.
WebCommandDepictEvent(DepictedObject depictedObject, C command, com.globalmentor.model.NameValuePair<java.lang.String,java.lang.Object>... parameters)
          Depicted object, command, and parameters constructor.
 
Method Summary
 C getCommand()
           
 java.util.Map<java.lang.String,java.lang.Object> getParameters()
           
 
Methods inherited from class com.guiseframework.platform.AbstractDepictEvent
getDepictedObject
 
Methods inherited from class com.guiseframework.event.AbstractGuiseEvent
getSession
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.guiseframework.platform.DepictEvent
getDepictedObject
 
Methods inherited from interface com.globalmentor.event.Event
getSource
 

Constructor Detail

WebCommandDepictEvent

public WebCommandDepictEvent(DepictedObject depictedObject,
                             C command,
                             com.globalmentor.model.NameValuePair<java.lang.String,java.lang.Object>... parameters)
Depicted object, command, and parameters constructor.

Parameters:
depictedObject - The depicted object on which the event initially occurred.
command - The command.
parameters - The parameters of the command; parameters with duplicate names replace earlier parameters of the same name.
Throws:
java.lang.NullPointerException - if the given depicted object, command, and/or parameters is null.

WebCommandDepictEvent

public WebCommandDepictEvent(DepictedObject depictedObject,
                             C command,
                             java.util.Map<java.lang.String,java.lang.Object> parameters)
Depicted object, command, and parameters map constructor.

Parameters:
depictedObject - The depicted object on which the event initially occurred.
command - The command.
parameters - The map representing the parameters of the command.
Throws:
java.lang.NullPointerException - if the given depicted object, command, and/or parameters is null.
Method Detail

getCommand

public C getCommand()
Specified by:
getCommand in interface PlatformCommandMessage<C extends java.lang.Enum<C> & WebPlatformCommand>
Returns:
The command.

getParameters

public java.util.Map<java.lang.String,java.lang.Object> getParameters()
Specified by:
getParameters in interface WebPlatformCommandMessage<C extends java.lang.Enum<C> & WebPlatformCommand>
Returns:
The read-only map of parameters, which will be encoded in JavaScript Object Notation (JSON).


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.