org.drools.guvnor.client.rpc
Interface PackageService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
RepositoryPackageService, RepositoryServiceServlet

public interface PackageService
extends com.google.gwt.user.client.rpc.RemoteService


Method Summary
 BuilderResult buildPackage(String packageUUID, boolean force, String buildMode, String operator, String statusDescriptionValue, boolean enableStatusSelector, String categoryOperator, String category, boolean enableCategorySelector, String customSelectorName)
          Build the package (may be a snapshot) and return the result.
 String buildPackageSource(String packageUUID)
          This will return the effective DRL for a package.
 SnapshotComparisonPageResponse compareSnapshots(SnapshotComparisonPageRequest request)
           
 SnapshotDiffs compareSnapshots(String packageName, String firstSnapshotName, String secondSnapshotName)
          Deprecated. in favour of compareSnapshots(SnapshotComparisonRequest)
 void copyOrRemoveSnapshot(String packageName, String snapshotName, boolean delete, String newSnapshotName)
          This alters an existing snapshot, it can be used to copy or delete it.
 String copyPackage(String sourcePackageName, String destPackageName)
          Copy the package (everything).
 String createPackage(String name, String description, String format)
          This creates a package of the given name, and checks it in.
 void createPackageSnapshot(String packageName, String snapshotName, boolean replaceExisting, String comment)
          Create a package snapshot for deployment.
 String createSubPackage(String name, String description, String parentPackage)
          This creates a package of the given name, and checks it in.
 String[] getDependencies(String uuid)
           
 void installSampleRepository()
          Installs the sample repository, wiping out what was already there.
 PackageConfigData[] listArchivedPackages()
          This returns a list of archived packages.
 String[] listImagesInPackage(String packageName)
          This will list the images available in a package.
 PackageConfigData[] listPackages()
          This returns a list of packages where rules may be added.
 PackageConfigData[] listPackages(String workspace)
          This returns a list of packages where rules may be added.
 String[] listRulesInPackage(String packageName)
          This will list the rules available in a package.
 SnapshotInfo[] listSnapshots(String packageName)
          This will load a list of snapshots for the given package.
 String[] listTypesInPackage(String packageUUID)
          List the fact types (class names) in the scope of a given package.
 PackageConfigData loadGlobalPackage()
          This returns the global packages.
 PackageConfigData loadPackageConfig(String uuid)
          Loads a package by its uuid.
 SnapshotInfo loadSnapshotInfo(String packageName, String snapshotName)
           
 void rebuildPackages()
          This will force a rebuild of all packages binary data.
 void rebuildSnapshots()
          This will force a rebuild of all snapshots binary data.
 void removePackage(String uuid)
          Permanently remove a package (delete it).
 String renamePackage(String uuid, String newName)
          Rename a package.
 SingleScenarioResult runScenario(String packageName, Scenario scenario)
           
 BulkTestRunResult runScenariosInPackage(String packageUUID)
          This should be pretty obvious what it does !
 void savePackage(PackageConfigData data)
          Saves the package config data in place (does not create a new version of anything).
 void updateDependency(String uuid, String dependencyPath)
           
 ValidatedResponse validatePackageConfiguration(PackageConfigData data)
          Validate package configuration
 

Method Detail

listPackages

PackageConfigData[] listPackages()
This returns a list of packages where rules may be added. Only the UUID and the name need to be populated.


listPackages

PackageConfigData[] listPackages(String workspace)
This returns a list of packages where rules may be added. Only the UUID and the name need to be populated.


listArchivedPackages

PackageConfigData[] listArchivedPackages()
This returns a list of archived packages.


loadGlobalPackage

PackageConfigData loadGlobalPackage()
This returns the global packages.


loadSnapshotInfo

SnapshotInfo loadSnapshotInfo(String packageName,
                              String snapshotName)

createPackage

String createPackage(String name,
                     String description,
                     String format)
                     throws com.google.gwt.user.client.rpc.SerializationException
This creates a package of the given name, and checks it in.

Returns:
UUID of the created item.
Throws:
com.google.gwt.user.client.rpc.SerializationException

createSubPackage

String createSubPackage(String name,
                        String description,
                        String parentPackage)
                        throws com.google.gwt.user.client.rpc.SerializationException
This creates a package of the given name, and checks it in.

Returns:
UUID of the created item.
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadPackageConfig

PackageConfigData loadPackageConfig(String uuid)
Loads a package by its uuid.

Returns:
Well, its pretty obvious if you think about it for a minute. Really.

validatePackageConfiguration

ValidatedResponse validatePackageConfiguration(PackageConfigData data)
                                               throws com.google.gwt.user.client.rpc.SerializationException
Validate package configuration

Returns:
A ValidatedReponse, with any errors to be reported. No payload is in the response. If there are any errors, the user should be given the option to review them, and correct them if needed (but a save will not be prevented this way - as its not an exception).
Throws:
com.google.gwt.user.client.rpc.SerializationException

savePackage

void savePackage(PackageConfigData data)
                 throws com.google.gwt.user.client.rpc.SerializationException
Saves the package config data in place (does not create a new version of anything).

Throws:
com.google.gwt.user.client.rpc.SerializationException

createPackageSnapshot

void createPackageSnapshot(String packageName,
                           String snapshotName,
                           boolean replaceExisting,
                           String comment)
Create a package snapshot for deployment.

Parameters:
packageName - THe name of the package to copy.
snapshotName - The name of the snapshot. Has to be unique unless existing one is to be replaced.
replaceExisting - Replace the existing one (must be true to replace an existing snapshot of the same name).
comment - A comment to be added to the copied one.

copyOrRemoveSnapshot

void copyOrRemoveSnapshot(String packageName,
                          String snapshotName,
                          boolean delete,
                          String newSnapshotName)
                          throws com.google.gwt.user.client.rpc.SerializationException
This alters an existing snapshot, it can be used to copy or delete it.

Parameters:
packageName - The package name that we are dealing with.
snapshotName - The snapshot name (this must exist)
delete - true if the snapshotName is to be removed.
newSnapshotName - The name of the target snapshot that the contents will be copied to.
Throws:
com.google.gwt.user.client.rpc.SerializationException

buildPackage

BuilderResult buildPackage(String packageUUID,
                           boolean force,
                           String buildMode,
                           String operator,
                           String statusDescriptionValue,
                           boolean enableStatusSelector,
                           String categoryOperator,
                           String category,
                           boolean enableCategorySelector,
                           String customSelectorName)
                           throws com.google.gwt.user.client.rpc.SerializationException
Build the package (may be a snapshot) and return the result.

This will then store the result in the package as an attachment.

if a non null selectorName is passed in it will lookup a selector as configured in the systems selectors.properties file. This will then apply the filter to the package being built.

Throws:
com.google.gwt.user.client.rpc.SerializationException

buildPackageSource

String buildPackageSource(String packageUUID)
                          throws com.google.gwt.user.client.rpc.SerializationException
This will return the effective DRL for a package. This would be the equivalent if all the rules were written by hand in the one file. It may not actually be compiled this way in the implementation, so this is for display and debugging assistance only.

It should still generate

Throws:
com.google.gwt.user.client.rpc.SerializationException

copyPackage

String copyPackage(String sourcePackageName,
                   String destPackageName)
                   throws com.google.gwt.user.client.rpc.SerializationException
Copy the package (everything).

Parameters:
sourcePackageName -
destPackageName -
Throws:
com.google.gwt.user.client.rpc.SerializationException

removePackage

void removePackage(String uuid)
Permanently remove a package (delete it).

Parameters:
uuid - of the package.

renamePackage

String renamePackage(String uuid,
                     String newName)
Rename a package.


rebuildSnapshots

void rebuildSnapshots()
                      throws com.google.gwt.user.client.rpc.SerializationException
This will force a rebuild of all snapshots binary data. No errors are expected, as there will be no change. If there are errors, an expert will need to look at them.

Throws:
com.google.gwt.user.client.rpc.SerializationException

rebuildPackages

void rebuildPackages()
                     throws com.google.gwt.user.client.rpc.SerializationException
This will force a rebuild of all packages binary data. No errors are expected, as there will be no change. If there are errors, an expert will need to look at them.

Throws:
com.google.gwt.user.client.rpc.SerializationException

listRulesInPackage

String[] listRulesInPackage(String packageName)
                            throws com.google.gwt.user.client.rpc.SerializationException
This will list the rules available in a package. This has an upper limit of what it will return (it just doesn't make sense to show a list of 20K items !).

Throws:
com.google.gwt.user.client.rpc.SerializationException

listImagesInPackage

String[] listImagesInPackage(String packageName)
                             throws com.google.gwt.user.client.rpc.SerializationException
This will list the images available in a package. This has an upper limit of what it will return (it just doesn't make sense to show a list of 20K items !).

Throws:
com.google.gwt.user.client.rpc.SerializationException

listSnapshots

SnapshotInfo[] listSnapshots(String packageName)
This will load a list of snapshots for the given package. Snapshots are created by taking a labelled copy of a package, at a point in time, for instance for deployment.


listTypesInPackage

String[] listTypesInPackage(String packageUUID)
                            throws com.google.gwt.user.client.rpc.SerializationException
List the fact types (class names) in the scope of a given package. This may not include things on the "system" classpath, but only things specifically scoped to the package (eg in jars that have been uploaded to it as an asset).

Throws:
com.google.gwt.user.client.rpc.SerializationException

installSampleRepository

void installSampleRepository()
                             throws com.google.gwt.user.client.rpc.SerializationException
Installs the sample repository, wiping out what was already there. Generally shouldn't call this unless it is new !

Throws:
com.google.gwt.user.client.rpc.SerializationException

compareSnapshots

SnapshotDiffs compareSnapshots(String packageName,
                               String firstSnapshotName,
                               String secondSnapshotName)
Deprecated. in favour of compareSnapshots(SnapshotComparisonRequest)

Compare two snapshots.


compareSnapshots

SnapshotComparisonPageResponse compareSnapshots(SnapshotComparisonPageRequest request)

runScenario

SingleScenarioResult runScenario(String packageName,
                                 Scenario scenario)
                                 throws com.google.gwt.user.client.rpc.SerializationException
Parameters:
packageName - The package name the scenario is to be run in.
scenario - The scenario to run.
Returns:
The scenario, with the results fields populated.
Throws:
com.google.gwt.user.client.rpc.SerializationException

runScenariosInPackage

BulkTestRunResult runScenariosInPackage(String packageUUID)
                                        throws com.google.gwt.user.client.rpc.SerializationException
This should be pretty obvious what it does !

Throws:
com.google.gwt.user.client.rpc.SerializationException

updateDependency

void updateDependency(String uuid,
                      String dependencyPath)

getDependencies

String[] getDependencies(String uuid)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.