|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.resource.Resource
public class Resource
Represents an RHQ managed resource (i.e. a platform, server, or service).
Constructor Summary | |
---|---|
Resource()
|
|
Resource(int id)
Primarily for deserialization and cases where the resource object is just a reference to the real one in the db. |
|
Resource(String resourceKey,
String name,
ResourceType type)
|
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_PROBLEM_RESOURCES_ALERT
public static final String QUERY_FIND_PROBLEM_RESOURCES_ALERT_ADMIN
public static final String QUERY_FIND_PROBLEM_RESOURCES_ALERT_COUNT
public static final String QUERY_FIND_PROBLEM_RESOURCES_ALERT_COUNT_ADMIN
public static final String QUERY_FIND_BY_PARENT_AND_TYPE
public static final String QUERY_FIND_BY_PARENT_AND_TYPE_ADMIN
public static final String QUERY_FIND_FOR_AUTOGROUP
public static final String QUERY_FIND_BY_PARENT_AND_INVENTORY_STATUS
public static final String QUERY_FIND_BY_PARENT_AND_INVENTORY_STATUS_ADMIN
public static final String QUERY_FIND_VALID_COMMITTED_RESOURCE_IDS_ADMIN
public static final String QUERY_FIND_CHILDREN_IDS_ADMIN
public static final String QUERY_FIND_CHILDREN_IDS_BY_PARENT_IDS
public static final String QUERY_FIND_CHILDREN
public static final String QUERY_FIND_CHILDREN_ADMIN
public static final String QUERY_RECENTLY_ADDED_PLATFORMS
public static final String QUERY_RECENTLY_ADDED_PLATFORMS_ADMIN
public static final String QUERY_RECENTLY_ADDED_SERVERS
public static final String QUERY_RECENTLY_ADDED_SERVERS_ADMIN
public static final String QUERY_FIND_AVAILABILITY_BY_RESOURCE_ID
public static final String QUERY_FIND_AVAILABILITY_BY_RESOURCE_ID_ADMIN
public static final String QUERY_FIND_AVAILABILITY_BY_RESOURCE_IDS
public static final String QUERY_FIND_AVAILABILITY_BY_RESOURCE_IDS_ADMIN
public static final String QUERY_FIND_RESOURCE_AUTOGROUP_COMPOSITE
public static final String QUERY_FIND_RESOURCE_AUTOGROUP_COMPOSITE_ADMIN
public static final String QUERY_FIND_RESOURCE_AUTOGROUPS_COMPOSITE
public static final String QUERY_FIND_RESOURCE_AUTOGROUPS_COMPOSITE_ADMIN
public static final String QUERY_FIND_CHILDREN_AUTOGROUP_COMPOSITES
public static final String QUERY_FIND_CHILDREN_AUTOGROUP_COMPOSITES_ADMIN
public static final String QUERY_FIND_CHILDREN_AUTOGROUP_COMPOSITES_BY_TYPE
public static final String QUERY_FIND_CHILDREN_AUTOGROUP_COMPOSITES_BY_TYPE_ADMIN
public static final String QUERY_FIND_CHILDREN_BY_CATEGORY_AND_INVENTORY_STATUS
public static final String QUERY_FIND_CHILDREN_BY_CATEGORY_AND_INVENTORY_STATUS_ADMIN
public static final String QUERY_FIND_BY_CATEGORY_AND_INVENTORY_STATUS
public static final String QUERY_FIND_BY_CATEGORY_AND_INVENTORY_STATUS_ADMIN
public static final String QUERY_FIND_RESOURCE_SUMMARY_BY_INVENTORY_STATUS
public static final String QUERY_FIND_RESOURCE_SUMMARY_BY_INVENTORY_STATUS_ADMIN
public static final String QUERY_FIND_QUEUED_PLATFORMS_BY_INVENTORY_STATUS
public static final String QUERY_FIND_BY_TYPE
public static final String QUERY_FIND_BY_TYPE_ADMIN
public static final String QUERY_FIND_IDS_BY_TYPE_IDS
public static final String QUERY_FIND_COUNT_BY_TYPES
public static final String QUERY_FIND_BY_TYPE_AND_IDS
public static final String QUERY_FIND_BY_TYPE_AND_IDS_ADMIN
public static final String QUERY_FIND_BY_PARENT_AND_KEY
public static final String QUERY_FIND_EXPLICIT_IDS_BY_RESOURCE_GROUP_ADMIN
public static final String QUERY_FIND_IMPLICIT_IDS_BY_RESOURCE_GROUP_ADMIN
public static final String QUERY_FIND_FLY_WEIGHTS_BY_RESOURCE_IDS
public static final String QUERY_FIND_BY_EXPLICIT_RESOURCE_GROUP
public static final String QUERY_FIND_BY_EXPLICIT_RESOURCE_GROUP_ADMIN
public static final String QUERY_FIND_BY_IMPLICIT_RESOURCE_GROUP
public static final String QUERY_FIND_BY_IMPLICIT_RESOURCE_GROUP_ADMIN
public static final String QUERY_FIND_EXPLICIT_RESOURCES_WITH_AVAILABILITY_FOR_RESOURCE_GROUP
public static final String QUERY_FIND_EXPLICIT_RESOURCES_WITH_AVAILABILITY_FOR_RESOURCE_GROUP_ADMIN
public static final String QUERY_FIND_IMPLICIT_RESOURCES_WITH_AVAILABILITY_FOR_RESOURCE_GROUP
public static final String QUERY_FIND_IMPLICIT_RESOURCES_WITH_AVAILABILITY_FOR_RESOURCE_GROUP_ADMIN
public static final String QUERY_FIND_IMPLICIT_RESOURCES_FOR_RESOURCE_GROUP_COUNT
public static final String QUERY_FIND_IMPLICIT_RESOURCES_FOR_RESOURCE_GROUP_COUNT_ADMIN
public static final String QUERY_FIND_EXPLICIT_RESOURCES_FOR_RESOURCE_GROUP_COUNT
public static final String QUERY_FIND_EXPLICIT_RESOURCES_FOR_RESOURCE_GROUP_COUNT_ADMIN
public static final String QUERY_GET_AVAILABLE_RESOURCES_FOR_REPO
public static final String QUERY_GET_AVAILABLE_RESOURCES_FOR_RESOURCE_GROUP
public static final String QUERY_GET_AVAILABLE_RESOURCES_FOR_RESOURCE_GROUP_WITH_EXCLUDES
public static final String QUERY_GET_AVAILABLE_RESOURCES_WITH_PARENT_FOR_RESOURCE_GROUP
public static final String QUERY_GET_AVAILABLE_RESOURCES_WITH_PARENT_FOR_RESOURCE_GROUP_WITH_EXCLUDES
public static final String QUERY_GET_AVAILABLE_RESOURCES_FOR_DASHBOARD_PORTLET
public static final String QUERY_GET_AVAILABLE_RESOURCES_FOR_DASHBOARD_PORTLET_WITH_EXCLUDES
public static final String QUERY_FIND_BY_ID
public static final String QUERY_FIND_BY_IDS
public static final String QUERY_FIND_BY_IDS_ADMIN
public static final String QUERY_FIND_WITH_PARENT_BY_IDS
public static final String QUERY_FIND_WITH_PARENT_BY_IDS_ADMIN
public static final String QUERY_FIND_COMPOSITE
public static final String QUERY_FIND_COMPOSITE_WITH_PARENT
public static final String QUERY_FIND_COMPOSITE_COUNT
public static final String QUERY_FIND_COMPOSITE_ADMIN
public static final String QUERY_FIND_COMPOSITE_WITH_PARENT_ADMIN
public static final String QUERY_FIND_COMPOSITE_COUNT_ADMIN
public static final String QUERY_GET_STATUSES_BY_PARENT
public static final String QUERY_GET_RESOURCE_HEALTH_BY_IDS
public static final String QUERY_FIND_BY_ID_WITH_INSTALLED_PACKAGES
public static final String QUERY_FIND_BY_ID_WITH_INSTALLED_PACKAGE_HIST
public static final String QUERY_FIND_PLATFORM_BY_AGENT
public static final String QUERY_FIND_PARENT_ID
public static final String QUERY_FIND_ROOT_PLATFORM_OF_RESOURCE
public static final String QUERY_FIND_DESCENDANTS_BY_TYPE_AND_NAME
public static final String QUERY_FIND_DESCENDANTS
public static final String QUERY_MARK_RESOURCES_FOR_ASYNC_DELETION_QUICK
public static final String QUERY_FIND_RESOURCES_MARKED_FOR_ASYNC_DELETION
public static final String QUERY_RESOURCE_REPORT
public static final String QUERY_RESOURCE_VERSION_REPORT
public static final String QUERY_RESOURCE_VERSION_AND_DRIFT_IN_COMPLIANCE
public static final String QUERY_RESOURCE_VERSION_AND_DRIFT_OUT_OF_COMPLIANCE
public static final String ANCESTRY_ENTRY_DELIM
public static final String ANCESTRY_DELIM
public static final Resource ROOT
public static final int ROOT_ID
Constructor Detail |
---|
public Resource()
public Resource(int id)
id
- the Resource's idpublic Resource(@NotNull String resourceKey, String name, @NotNull ResourceType type)
Method Detail |
---|
public int getId()
public void setId(int id)
public String getUuid()
public void setUuid(String uuid)
public String getName()
public void setName(String name)
public String getAncestry()
public void setAncestry(String ancestry)
updateAncestryForResource()
).
ancestry
- public String updateAncestryForResource()
setParentResource(Resource)
because the parent defines the ancestry.
The parent should be an attached entity to ensure access to all necessary information. If the parent is
not a persisted entity, or if it lacks the required information, the update will be skipped.
public String getResourceKey()
public void setResourceKey(String resourceKey)
public ResourceType getResourceType()
public void setResourceType(ResourceType resourceType)
public InventoryStatus getInventoryStatus()
public void setInventoryStatus(InventoryStatus inventoryStatus)
public boolean isConnected()
true
, it can be assumed the plugin can successfully connect to and manage the actual resource.
This means the plugin configuration is successfully set and has the proper values that allow the plugin to
connect to the managed resource.
true
if the plugin can actually connect to and manage the resourcepublic void setConnected(boolean connected)
public String getVersion()
public void setVersion(String version)
public String getDescription()
public void setDescription(String description)
public long getCtime()
getItime()
for that.
public long getMtime()
public void setMtime(long mtime)
public long getItime()
getInventoryStatus()
changed. If the inventory status is
InventoryStatus.COMMITTED
, this is the time when the resource was committed (aka imported) into
inventory.
public void setItime(long inventoryTime)
public void setAgentSynchronizationNeeded()
public String getModifiedBy()
public void setModifiedBy(String modifiedBy)
public String getLocation()
public void setLocation(String location)
public Set<Resource> getChildResources()
public void addChildResource(Resource childResource)
public boolean removeChildResource(Resource childResource)
public void setChildResources(Set<Resource> children)
@Nullable public Resource getParentResource()
public void setParentResource(@Nullable Resource parentResource)
public Configuration getResourceConfiguration()
public void setResourceConfiguration(Configuration resourceConfiguration)
public Configuration getPluginConfiguration()
public void setPluginConfiguration(Configuration pluginConfiguration)
public List<ResourceConfigurationUpdate> getResourceConfigurationUpdates()
public void setResourceConfigurationUpdates(List<ResourceConfigurationUpdate> updates)
public void addResourceConfigurationUpdates(ResourceConfigurationUpdate update)
public List<PluginConfigurationUpdate> getPluginConfigurationUpdates()
public void setPluginConfigurationUpdates(List<PluginConfigurationUpdate> updates)
public void addPluginConfigurationUpdates(PluginConfigurationUpdate update)
public Set<MeasurementSchedule> getSchedules()
public void setSchendules(Set<MeasurementSchedule> schedules)
public void addSchedule(MeasurementSchedule schedule)
public Set<AlertDefinition> getAlertDefinitions()
public void setAlertDefinitions(Set<AlertDefinition> alertDefinitions)
public void addAlertDefinition(AlertDefinition alertDefinition)
public List<ContentServiceRequest> getContentServiceRequests()
public void setContentServiceRequests(List<ContentServiceRequest> contentServiceRequests)
public void addContentServiceRequest(ContentServiceRequest request)
public List<CreateResourceHistory> getCreateChildResourceRequests()
public void setCreateChildResourceRequests(List<CreateResourceHistory> createChildResourceRequests)
public void addCreateChildResourceHistory(CreateResourceHistory request)
public List<DeleteResourceHistory> getDeleteResourceRequests()
public void setDeleteResourceRequests(List<DeleteResourceHistory> deleteResourceRequests)
public void addDeleteResourceHistory(DeleteResourceHistory history)
public Agent getAgent()
public void setAgent(Agent agent)
public Set<ResourceGroup> getImplicitGroups()
public void setImplicitGroups(Set<ResourceGroup> implicitGroups)
public void addImplicitGroup(ResourceGroup implicitGroup)
public void removeImplicitGroup(ResourceGroup implicitGroup)
public Set<ResourceGroup> getExplicitGroups()
public void setExplicitGroups(Set<ResourceGroup> explicitGroups)
public void addExplicitGroup(ResourceGroup explicitGroup)
public void removeExplicitGroup(ResourceGroup explicitGroup)
@NotNull public List<ResourceOperationHistory> getOperationHistories()
public void setOperationHistories(List<ResourceOperationHistory> operationHistories)
public List<ResourceError> getResourceErrors()
getResourceErrors(ResourceErrorType)
.
null
)public List<ResourceError> getResourceErrors(ResourceErrorType type)
type
- the type of errors that are to be returned
null
)public void setResourceErrors(List<ResourceError> resourceErrors)
public void addResourceError(ResourceError resourceError)
public List<Availability> getAvailability()
public ResourceAvailability getCurrentAvailability()
public void setCurrentAvailability(ResourceAvailability currentAvailability)
public Set<ResourceRepo> getResourceRepos()
getResourceRepos()
public Set<Repo> getRepos()
The returned set is not backed by this entity - if you want to alter the set of associated repos, use
getResourceRepos()
or addRepo(Repo)
, removeRepo(Repo)
.
public ResourceRepo addRepo(Repo repo)
repo
-
public ResourceRepo removeRepo(Repo repo)
null
is returned.
repo
- the repo to unsubscribe from
null
if the resource was not subscribed to the repopublic Set<InstalledPackage> getInstalledPackages()
public void addInstalledPackage(InstalledPackage installedPackage)
public void setInstalledPackages(Set<InstalledPackage> installedPackages)
public List<InstalledPackageHistory> getInstalledPackageHistory()
public void addInstalledPackageHistory(InstalledPackageHistory history)
public void setInstalledPackageHistory(List<InstalledPackageHistory> installedPackageHistory)
public Set<EventSource> getEventSources()
public ProductVersion getProductVersion()
public void setProductVersion(ProductVersion productVersion)
public Set<Tag> getTags()
public void setTags(Set<Tag> tags)
public void addTag(Tag tag)
public boolean removeTag(Tag tag)
public List<ResourceGroup> getAutoGroupBackingGroups()
public void setAutoGroupBackingGroups(List<ResourceGroup> autoGroupBackingGroups)
protected Set<Dashboard> getDashboards()
protected void setDashboards(Set<Dashboard> dashboards)
public Set<DriftDefinition> getDriftDefinitions()
public void setDriftDefinitions(Set<DriftDefinition> driftDefinitions)
public void addDriftDefinition(DriftDefinition driftDefinition)
public int compareTo(Resource that)
compareTo
in interface Comparable<Resource>
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void initCurrentAvailability()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |