public class ServiceMappingGroup
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
The name of this class
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ServiceMappingGroup()
Constructs an empty service mapping group
|
ServiceMappingGroup(java.lang.String groupName,
java.lang.String serviceName,
ServiceMapping[] mappings,
java.lang.Class serviceInputType,
java.lang.Class defaultNounType,
java.lang.Class verbType)
Construct a service mapping group with given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addServiceMapping(ServiceMapping mapping)
Add a
ServiceMapping to the service mapping group |
void |
addServiceMappings(java.util.List mappingList)
Adds the mappings for the mapping group
|
void |
addServiceMappings(ServiceMapping[] mappings)
Adds a list of mappings for the mapping group
|
java.util.Collection |
getAllMappings()
Retrieves all the mappings in this mapping group.
|
java.lang.Class |
getDefaultNounType() |
java.lang.String |
getName()
Retrieves the name of this service mapping group
|
java.lang.Class |
getServiceInputType()
Retrieves the service input type
|
ServiceMapping |
getServiceMapping(java.lang.String source)
Retrieves the
ServiceMapping object that has the given source |
java.lang.String |
getServiceName()
Retrieves the name of this service
|
java.lang.Class |
getVerbType() |
boolean |
hasName()
Determines if this service mapping group has a valid name.
|
static boolean |
isValidName(java.lang.String name)
Determines if a string is valid for service name or group name.
|
void |
setDefaultNounType(java.lang.Class nounType)
Sets the default noun type for this mapping group
|
void |
setName(java.lang.String name)
Sets the name of the mapping group.
|
void |
setServiceInputType(java.lang.Class serviceInputType)
Sets the input type of a the service that has the service name of this mapping group
|
void |
setServiceMappings(ServiceMapping[] mappings)
Sets the service mappings to the given one
|
void |
setServiceName(java.lang.String serviceName)
Sets the name of the mapped service.
|
void |
setVerbType(java.lang.Class verbType)
Sets the verb type for this group
|
java.lang.String |
toString() |
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public ServiceMappingGroup()
public ServiceMappingGroup(java.lang.String groupName, java.lang.String serviceName, ServiceMapping[] mappings, java.lang.Class serviceInputType, java.lang.Class defaultNounType, java.lang.Class verbType)
groupName
- the name of this service mapping groupserviceName
- the name of the service described by this mapping groupmappings
- the mappings to be added to this mapping groupserviceInputType
- the type of the service input object.defaultNounType
- the default noun type for the group. It can be null
verbType
- the concrete verb Verb
used by the service input of this grouppublic void addServiceMappings(ServiceMapping[] mappings)
mappings
- an array of ServiceMapping
instancespublic void setServiceMappings(ServiceMapping[] mappings)
mappings
- the array of mappings to be setpublic void addServiceMappings(java.util.List mappingList)
mappings
- an array of ServiceMapping
instancespublic void addServiceMapping(ServiceMapping mapping)
ServiceMapping
to the service mapping groupmapping
- the ServiceMapping
instance to be addedpublic java.util.Collection getAllMappings()
ServiceMapping
instances. Empty collection if no mappings are stored.public java.lang.String getName()
public java.lang.String getServiceName()
public ServiceMapping getServiceMapping(java.lang.String source)
ServiceMapping
object that has the given sourcesource
- the source that is mapped in a mappingpublic void setServiceName(java.lang.String serviceName)
name
- the name of this mapping grouppublic void setName(java.lang.String name)
name
- the name of this mapping grouppublic void setServiceInputType(java.lang.Class serviceInputType)
serviceInputType
- the type of the service input objectpublic java.lang.Class getServiceInputType()
public static final boolean isValidName(java.lang.String name)
name
- the string intended to be used for either group name or service namepublic boolean hasName()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Class getDefaultNounType()
public void setDefaultNounType(java.lang.Class nounType)
nounType
- the type to setpublic java.lang.Class getVerbType()
public void setVerbType(java.lang.Class verbType)
verbType
- the type of the verb to set