EAC Toolkit 3.2.1

com.endeca.soleng.eac.toolkit.component
Class CustomComponent

java.lang.Object
  extended by com.endeca.soleng.eac.toolkit.base.EacElement
      extended by com.endeca.soleng.eac.toolkit.base.Provisionable
          extended by com.endeca.soleng.eac.toolkit.component.CustomComponent

public class CustomComponent
extends Provisionable

Custom components are "provisioned" like a component in the app configuration, but provisioning is stored as a set of custom properties (key value pairs) on the provisioned host on which this component runs.

Author:
sshusteff

Field Summary
 
Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir
 
Constructor Summary
CustomComponent()
          Custom component constructor.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> buildEacStub()
          Builds the map of properties that serve as the definition for this component.
 java.util.Map<java.lang.String,java.lang.String> getCustomDirectories()
           
 Host getHost()
          Constructs a host object by specifying a host ID that should be retrieved from the EAC.
 java.lang.String getHostId()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.lang.String getProperty(java.lang.String propName)
          Retrieves a custom property with the specified name.
 boolean isDefined()
          Extending objects will implement this method, returning true if the provisioned object's definition is set in the EAC.
 boolean isDefinitionChanged()
          Extending objects will implement this method, returning true if the provisioned object's definition has changed in the EAC.
 void removeDefinition()
          Extending objects will implement this method to remove the definition of the provisioned object from the EAC.
 void setCustomDirectories(java.util.Map<java.lang.String,java.lang.String> customDirectories)
           
 void setDefinition()
          Extending objects will implement this method to add the definition of the provisioned object to the EAC.
 void setHostId(java.lang.String hostId)
           
 void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
           
 void updateDefinition()
          Extending objects will implement this method to update the definition of the provisioned object in the EAC.
 
Methods inherited from class com.endeca.soleng.eac.toolkit.base.Provisionable
getAppDefinitionFromEac, getCachedAppDefinition, getProvisioningPort, invalidateCachedAppDefinition, setCachedAppDefinition
 
Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setElementId, setLockManager, setLogDir, setSslEnabled, setWorkingDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomComponent

public CustomComponent()
Custom component constructor.

Method Detail

isDefined

public boolean isDefined()
                  throws EacCommunicationException,
                         EacProvisioningException
Description copied from class: Provisionable
Extending objects will implement this method, returning true if the provisioned object's definition is set in the EAC.

Specified by:
isDefined in class Provisionable
Returns:
True if the object is defined.
Throws:
EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
EacProvisioningException - If an error occurs while trying to retrieve the object definition from the EAC.

isDefinitionChanged

public boolean isDefinitionChanged()
                            throws EacCommunicationException,
                                   EacProvisioningException
Description copied from class: Provisionable
Extending objects will implement this method, returning true if the provisioned object's definition has changed in the EAC.

Specified by:
isDefinitionChanged in class Provisionable
Returns:
True if the object's definition has changed.
Throws:
EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
EacProvisioningException - If an error occurs while trying to retrieve the object definition from the EAC.

removeDefinition

public void removeDefinition()
                      throws EacCommunicationException,
                             EacComponentControlException
Description copied from class: Provisionable
Extending objects will implement this method to remove the definition of the provisioned object from the EAC.

Specified by:
removeDefinition in class Provisionable
Throws:
EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
EacComponentControlException - If an error occurs while trying to start, stop or check the status of a component.

setDefinition

public void setDefinition()
                   throws EacCommunicationException
Description copied from class: Provisionable
Extending objects will implement this method to add the definition of the provisioned object to the EAC.

Specified by:
setDefinition in class Provisionable
Throws:
EacCommunicationException - If a communication error occurs while retrieving the provisioning port.

updateDefinition

public void updateDefinition()
                      throws EacCommunicationException,
                             EacComponentControlException,
                             EacProvisioningException,
                             AppConfigurationException
Description copied from class: Provisionable
Extending objects will implement this method to update the definition of the provisioned object in the EAC.

Specified by:
updateDefinition in class Provisionable
Throws:
EacCommunicationException - If a communication error occurs while retrieving the provisioning port.
EacComponentControlException - If an error occurs while trying to start, stop or check the status of a component.
EacProvisioningException - If an error occurs while provisioning the object or an associated object.
AppConfigurationException - If an object's configuration is invalid.

buildEacStub

public java.util.Map<java.lang.String,java.lang.String> buildEacStub()
Builds the map of properties that serve as the definition for this component. This map is added to the host's provisioning.

Returns:
Returns a map of key value pairs representing this component's provisioning.

getHost

public Host getHost()
             throws EacCommunicationException
Constructs a host object by specifying a host ID that should be retrieved from the EAC.

Returns:
Returns the host object for the host on which this component is provisioned to run.
Throws:
EacCommunicationException

getProperty

public java.lang.String getProperty(java.lang.String propName)
Retrieves a custom property with the specified name. If no custom property is found, this method retrieves the custom directory with the specified name.

Parameters:
propName - Name of the property to retrieve.
Returns:
Returns the value of the property or directory with the specified name.

getCustomDirectories

public java.util.Map<java.lang.String,java.lang.String> getCustomDirectories()

setCustomDirectories

public void setCustomDirectories(java.util.Map<java.lang.String,java.lang.String> customDirectories)

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)

getHostId

public java.lang.String getHostId()

setHostId

public void setHostId(java.lang.String hostId)

EAC Toolkit 3.2.1

Copyright © 2011 Endeca Technologies, Inc. All Rights Reserved.
@VERSION
PRODUCT: EAC Toolkit (eacToolkit)
VERSION: 3.2.1
BUILD:   NONE
ARCH_OS: n/a
DATE:    2011-11-10T16:21:05-0500