org.kuali.rice.ksb.api.bus.support
Class RestServiceDefinition

java.lang.Object
  extended by org.kuali.rice.ksb.api.bus.support.AbstractServiceDefinition
      extended by org.kuali.rice.ksb.api.bus.support.RestServiceDefinition
All Implemented Interfaces:
ServiceDefinition

public class RestServiceDefinition
extends AbstractServiceDefinition

Service definition for RESTful services. A JAX-WS service has a resource class, which is the class or interface marked by the JAX-WS annotations (e.g. @Path, @GET, etc). This may or may not be the implementation class.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
RestServiceDefinition()
          Default constructor.
 
Method Summary
protected  ServiceConfiguration configure()
           
 Map<Object,Object> getExtensionMappings()
           
 Map<Object,Object> getLanguageMappings()
           
 List<Object> getProviders()
           
 String getResourceClass()
           
 List<Object> getResources()
           
 Map<String,String> getResourceToClassNameMap()
           
 String getType()
          Returns the type of this service.
 boolean hasClass(String className)
           
 void setBusSecurity(Boolean busSecurity)
          To ensure transparency that RESTful services are not digitally signed, throw an exception if someone tries to enable bus security.
 void setExtensionMappings(Map<Object,Object> extensionMappings)
           
 void setLanguageMappings(Map<Object,Object> languageMappings)
           
 void setProviders(List<Object> providers)
           
 void setResourceClass(String resourceClass)
          Set the resourceClass, the class or interface marked by the JAX-WS annotations which specify the RESTful URL interface.
 void setResources(List<Object> resources)
           
 void validate()
          does some simple validation of this RESTServiceDefinition
 
Methods inherited from class org.kuali.rice.ksb.api.bus.support.AbstractServiceDefinition
equals, establishEndpoint, getApplicationId, getBusSecurity, getCredentialsType, getEndpointUrl, getInstanceId, getLocalServiceName, getMessageExceptionHandler, getMillisToLive, getPriority, getRetryAttempts, getService, getServiceClassLoader, getServiceName, getServiceNameSpaceURI, getServicePath, getServiceVersion, hashCode, isQueue, setApplicationId, setCredentialsType, setEndpointUrl, setInstanceId, setLocalServiceName, setMessageExceptionHandler, setMillisToLive, setPriority, setQueue, setRetryAttempts, setService, setServiceClassLoader, setServiceName, setServiceNameSpaceURI, setServicePath, setServiceVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestServiceDefinition

public RestServiceDefinition()
Default constructor. Sets bus security to FALSE.

Method Detail

getType

public String getType()
Description copied from interface: ServiceDefinition
Returns the type of this service.

Returns:
the type of this service

setBusSecurity

public void setBusSecurity(Boolean busSecurity)
To ensure transparency that RESTful services are not digitally signed, throw an exception if someone tries to enable bus security.

Overrides:
setBusSecurity in class AbstractServiceDefinition
See Also:
org.kuali.rice.ksb.AbstractServiceDefinition.ServiceDefinition#setBusSecurity(java.lang.Boolean)

setResourceClass

public void setResourceClass(String resourceClass)
Set the resourceClass, the class or interface marked by the JAX-WS annotations which specify the RESTful URL interface.

Parameters:
resourceClass - the resourceClass to set

getResourceClass

public String getResourceClass()
Returns:
the resourceClass
See Also:
setResourceClass(String)

validate

public void validate()
does some simple validation of this RESTServiceDefinition

Specified by:
validate in interface ServiceDefinition
Overrides:
validate in class AbstractServiceDefinition
See Also:
org.kuali.rice.ksb.AbstractServiceDefinition.ServiceDefinition#validate()

configure

protected ServiceConfiguration configure()
Specified by:
configure in class AbstractServiceDefinition

getResources

public List<Object> getResources()
Returns:
the resources

setResources

public void setResources(List<Object> resources)
Parameters:
resources - the resources to set

getResourceToClassNameMap

public Map<String,String> getResourceToClassNameMap()
Returns:
the resourceToClassNameMap

hasClass

public boolean hasClass(String className)
Parameters:
className -
Returns:
true if this service contains a resource for the given class name

getProviders

public List<Object> getProviders()
Returns:
the providers

setProviders

public void setProviders(List<Object> providers)
Parameters:
providers - the providers to set

getExtensionMappings

public Map<Object,Object> getExtensionMappings()
Returns:
the extensionMappings

setExtensionMappings

public void setExtensionMappings(Map<Object,Object> extensionMappings)
Parameters:
extensionMappings - the extensionMappings to set

getLanguageMappings

public Map<Object,Object> getLanguageMappings()
Returns:
the languageMappings

setLanguageMappings

public void setLanguageMappings(Map<Object,Object> languageMappings)
Parameters:
languageMappings - the languageMappings to set


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.