|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.plugin.Plugin
public class Plugin
An agent plugin.
This object contains information about the plugin jar itself (e.g. its name and MD5).
It may also contain the jar contents (getContent()
).
Field Summary | |
---|---|
static String |
QUERY_FIND_ALL
|
static String |
QUERY_FIND_BY_NAME
|
static String |
QUERY_FIND_BY_RESOURCE_TYPE_AND_CATEGORY
|
static String |
TABLE_NAME
|
static String |
UPDATE_ALL_BUT_CONTENT
|
Constructor Summary | |
---|---|
protected |
Plugin()
|
|
Plugin(int id,
String name,
String path,
String displayName,
boolean enabled,
String description,
String help,
String md5,
String version,
long ctime,
long mtime)
Constructor that can build the full object except for the content byte array. |
|
Plugin(String name,
String path)
Constructor for Plugin . |
|
Plugin(String name,
String path,
byte[] content)
Constructor for Plugin . |
|
Plugin(String name,
String path,
String md5)
Constructor for Plugin . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
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". |
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. |
String |
getVersion()
|
int |
hashCode()
|
boolean |
isEnabled()
|
void |
setContent(byte[] content)
|
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 |
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 |
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
public static final String QUERY_FIND_BY_RESOURCE_TYPE_AND_CATEGORY
public static final String QUERY_FIND_ALL
public static final String QUERY_FIND_BY_NAME
public static final String UPDATE_ALL_BUT_CONTENT
Constructor Detail |
---|
protected Plugin()
public Plugin(@NotNull String name, String path)
Plugin
.
name
- the logical name of the pluginpath
- the actual filename of the plugin jar (see getPath()
)public Plugin(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 Plugin(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 Plugin(int id, String name, String path, String displayName, boolean enabled, String description, String help, String md5, String version, long ctime, long mtime)
id
- name
- path
- displayName
- enabled
- description
- help
- md5
- version
- ctime
- 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 String getHelp()
public void setHelp(String help)
public String getVersion()
public void setVersion(String version)
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 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 |