org.rhq.bundle.ant.type
Class SystemServiceType

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.types.DataType
          extended by org.rhq.bundle.ant.type.AbstractBundleType
              extended by org.rhq.bundle.ant.type.SystemServiceType
All Implemented Interfaces:
Cloneable

public class SystemServiceType
extends AbstractBundleType

An Ant task that installs a system startup/shutdown service. Currently only Red Hat Linux versions are supported.

Author:
Ian Springer

Field Summary
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
SystemServiceType()
           
 
Method Summary
 File getConfigDestFile()
           
 File getConfigFile()
           
 String getConfigFileName()
           
 String getName()
           
 File getRoot()
           
 File getScriptDestFile()
           
 File getScriptFile()
           
 String getScriptFileName()
           
 String getStartLevels()
           
 byte getStartPriority()
           
 byte getStopPriority()
           
 void init()
           
 void install()
           
 boolean isOverwriteConfig()
           
 boolean isOverwriteLinks()
           
 boolean isOverwriteScript()
           
 void setConfigFile(String configFile)
           
 void setName(String name)
           
 void setOverwriteConfig(boolean overwriteConfig)
           
 void setOverwriteLinks(boolean overwriteLinks)
           
 void setOverwriteScript(boolean overwriteScript)
           
 void setRoot(File root)
           
 void setScriptFile(String scriptFile)
           
 void setStartLevels(String startLevels)
           
 void setStartPriority(byte startPriority)
           
 void setStopPriority(byte stopPriority)
           
 void start()
           
 void stop()
           
 void uninstall()
           
 void validate()
           
protected  void validateAttributes()
          Ensure we have a consistent and legal set of attributes, and set any internal flags necessary based on different combinations of attributes.
 
Methods inherited from class org.rhq.bundle.ant.type.AbstractBundleType
buildIncludePatternRegex, getPattern, getProject
 
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, log, log, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemServiceType

public SystemServiceType()
Method Detail

validate

public void validate()
              throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

init

public void init()
          throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

install

public void install()
             throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

getScriptDestFile

public File getScriptDestFile()

getConfigDestFile

public File getConfigDestFile()

start

public void start()
           throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

stop

public void stop()
          throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

uninstall

public void uninstall()
               throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

getName

public String getName()

setName

public void setName(String name)

getScriptFileName

public String getScriptFileName()

getScriptFile

public File getScriptFile()

setScriptFile

public void setScriptFile(String scriptFile)

getConfigFileName

public String getConfigFileName()

getConfigFile

public File getConfigFile()

setConfigFile

public void setConfigFile(String configFile)

isOverwriteScript

public boolean isOverwriteScript()

setOverwriteScript

public void setOverwriteScript(boolean overwriteScript)

isOverwriteConfig

public boolean isOverwriteConfig()

setOverwriteConfig

public void setOverwriteConfig(boolean overwriteConfig)

isOverwriteLinks

public boolean isOverwriteLinks()

setOverwriteLinks

public void setOverwriteLinks(boolean overwriteLinks)

getStartLevels

public String getStartLevels()

setStartLevels

public void setStartLevels(String startLevels)

getStartPriority

public byte getStartPriority()

setStartPriority

public void setStartPriority(byte startPriority)

getStopPriority

public byte getStopPriority()

setStopPriority

public void setStopPriority(byte stopPriority)

getRoot

public File getRoot()

setRoot

public void setRoot(File root)

validateAttributes

protected void validateAttributes()
                           throws org.apache.tools.ant.BuildException
Ensure we have a consistent and legal set of attributes, and set any internal flags necessary based on different combinations of attributes.

Throws:
org.apache.tools.ant.BuildException - if an error occurs


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.