|
Hyperic HQ Plugin API v. 5.8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.product.TypeBuilder
public class TypeBuilder
Simple helper class to help keep plugin entity names
consistent.
This class supports adding one server, and its child services.
This class also supports adding multiple versions of the
same server.
Typically, the plugin developer uses the default
PLATFORM_NAMES
for the list
of platforms supported by a given server. The plugin
developer can specify her own list of supported platforms.
Field Summary | |
---|---|
static String[] |
ALL_PLATFORM_NAMES
|
static String |
NO_VERSION
Version will be excluded from composed server name. |
static String[] |
UNIX_PLATFORM_NAMES
|
static String[] |
WIN32_PLATFORM_NAMES
|
Constructor Summary | |
---|---|
TypeBuilder()
|
|
TypeBuilder(String serverName,
String serverDesc)
Create a server type for use on all supported platforms |
|
TypeBuilder(String serverName,
String serverDesc,
String[] platforms)
use this constructor for specifying a list of supported platforms. |
Method Summary | |
---|---|
boolean |
add(TypeInfo type)
|
PlatformTypeInfo |
addPlatform(String name)
|
ServerTypeInfo |
addServer(ServerTypeInfo server,
String[] platforms)
Add a ServerTypeInfo clone of the given server, changing valid platforms to the given platforms. |
ServerTypeInfo |
addServer(String version)
This method creates a ServerTypeInfo and adds this object to the entity list using a version string. |
ServerTypeInfo |
addServer(String name,
String version)
This method creates a ServerTypeInfo and adds this object to the entity list using a version string. |
ServerTypeInfo |
addServer(String name,
String version,
String[] platforms)
|
ServerTypeInfo |
addServerAndServices(ServerTypeInfo server,
String[] platforms)
Add a ServerTypeInfo clone of the given server, changing valid platforms to the given platforms. |
ServiceTypeInfo |
addService(ServerTypeInfo server,
String name)
This method creates a deployed (non-internal) ServiceTypeInfo object and adds it services to the entity list |
void |
addServices(ServerTypeInfo fromServer,
ServerTypeInfo toServer)
Clone all services from an existing server. |
void |
addServices(ServerTypeInfo server,
String[] services)
This method adds a list of services to the this.entity list. |
void |
addServices(ServerTypeInfo server,
String[] deployedServices,
String[] internalServices)
This method adds a list of internal and deployed services to the this.entity. |
static String |
composePlatformTypeName(String name,
String platformName)
|
static String |
composeServerTypeName(String name,
String version)
|
static String |
composeServiceTypeName(String serverName,
String serviceName)
Given a serverName and a serviceName, return the name of the service type. |
TypeInfo[] |
getTypes()
This method returns a list of server/service added to this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NO_VERSION
public static final String[] ALL_PLATFORM_NAMES
public static final String[] WIN32_PLATFORM_NAMES
public static final String[] UNIX_PLATFORM_NAMES
Constructor Detail |
---|
public TypeBuilder()
public TypeBuilder(String serverName, String serverDesc)
serverName
- name of the serverserverDesc
- server descriptionpublic TypeBuilder(String serverName, String serverDesc, String[] platforms)
serverName
- name of the serverserverDesc
- server descriptionMethod Detail |
---|
public PlatformTypeInfo addPlatform(String name)
public ServerTypeInfo addServer(String version)
version
- version of the server
public ServerTypeInfo addServer(String name, String version)
name
- name of the serverversion
- version of the server
public ServerTypeInfo addServer(String name, String version, String[] platforms)
public ServerTypeInfo addServer(ServerTypeInfo server, String[] platforms)
server
- Server type to clone.platforms
- Platforms supported by the server clone.
public void addServices(ServerTypeInfo server, String[] services)
server
- the server the services belong toservices
- a list of services names to addpublic void addServices(ServerTypeInfo server, String[] deployedServices, String[] internalServices)
server
- deployedServices
- internalServices
- public void addServices(ServerTypeInfo fromServer, ServerTypeInfo toServer)
fromServer
- Server from which to clone services.toServer
- Server to which the clones services are tied.public ServiceTypeInfo addService(ServerTypeInfo server, String name)
server
- server which the server belongs toname
- name of the service
public static String composeServiceTypeName(String serverName, String serviceName)
public static String composeServerTypeName(String name, String version)
public static String composePlatformTypeName(String name, String platformName)
public ServerTypeInfo addServerAndServices(ServerTypeInfo server, String[] platforms)
server
- Server to cloneplatforms
- Supported platforms of the server cloneaddServer(ServerTypeInfo server,String[] platforms)
,
addServices(ServerTypeInfo fromServer,ServerTypeInfo toServer)
public TypeInfo[] getTypes()
public boolean add(TypeInfo type)
|
Hyperic HQ Plugin API v. 5.8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |