org.codeforamerica.open311.facade.data
Class Service

java.lang.Object
  extended by org.codeforamerica.open311.facade.data.Service
All Implemented Interfaces:
Serializable

public class Service
extends Object
implements Serializable

Represents a GeoReport service.

Author:
Santiago MunĂ­n
See Also:
Serialized Form

Nested Class Summary
static class Service.Type
          Different types of Service.
 
Constructor Summary
Service(String serviceCode, String serviceName, String description, Boolean metadata, Service.Type type, String[] keywords, String group)
           
 
Method Summary
 String getDescription()
           
 String getGroup()
           
 String[] getKeywords()
           
 String getServiceCode()
           
 ServiceDefinition getServiceDefinition()
          Retrieves the ServiceDefinition of this instance.
 String getServiceName()
           
 Service.Type getType()
           
 Boolean hasMetadata()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Service

public Service(String serviceCode,
               String serviceName,
               String description,
               Boolean metadata,
               Service.Type type,
               String[] keywords,
               String group)
Method Detail

getServiceCode

public String getServiceCode()

getServiceName

public String getServiceName()

getDescription

public String getDescription()

hasMetadata

public Boolean hasMetadata()

getType

public Service.Type getType()

getKeywords

public String[] getKeywords()

getGroup

public String getGroup()

getServiceDefinition

public ServiceDefinition getServiceDefinition()
                                       throws APIWrapperException
Retrieves the ServiceDefinition of this instance. This may take a lot of time so it is a good idea not to do it in the UI thread.

Returns:
The definition of the service which represents the instance.
Throws:
APIWrapperException - If there was any problem getting the definition (such as IO, response parsing...) or if the instance wasn't created by an APIWrapperException.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Code for America. All Rights Reserved.