|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.plugin.AbstractPlugin
public class AbstractPlugin
Base plugin implementation that agent and server plugin implementations extend.
Field Summary | |
---|---|
static String |
TABLE_NAME
|
Constructor Summary | |
---|---|
AbstractPlugin()
|
|
AbstractPlugin(int id,
String name,
String path,
String displayName,
boolean enabled,
PluginStatusType status,
String description,
String help,
String md5,
String version,
String ampsVersion,
PluginDeploymentType deployment,
long ctime,
long mtime)
Constructor that can build the full object except for the content byte array. |
|
AbstractPlugin(String name,
String path)
Constructor for Plugin . |
|
AbstractPlugin(String name,
String path,
byte[] content)
Constructor for Plugin . |
|
AbstractPlugin(String name,
String path,
String md5)
Constructor for Plugin . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getAmpsVersion()
|
byte[] |
getContent()
Returns the actual content of the plugin file. |
long |
getCtime()
See the javadoc of getMtime() for
information about this field and its relationship
with "mtime". |
PluginDeploymentType |
getDeployment()
Indicates how the plugin gets deployed (e.g. running in the agent or in the server). |
String |
getDescription()
|
String |
getDisplayName()
|
String |
getHelp()
|
int |
getId()
|
String |
getMd5()
|
String |
getMD5()
|
long |
getMtime()
The "mtime" of the plugin has slightly different semantics than other "mtime" values found elsewhere. |
String |
getName()
|
String |
getPath()
Returns the actual name of the plugin jar. |
PluginStatusType |
getStatus()
|
String |
getVersion()
|
int |
hashCode()
|
boolean |
isEnabled()
|
void |
setAmpsVersion(String ampsVersion)
|
void |
setContent(byte[] content)
|
void |
setCtime(long ctime)
|
void |
setDeployment(PluginDeploymentType deployment)
|
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 |
setMtime(long mtime)
This entity does not automatically update the "mtime" when it is updated via a PreUpdate annotation, therefore, the owner of this entity needs to explicitly call this setter in order to set the "mtime". |
void |
setName(String name)
|
void |
setPath(String path)
Ensure that the path being set does not include any directory names. |
void |
setStatus(PluginStatusType status)
|
void |
setVersion(String version)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String TABLE_NAME
Constructor Detail |
---|
public AbstractPlugin()
public AbstractPlugin(String name, String path)
Plugin
.
name
- the logical name of the pluginpath
- the actual filename of the plugin jar (see getPath()
)public AbstractPlugin(String name, String path, String md5)
Plugin
.
Note that this allows you to provide an MD5 without providing the plugin's
actual content. If you wish to persist this entity in the database, you should
either provide the content
or update the entity
later by streaming the file content to the content column.
name
- the logical name of the pluginpath
- the actual filename of the plugin jar (see getPath()
)md5
- the MD5 hash string of the plugin jar contentspublic AbstractPlugin(String name, String path, byte[] content)
Plugin
.
name
- the logical name of the pluginpath
- the actual filename of the plugin jar (see getPath()
)content
- the actual jar file contents (the MD5 hash string will be generated from this)public AbstractPlugin(int id, String name, String path, String displayName, boolean enabled, PluginStatusType status, String description, String help, String md5, String version, String ampsVersion, PluginDeploymentType deployment, long ctime, long mtime)
Method Detail |
---|
public int getId()
public void setId(int id)
public String getName()
public void setName(String name)
public long getCtime()
getMtime()
for
information about this field and its relationship
with "mtime".
public void setCtime(long ctime)
public long getMtime()
public void setMtime(long mtime)
content
.
mtime
- public String getDisplayName()
public void setDisplayName(String displayName)
public String getDescription()
public void setDescription(String description)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public PluginStatusType getStatus()
public void setStatus(PluginStatusType status)
public String getHelp()
public void setHelp(String help)
public String getVersion()
public void setVersion(String version)
public String getAmpsVersion()
public void setAmpsVersion(String ampsVersion)
public String getMd5()
public void setMd5(String md5)
public String getMD5()
public void setMD5(String md5)
public String getPath()
public void setPath(String path)
getPath()
.
path
- the filename of the plugin, not including directory namespublic PluginDeploymentType getDeployment()
public void setDeployment(PluginDeploymentType deployment)
public byte[] getContent()
public void setContent(byte[] content)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |