ca.infoway.messagebuilder.xml.service
Class BaseMessageDefinitionService

Package class diagram package BaseMessageDefinitionService
java.lang.Object
  extended by ca.infoway.messagebuilder.xml.service.BaseMessageDefinitionService
All Implemented Interfaces:
MessageDefinitionService

public abstract class BaseMessageDefinitionService
extends Object
implements MessageDefinitionService

A base class for the message defintion service.

Author:
Intelliware Development

Field Summary
protected  List<MessageSet> messageSets
           
 
Constructor Summary
BaseMessageDefinitionService()
           
 
Method Summary
protected  void addMessagePartsFromSupertype(Map<String,MessagePart> allParts, String superTypeName, VersionNumber version)
           
 List<Interaction> getAllInteractions(boolean includeDuplicateInteractionsWithChangedBusinessNames)
          Get all interactions across all versions.
 List<Interaction> getAllInteractions(VersionNumber version)
          Get all interactions for a particular version of the specification.
 Map<String,MessagePart> getAllMessageParts(Interaction interaction, VersionNumber version)
          Get all the message parts for a particular interaction and version.
 Map<String,MessagePart> getAllRelatedMessageParts(MessagePart messagePart, VersionNumber version)
          Get all the message parts that a particular root message part references.
 List<MessagePart> getAllRootMessageParts()
          Get all the root message parts for all message sets.
 List<MessagePart> getAllRootMessageParts(VersionNumber version)
          Get all the root message parts for a specific message set.
 Interaction getInteraction(VersionNumber version, String type)
          Get an interaction by name and version.
 MessagePart getMessagePart(VersionNumber version, String type)
          Get a message part by name and version.
protected  List<MessageSet> getMessageSets()
          Get the list of message sets.
protected abstract  List<String> getNames()
          Get the names.
 Set<String> getSupportedVersions()
          Get the supported versions.
 Set<String> getSupportedVersionsForInteraction(String type)
          Get all the versions known by this service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageSets

protected List<MessageSet> messageSets
Constructor Detail

BaseMessageDefinitionService

public BaseMessageDefinitionService()
Method Detail

getInteraction

public Interaction getInteraction(VersionNumber version,
                                  String type)

Get an interaction by name and version.

Specified by:
getInteraction in interface MessageDefinitionService
Parameters:
version - - the version
type - - the type name
Returns:
the interaction

getMessageSets

protected List<MessageSet> getMessageSets()

Get the list of message sets.

Returns:
- the message sets

getNames

protected abstract List<String> getNames()

Get the names.

Returns:
- the names

getMessagePart

public MessagePart getMessagePart(VersionNumber version,
                                  String type)

Get a message part by name and version.

Specified by:
getMessagePart in interface MessageDefinitionService
Parameters:
version - - the version
type - - the type name
Returns:
the message part

getAllInteractions

public List<Interaction> getAllInteractions(boolean includeDuplicateInteractionsWithChangedBusinessNames)

Get all interactions across all versions.

Specified by:
getAllInteractions in interface MessageDefinitionService
Parameters:
includeDuplicateInteractionsWithChangedBusinessNames - - a flag indicating whether or not to include duplicates
Returns:
the interactions

getAllInteractions

public List<Interaction> getAllInteractions(VersionNumber version)

Get all interactions for a particular version of the specification.

Specified by:
getAllInteractions in interface MessageDefinitionService
Parameters:
version - - the version
Returns:
the interactions

getSupportedVersions

public Set<String> getSupportedVersions()

Get the supported versions.

Specified by:
getSupportedVersions in interface MessageDefinitionService
Returns:
- the supported versions

getSupportedVersionsForInteraction

public Set<String> getSupportedVersionsForInteraction(String type)

Get all the versions known by this service.

Specified by:
getSupportedVersionsForInteraction in interface MessageDefinitionService
Parameters:
type - - the interaction type name
Returns:
the versions

getAllMessageParts

public Map<String,MessagePart> getAllMessageParts(Interaction interaction,
                                                  VersionNumber version)

Get all the message parts for a particular interaction and version.

Specified by:
getAllMessageParts in interface MessageDefinitionService
Parameters:
interaction - - the interaction
version - - the version
Returns:
- the message parts

getAllRootMessageParts

public List<MessagePart> getAllRootMessageParts()

Get all the root message parts for all message sets.

Specified by:
getAllRootMessageParts in interface MessageDefinitionService
Returns:
- the message parts

getAllRootMessageParts

public List<MessagePart> getAllRootMessageParts(VersionNumber version)

Get all the root message parts for a specific message set.

Specified by:
getAllRootMessageParts in interface MessageDefinitionService
Parameters:
version -
Returns:
- the message parts

getAllRelatedMessageParts

public Map<String,MessagePart> getAllRelatedMessageParts(MessagePart messagePart,
                                                         VersionNumber version)

Get all the message parts that a particular root message part references.

Specified by:
getAllRelatedMessageParts in interface MessageDefinitionService
Parameters:
messagePart - - the messagePart
version - - the version
Returns:
- the message parts

addMessagePartsFromSupertype

protected void addMessagePartsFromSupertype(Map<String,MessagePart> allParts,
                                            String superTypeName,
                                            VersionNumber version)


Copyright © 2013. All Rights Reserved.