org.apache.maven.diagrams.connector_api.descriptor
Class DefaultConnectorDescriptor

java.lang.Object
  extended by org.apache.maven.diagrams.connector_api.descriptor.DefaultConnectorDescriptor
All Implemented Interfaces:
ConnectorDescriptor

public class DefaultConnectorDescriptor
extends java.lang.Object
implements ConnectorDescriptor

ConnectorDescriptor is the same for Connector as PluginDescriptor for MavenPlugin. It contains basic information about connector and the xstream mappings for the connector's configuration file. In most cases the class is serialized and deserialized form XML by ConnectorDescriptorBuilder

Author:
Piotr Tabor

Constructor Summary
DefaultConnectorDescriptor()
           
 
Method Summary
 DiagramConnector createConnectorInstance()
           
 java.lang.String getArtifactId()
           
 java.lang.Class<? extends ConnectorConfiguration> getConfigurationClass()
          The method returns the ConnectorConfiguration class that the connector use.
 java.lang.String getDescription()
           
 java.lang.String getGroupId()
           
 java.util.List<Mapping> getMappings()
          It return set of mappings "tag name to class" used by xstream library to serialize and deserialize ConnectorConfiguration
 java.lang.String getName()
           
 ConnectorInterfaceEnum getPreferredInterface()
          Return which type of interface to the described connector (static or dynamic) should be preferred by libraries using the connector.
 java.util.EnumSet<ConnectorInterfaceEnum> getProvidedInterfaces()
           
 java.lang.String getVersion()
           
 void setArtifactId(java.lang.String artifactId)
           
 void setConfigurationClass(java.lang.Class<? extends ConnectorConfiguration> configurationClass)
          The method sets the ConnectorConfiguration class that the connector use.
 void setConfigurationClassName(java.lang.String s)
           
 void setDescription(java.lang.String description)
           
 void setGroupId(java.lang.String groupId)
           
 void setMappings(java.util.List<Mapping> mappings)
          It sets mappings "tag name to class" used by xstream library to serialize and deserialize ConnectorConfiguration
 void setName(java.lang.String name)
           
 void setPreferredInterface(ConnectorInterfaceEnum preferredInterface)
          Sets the preferred interface.
 void setProvidedInterfaces(java.util.EnumSet<ConnectorInterfaceEnum> providedInterfaces)
           
 void setVersion(java.lang.String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConnectorDescriptor

public DefaultConnectorDescriptor()
Method Detail

createConnectorInstance

public DiagramConnector createConnectorInstance()
                                         throws ConnectorException
Specified by:
createConnectorInstance in interface ConnectorDescriptor
Throws:
ConnectorException

getGroupId

public java.lang.String getGroupId()
Specified by:
getGroupId in interface ConnectorDescriptor

setGroupId

public void setGroupId(java.lang.String groupId)
Specified by:
setGroupId in interface ConnectorDescriptor

getArtifactId

public java.lang.String getArtifactId()
Specified by:
getArtifactId in interface ConnectorDescriptor

setArtifactId

public void setArtifactId(java.lang.String artifactId)
Specified by:
setArtifactId in interface ConnectorDescriptor

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface ConnectorDescriptor

setVersion

public void setVersion(java.lang.String version)
Specified by:
setVersion in interface ConnectorDescriptor

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface ConnectorDescriptor

setDescription

public void setDescription(java.lang.String description)
Specified by:
setDescription in interface ConnectorDescriptor

getProvidedInterfaces

public java.util.EnumSet<ConnectorInterfaceEnum> getProvidedInterfaces()
Specified by:
getProvidedInterfaces in interface ConnectorDescriptor

setProvidedInterfaces

public void setProvidedInterfaces(java.util.EnumSet<ConnectorInterfaceEnum> providedInterfaces)
Specified by:
setProvidedInterfaces in interface ConnectorDescriptor

getPreferredInterface

public ConnectorInterfaceEnum getPreferredInterface()
Description copied from interface: ConnectorDescriptor
Return which type of interface to the described connector (static or dynamic) should be preferred by libraries using the connector. It have to be one of interfaces returned by getProvidedInterfaces

Specified by:
getPreferredInterface in interface ConnectorDescriptor
Returns:
preferred interface type.

setPreferredInterface

public void setPreferredInterface(ConnectorInterfaceEnum preferredInterface)
Description copied from interface: ConnectorDescriptor
Sets the preferred interface.

Specified by:
setPreferredInterface in interface ConnectorDescriptor

getName

public java.lang.String getName()
Specified by:
getName in interface ConnectorDescriptor

setName

public void setName(java.lang.String name)
Specified by:
setName in interface ConnectorDescriptor

getConfigurationClass

public java.lang.Class<? extends ConnectorConfiguration> getConfigurationClass()
Description copied from interface: ConnectorDescriptor
The method returns the ConnectorConfiguration class that the connector use.

Specified by:
getConfigurationClass in interface ConnectorDescriptor
Returns:
the class implementing ConnectorConfiguration

setConfigurationClass

public void setConfigurationClass(java.lang.Class<? extends ConnectorConfiguration> configurationClass)
Description copied from interface: ConnectorDescriptor
The method sets the ConnectorConfiguration class that the connector use.

Specified by:
setConfigurationClass in interface ConnectorDescriptor
Parameters:
configurationClass - to set.

getMappings

public java.util.List<Mapping> getMappings()
Description copied from interface: ConnectorDescriptor
It return set of mappings "tag name to class" used by xstream library to serialize and deserialize ConnectorConfiguration

Specified by:
getMappings in interface ConnectorDescriptor
Returns:

setMappings

public void setMappings(java.util.List<Mapping> mappings)
Description copied from interface: ConnectorDescriptor
It sets mappings "tag name to class" used by xstream library to serialize and deserialize ConnectorConfiguration

Specified by:
setMappings in interface ConnectorDescriptor
Parameters:
mappings - to be set

setConfigurationClassName

public void setConfigurationClassName(java.lang.String s)
                               throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.