org.spicefactory.pimento.generator.model
Class OperationModel

java.lang.Object
  extended by org.spicefactory.pimento.generator.model.OperationModel

public class OperationModel
extends Object

Represents the generator model for a single operation of a Cinnamon service.

Author:
Jens Halm

Constructor Summary
OperationModel(Class<?> serviceApi, Class<?> serviceImplementation, OperationConfig operation, GeneratorConfig config)
          Creates a new model instance
 
Method Summary
 String getAlias()
          Returns the alias of the operation (the client side method name).
 Set<String> getImports()
          Returns all classes used as operation parameter types for which import statements need to be generated.
 List<ParameterModel> getParams()
          Returns the generator models representing the operation parameters.
 String getReturnType()
          Returns the fully qualified ActionScript return type of the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationModel

public OperationModel(Class<?> serviceApi,
                      Class<?> serviceImplementation,
                      OperationConfig operation,
                      GeneratorConfig config)
Creates a new model instance

Parameters:
serviceApi - the Java service API
serviceImplementation - the Java service implementation (optional)
operation - the service operation
config - the generator configuration
Method Detail

getAlias

public String getAlias()
Returns the alias of the operation (the client side method name).

Returns:
the alias of the operation

getReturnType

public String getReturnType()
Returns the fully qualified ActionScript return type of the operation. The return type of the Java service method will be mapped to its corresponding ActionScript type. This is only needed for adding information about the result type to ASDoc comments, since in AS3 the service methods are all asynchronous.

Returns:
the ActionScript return type of the operation

getParams

public List<ParameterModel> getParams()
Returns the generator models representing the operation parameters.

Returns:
the generator models representing the operation parameters

getImports

public Set<String> getImports()
Returns all classes used as operation parameter types for which import statements need to be generated. The returned Set contains fully qualified class names.

Returns:
all classes for which import statements need to be generated