org.rhq.core.domain.plugin
Class Plugin

java.lang.Object
  extended by org.rhq.core.domain.plugin.Plugin
All Implemented Interfaces:
Serializable

public class Plugin
extends Object
implements Serializable

A JON plugin. This object only contains information about the plugin jar itself (e.g. its name and MD5).

See Also:
Serialized Form

Field Summary
static String QUERY_FIND_ALL
           
 
Constructor Summary
protected Plugin()
           
  Plugin(String name, String path)
          Constructor for Plugin.
  Plugin(String name, String path, String md5)
          Constructor for Plugin.
 
Method Summary
 boolean equals(Object obj)
           
 long getCtime()
           
 String getDescription()
           
 String getDisplayName()
           
 String getHelp()
           
 int getId()
           
 String getMd5()
           
 String getMD5()
           
 String getName()
           
 String getPath()
          Returns the actual name of the plugin jar.
 String getVersion()
           
 int hashCode()
           
 boolean isEnabled()
           
 void setCtime(long ctime)
           
 void setDescription(String description)
           
 void setDisplayName(String displayName)
           
 void setEnabled(boolean enabled)
           
 void setHelp(String help)
           
 void setId(int id)
           
 void setMd5(String md5)
           
 void setMD5(String md5)
           
 void setName(String name)
           
 void setPath(String path)
          Ensure that the path being set does not include any directory names.
 void setVersion(String version)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_ALL

public static final String QUERY_FIND_ALL
See Also:
Constant Field Values
Constructor Detail

Plugin

protected Plugin()

Plugin

public Plugin(@NotNull
              String name,
              String path)
Constructor for Plugin.

Parameters:
name - the logical name of the plugin
path - the actual filename of the plugin jar (see getPath())

Plugin

public Plugin(String name,
              String path,
              String md5)
Constructor for Plugin.

Parameters:
name - the logical name of the plugin
path - the actual filename of the plugin jar (see getPath())
md5 - the MD5 hash string of the plugin jar contents
Method Detail

getId

public int getId()

setId

public void setId(int id)

getName

public String getName()

setName

public void setName(String name)

setCtime

public void setCtime(long ctime)

getDisplayName

public String getDisplayName()

setDisplayName

public void setDisplayName(String displayName)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getHelp

public String getHelp()

setHelp

public void setHelp(String help)

getVersion

public String getVersion()

setVersion

public void setVersion(String version)

getMd5

public String getMd5()

setMd5

public void setMd5(String md5)

getPath

public String getPath()
Returns the actual name of the plugin jar. This is not the absolute path, in fact, it does not include any directory paths. It is strictly the name of the plugin jar as found on the file system (aka the filename).

Returns:
plugin filename

setPath

public void setPath(String path)
Ensure that the path being set does not include any directory names. The plugin path is the filename. See getPath().

Parameters:
path - the filename of the plugin, not including directory names

getMD5

public String getMD5()

setMD5

public void setMD5(String md5)

getCtime

public long getCtime()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 RHQ Project Advisory Board (Red Hat, Inc. and Hyperic, Inc.). All Rights Reserved.