public class PackageStore
extends com.streamscape.sef.dispatcher.AbstractRuntimeFactory
Title: Open Service Framework
Description: This pseudo-factory facilitates management of Packages and cached Java Archives.
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
PackageStore(com.streamscape.repository.RepositoryContext repositoryContext) |
Modifier and Type | Method and Description |
---|---|
static void |
abortXact()
Aborts the pseudo-transaction, releasing all resources.
|
static void |
beginXact()
Starts a pseudo-transaction for the calling thread.
|
static void |
beginXact(FabricComponent component)
Starts a pseudo-transaction for the calling thread.
|
static void |
commitXact()
Commits a pseudo-transaction and releases all resources held by the transaction.
|
static Package |
createClientFactoryPackage(java.lang.String name)
A convenience method for creating a
Client Factory package. |
static Package |
createCollectionPackage(java.lang.String name)
A convenience method for creating an
Archive Collection package. |
static Package |
createJDBCFactoryPackage(java.lang.String name)
A convenience method for creating new
JDBC Factory package. |
static Package |
createSDOPackage(java.lang.String name)
A convenience method for creating a
Structured Data Objects collection package. |
static Package |
createServicePackage(java.lang.String name)
A convenience method for creating a
Service package. |
static Package |
createTransportFactoryPackage(java.lang.String name)
A convenience method for creating a new
Transport Factory package. |
static boolean |
existsArchive(java.lang.String jarName)
Returns
true if the named archive exists in the library area. |
static boolean |
existsPackage(PackageType pkgType,
java.lang.String pkgName)
Checks if a specific package is in the package store.
|
static void |
exportPackage(java.lang.String workingDir,
PackageType type,
java.lang.String name)
Exports the package definition and its associate JAR File to a specified directory.
|
static void |
importPackage(java.lang.String workingDir,
Package pkg)
Import a package and associate JAR Files specified by the
Package object into the runtime
repository and/or local cache depending on the Runtime Context settings. |
static Package |
loadPackage(PackageType type,
java.lang.String name)
Loads a
Package object of a given type from a specific persistence context. |
static Package |
loadPackage(java.lang.String workingDir,
PackageType type,
java.lang.String name)
Loads a
Package object of a given type from the working directory. |
static java.net.URL[] |
loadPackageURLs(Package pkg)
Loads the factory package from a repository or runtime cache depending on the
Runtime Context settings. |
static java.net.URL[] |
loadPackageURLs(java.lang.String workingDir,
Package pkg)
Loads the package URLs from a specified directory.
|
static void |
removePackage(PackageType type,
java.lang.String name,
boolean withJars)
Removes the package.
|
static void |
savePackageObject(java.lang.String workingDir,
Package pkg)
Saves a package configuration object to a specific
Working Directory . |
getContextType, hasContext
clone, getSerialVersionUID
public PackageStore(com.streamscape.repository.RepositoryContext repositoryContext)
public static void beginXact() throws PackageConfigurationException
PackageConfigurationException
public static void beginXact(FabricComponent component) throws PackageConfigurationException
component
- FabricComponent The component on whose behalf the transaction is affected.PackageConfigurationException
public static void commitXact() throws PackageConfigurationException
PackageConfigurationException
public static void abortXact()
public static Package createJDBCFactoryPackage(java.lang.String name) throws PackageConfigurationException
JDBC Factory
package.
false
name
- StringPackageConfigurationException
public static Package createTransportFactoryPackage(java.lang.String name) throws PackageConfigurationException
Transport Factory
package.
false
name
- StringRuntimeContextException
PackageConfigurationException
public static Package createClientFactoryPackage(java.lang.String name) throws PackageConfigurationException
Client Factory
package.
false
name
- StringPackageConfigurationException
public static Package createServicePackage(java.lang.String name) throws PackageConfigurationException
Service
package.
false
name
- StringPackageConfigurationException
public static Package createCollectionPackage(java.lang.String name) throws PackageConfigurationException
Archive Collection
package.
false
name
- StringPackageConfigurationException
public static Package createSDOPackage(java.lang.String name) throws PackageConfigurationException
Structured Data Objects
collection package.
false
name
- StringPackageConfigurationException
public static boolean existsArchive(java.lang.String jarName) throws PackageConfigurationException
true
if the named archive exists in the library area.
false
jarName
- StringPackageConfigurationException
public static boolean existsPackage(PackageType pkgType, java.lang.String pkgName)
false
pkgType
- PackageTypepkgName
- Stringpublic static java.net.URL[] loadPackageURLs(Package pkg) throws PackageConfigurationException
Runtime Context
settings.
false
pkg
- PackagePackageConfigurationException
public static java.net.URL[] loadPackageURLs(java.lang.String workingDir, Package pkg) throws PackageConfigurationException
false
workingDir
- Stringpkg
- PackagePackageConfigurationException
public static void savePackageObject(java.lang.String workingDir, Package pkg) throws PackageConfigurationException
Working Directory
.
false
workingDir
- Stringpkg
- PackagePackageConfigurationException
public static Package loadPackage(PackageType type, java.lang.String name) throws PackageConfigurationException
Package
object of a given type from a specific persistence context.
true
type
- PackageTypename
- StringPackageConfigurationException
public static Package loadPackage(java.lang.String workingDir, PackageType type, java.lang.String name) throws PackageConfigurationException
Package
object of a given type from the working directory.
false
workingDir
- Stringtype
- PackageTypename
- StringPackageConfigurationException
public static void exportPackage(java.lang.String workingDir, PackageType type, java.lang.String name) throws PackageConfigurationException
true
workingDir
- Stringtype
- PackageTypename
- StringPackageConfigurationException
public static void importPackage(java.lang.String workingDir, Package pkg) throws PackageConfigurationException
Package
object into the runtime
repository and/or local cache depending on the Runtime Context settings. The import checks wether any of the
archives are in use by packages. If any of the archives are in use the import fails and an exception is thrown.
true
workingDir
- Stringpkg
- PackagePackageConfigurationException
public static void removePackage(PackageType type, java.lang.String name, boolean withJars) throws PackageConfigurationException
withJars
parameter is true package's associate Jar files
will be removed also. Depending on the persistence model the
package will be removed from a local runtime cache, the repository or both.
true
type
- PackageTypename
- StringwithJars
- booleanPackageConfigurationException
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.