org.rhq.enterprise.server.resource
Interface ResourceFactoryManagerLocal

All Known Implementing Classes:
ResourceFactoryManagerBean

public interface ResourceFactoryManagerLocal

Author:
Jason Dobies

Method Summary
 void checkForTimedOutRequests()
          Will check to see if any in progress resource creation jobs are taking too long to finish and if so marks them as failed.
 void completeCreateResource(CreateResourceResponse response)
          For documentation, see ResourceFactoryServerService.completeCreateResource(org.rhq.core.clientapi.agent.inventory.CreateResourceResponse) .
 void completeDeleteResourceRequest(DeleteResourceResponse response)
          For documentation, see ResourceFactoryServerService.completeDeleteResourceRequest(org.rhq.core.clientapi.agent.inventory.DeleteResourceResponse) .
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, byte[] packageBits)
           
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, byte[] packageBits, Integer timeout)
           
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, int packageVersionId)
           
 org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, int packageVersionId, Integer timeout)
           
 org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int resourceTypeId, String resourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration resourceConfiguration)
           
 org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject, int parentResourceId, int resourceTypeId, String resourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, org.rhq.core.domain.configuration.Configuration resourceConfiguration, Integer timeout)
           
 org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, InputStream packageBitStream)
          Creates a new physical resource.
 org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user, int parentResourceId, int newResourceTypeId, String newResourceName, org.rhq.core.domain.configuration.Configuration pluginConfiguration, String packageName, String packageVersion, Integer architectureId, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration, InputStream packageBitStream, Map<String,String> packageUploadDetails)
           
 org.rhq.core.domain.resource.DeleteResourceHistory deleteResource(org.rhq.core.domain.auth.Subject subject, int resourceId)
           
 List<org.rhq.core.domain.resource.DeleteResourceHistory> deleteResources(org.rhq.core.domain.auth.Subject subject, int[] resourceIds)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.CreateResourceHistory> findCreateChildResourceHistory(org.rhq.core.domain.auth.Subject subject, int parentResourceId, Long beginDate, Long endDate, org.rhq.core.domain.util.PageControl pageControl)
           
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.DeleteResourceHistory> findDeleteChildResourceHistory(org.rhq.core.domain.auth.Subject subject, int parentResourceId, Long beginDate, Long endDate, org.rhq.core.domain.util.PageControl pageControl)
           
 int getCreateChildResourceHistoryCount(int parentResourceId, Long beginDate, Long endDate)
          Returns the number of requests to create a new child resource under the specified parent known to the system.
 org.rhq.core.domain.resource.CreateResourceHistory getCreateHistoryItem(int historyItemId)
          Returns the history item corresponding to the specified ID.
 int getDeleteChildResourceHistoryCount(int parentResourceId, Long beginDate, Long endDate)
          Returns the number of requests to delete a child resource from the specified parent resource.
 org.rhq.core.domain.resource.CreateResourceHistory persistCreateHistory(org.rhq.core.domain.auth.Subject user, int parentResourceId, int resourceTypeId, String createResourceName, org.rhq.core.domain.configuration.Configuration configuration)
          Persists a record in the resource history to indicate a request has been made to create a configuration-backed resource.
 org.rhq.core.domain.resource.CreateResourceHistory persistCreateHistory(org.rhq.core.domain.auth.Subject user, int parentResourceId, int resourceTypeId, String createResourceName, org.rhq.core.domain.content.PackageVersion packageVersion, org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration)
          Persists a record in the resource history to indicate a request has been made to create an package-backed resource.
 org.rhq.core.domain.resource.DeleteResourceHistory persistDeleteHistory(org.rhq.core.domain.auth.Subject user, int resourceId)
          Persists a record in the resource history to indicate a request has been made to delete a resource.
 

Method Detail

completeCreateResource

void completeCreateResource(CreateResourceResponse response)
For documentation, see ResourceFactoryServerService.completeCreateResource(org.rhq.core.clientapi.agent.inventory.CreateResourceResponse) .


completeDeleteResourceRequest

void completeDeleteResourceRequest(DeleteResourceResponse response)
For documentation, see ResourceFactoryServerService.completeDeleteResourceRequest(org.rhq.core.clientapi.agent.inventory.DeleteResourceResponse) .


createResource

org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
                                                                  int parentResourceId,
                                                                  int newResourceTypeId,
                                                                  String newResourceName,
                                                                  org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                  String packageName,
                                                                  String packageVersion,
                                                                  Integer architectureId,
                                                                  org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                  InputStream packageBitStream)
Creates a new physical resource. The resource will be created as a child of the specified parent. In other words, the resource component of the indicated parent will be used to create the new resource. This call should only be made for resource types that are defined with a create/delete policy of CreateDeletePolicy.BOTH or CreateDeletePolicy.CREATE_ONLY. If this call is made for a resource type that cannot be created based on this policy, the plugin container will throw an exception. This call should only be made for resource types that are defined with a creation data type of ResourceCreationDataType.CONTENT. If this call is made for a resource type that cannot be created via an package, the plugin container will throw an exception.

Parameters:
user - user requesting the creation
parentResourceId - parent resource under which the new resource should be created
newResourceTypeId - identifies the type of resource being created
newResourceName - name of the resource being created
pluginConfiguration - optional plugin configuration that may be needed in order to create the new resource
packageName - name of the package that will be created as a result of this resource create
packageVersion - machine formatted identifier of the specific version of the package
architectureId - ID of the architecture of the package, null indicates NoArch (any)
deploymentTimeConfiguration - dictates how the package will be deployed
packageBitStream - content of the package to create

createResource

org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject user,
                                                                  int parentResourceId,
                                                                  int newResourceTypeId,
                                                                  String newResourceName,
                                                                  org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                  String packageName,
                                                                  String packageVersion,
                                                                  Integer architectureId,
                                                                  org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                  InputStream packageBitStream,
                                                                  Map<String,String> packageUploadDetails)

getCreateHistoryItem

org.rhq.core.domain.resource.CreateResourceHistory getCreateHistoryItem(int historyItemId)
Returns the history item corresponding to the specified ID.

Parameters:
historyItemId - identifies the history item to return
Returns:
history item for the id; null if the id does not have a corresponding item

getCreateChildResourceHistoryCount

int getCreateChildResourceHistoryCount(int parentResourceId,
                                       Long beginDate,
                                       Long endDate)
Returns the number of requests to create a new child resource under the specified parent known to the system. These requests may be completed or still in progress; it represents the history of creation attempts for this parent resource.

Parameters:
parentResourceId - resource to check for child resource creation requests
beginDate - filter used to show only results occurring after this epoch millis parameter, nullable
endDate - filter used to show only results occurring before this epoch millis parameter, nullable
Returns:
number of requests in the resource creation history for the specified parent

getDeleteChildResourceHistoryCount

int getDeleteChildResourceHistoryCount(int parentResourceId,
                                       Long beginDate,
                                       Long endDate)
Returns the number of requests to delete a child resource from the specified parent resource. These requests may be complete or still in progress; it represents the history of all delete attempts of child resources to this resource.

Parameters:
parentResourceId - resource to check for child resource delete requests
beginDate - filter used to show only results occurring after this epoch millis parameter, nullable
endDate - filter used to show only results occurring before this epoch millis parameter, nullable
Returns:
number of delete requests for child resources

persistCreateHistory

org.rhq.core.domain.resource.CreateResourceHistory persistCreateHistory(org.rhq.core.domain.auth.Subject user,
                                                                        int parentResourceId,
                                                                        int resourceTypeId,
                                                                        String createResourceName,
                                                                        org.rhq.core.domain.configuration.Configuration configuration)
Persists a record in the resource history to indicate a request has been made to create a configuration-backed resource.

Parameters:
user - user performing the create
parentResourceId - parent resource under which the resource should be created
resourceTypeId - type of resource being created
createResourceName - name of the resource being created
configuration - resource configuration of the new resource
Returns:
persisted history entity (i.e. ID will be populated)

persistCreateHistory

org.rhq.core.domain.resource.CreateResourceHistory persistCreateHistory(org.rhq.core.domain.auth.Subject user,
                                                                        int parentResourceId,
                                                                        int resourceTypeId,
                                                                        String createResourceName,
                                                                        org.rhq.core.domain.content.PackageVersion packageVersion,
                                                                        org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration)
Persists a record in the resource history to indicate a request has been made to create an package-backed resource.

Parameters:
user - user performing the create
parentResourceId - parent resource under which the resource should be created
resourceTypeId - type of resource being created
createResourceName - name of the resource being created
packageVersion - package version being installed
deploymentTimeConfiguration - configuration of the package used when installing
Returns:
persisted history entity (i.e. ID will be populated)

persistDeleteHistory

org.rhq.core.domain.resource.DeleteResourceHistory persistDeleteHistory(org.rhq.core.domain.auth.Subject user,
                                                                        int resourceId)
Persists a record in the resource history to indicate a request has been made to delete a resource.

Parameters:
user - use performing the delete
resourceId - resource being deleted
Returns:
persisted history entity (i.e. ID will be populated)

checkForTimedOutRequests

void checkForTimedOutRequests()
Will check to see if any in progress resource creation jobs are taking too long to finish and if so marks them as failed. This method will be perodically called by the server.


createResource

org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject,
                                                                  int parentResourceId,
                                                                  int resourceTypeId,
                                                                  String resourceName,
                                                                  org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                  org.rhq.core.domain.configuration.Configuration resourceConfiguration)
See Also:
ResourceFactoryManagerRemote#createResource(Subject,int,int,String,Configuration,Configuration)

createPackageBackedResource

org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
                                                                               int parentResourceId,
                                                                               int newResourceTypeId,
                                                                               String newResourceName,
                                                                               org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                               String packageName,
                                                                               String packageVersion,
                                                                               Integer architectureId,
                                                                               org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                               byte[] packageBits)
See Also:
ResourceFactoryManagerRemote#createPackageBackedResource(Subject,int,int,String,Configuration,String,String,Integer,Configuration,byte[])

createPackageBackedResourceViaPackageVersion

org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                                                int parentResourceId,
                                                                                                int newResourceTypeId,
                                                                                                String newResourceName,
                                                                                                org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                                                org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                                                int packageVersionId)
See Also:
ResourceFactoryManagerRemote#createPackageBackedResourceViaPackageVersion(Subject, int, int, String, Configuration, Configuration, int)

createResource

org.rhq.core.domain.resource.CreateResourceHistory createResource(org.rhq.core.domain.auth.Subject subject,
                                                                  int parentResourceId,
                                                                  int resourceTypeId,
                                                                  String resourceName,
                                                                  org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                  org.rhq.core.domain.configuration.Configuration resourceConfiguration,
                                                                  Integer timeout)
See Also:
ResourceFactoryManagerRemote#createResource(Subject,int,int,String,Configuration,Configuration,Integer)

createPackageBackedResource

org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResource(org.rhq.core.domain.auth.Subject subject,
                                                                               int parentResourceId,
                                                                               int newResourceTypeId,
                                                                               String newResourceName,
                                                                               org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                               String packageName,
                                                                               String packageVersion,
                                                                               Integer architectureId,
                                                                               org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                               byte[] packageBits,
                                                                               Integer timeout)
See Also:
ResourceFactoryManagerRemote#createPackageBackedResource(Subject,int,int,String,Configuration,String,String,Integer,Configuration,byte[],Integer)

createPackageBackedResourceViaPackageVersion

org.rhq.core.domain.resource.CreateResourceHistory createPackageBackedResourceViaPackageVersion(org.rhq.core.domain.auth.Subject subject,
                                                                                                int parentResourceId,
                                                                                                int newResourceTypeId,
                                                                                                String newResourceName,
                                                                                                org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                                                org.rhq.core.domain.configuration.Configuration deploymentTimeConfiguration,
                                                                                                int packageVersionId,
                                                                                                Integer timeout)
See Also:
ResourceFactoryManagerRemote#createPackageBackedResourceViaPackageVersion(Subject, int, int, String, Configuration, Configuration, int, Integer)

deleteResource

org.rhq.core.domain.resource.DeleteResourceHistory deleteResource(org.rhq.core.domain.auth.Subject subject,
                                                                  int resourceId)
See Also:
ResourceFactoryManagerRemote.deleteResource(Subject,int)

deleteResources

List<org.rhq.core.domain.resource.DeleteResourceHistory> deleteResources(org.rhq.core.domain.auth.Subject subject,
                                                                         int[] resourceIds)
See Also:
ResourceFactoryManagerRemote.deleteResources(Subject,int[])

findCreateChildResourceHistory

org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.CreateResourceHistory> findCreateChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
                                                                                                                     int parentResourceId,
                                                                                                                     Long beginDate,
                                                                                                                     Long endDate,
                                                                                                                     org.rhq.core.domain.util.PageControl pageControl)

findDeleteChildResourceHistory

org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.DeleteResourceHistory> findDeleteChildResourceHistory(org.rhq.core.domain.auth.Subject subject,
                                                                                                                     int parentResourceId,
                                                                                                                     Long beginDate,
                                                                                                                     Long endDate,
                                                                                                                     org.rhq.core.domain.util.PageControl pageControl)


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