lucee.Componentcommandbox.system.services.ArtifactService
Copyright Since 2014 CommandBox by Ortus Solutions, Corp
www.coldbox.org | www.ortussolutions.com
I handle artifacts, which are basically just a cache of downloaded packages.
Artifacts are stored in this format:
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
artifactDir
|
true
|
false
|
|
any
|
configService
|
true
|
false
|
|
any
|
logger
|
true
|
false
|
|
any
|
packageService
|
true
|
false
|
|
any
|
semanticVersion
|
true
|
false
|
|
any
|
tempDir
|
true
|
false
|
Method Summary | |
---|---|
boolean
|
artifactExists(any packageName, any version)
Returns true if a package exists in the artifact cache, false if not. |
numeric
|
cleanArtifacts()
Removes all artifacts from the cache and returns the number of wiped out directories. |
ArtifactService
|
createArtifact(any packageName, any version, any packagePath)
Store a package in the artifact cache. |
any
|
createArtifactFromFolder(any packageName, any version, any packageFolder)
Store a package in the artifact cache. |
any
|
findSatisfyingVersion(string slug, string version)
Figures out the closest satisfying version that's available for a package in the local artifacts cache. |
struct
|
getArtifactDescriptor(any packageName, any version)
Returns the descriptor file (box. |
string
|
getArtifactDir()
|
any
|
getArtifactPath(any packageName, any version)
Returns the filesystem path of the artifact zip file. |
string
|
getArtifactsDirectory()
|
string
|
getConfigService()
|
string
|
getLogger()
|
any
|
getPackagePath(any packageName, [any version=''])
Returns the filesystem path of the package path. |
string
|
getPackageService()
|
string
|
getSemanticVersion()
|
string
|
getTempDir()
|
struct
|
listArtifacts([any packageName=''])
List the packages in the artifacts cache. |
any
|
onDIComplete()
DI complete. |
boolean
|
packageExists(any packageName, [any version=''])
Returns true if a package exists in the artifact cache, false if not. |
boolean
|
removeArtifact(any packageName, [any version=''])
Removes an artifact or an artifact package, true if removed. |
any
|
setArtifactDir(any artifactDir)
|
any
|
setConfigService(any configService)
|
any
|
setLogger(any logger)
|
any
|
setPackageService(any packageService)
|
any
|
setSemanticVersion(any semanticVersion)
|
any
|
setTempDir(any tempDir)
|
Methods inherited from class lucee.Component |
---|
None |
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- artifactDir@constantsserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- ConfigServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- logbox:logger:{this}serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- PackageServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:semanticVersion@semverserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- tempDir@constantsserializable
- trueMethod Detail |
---|
Returns true if a package exists in the artifact cache, false if not.
packageName
- The package name to look forversion
- The version of the package to look forRemoves all artifacts from the cache and returns the number of wiped out directories
Store a package in the artifact cache. This expects that the package is already downloaded and stored somewhere on the local filesystem. An error is thrown if the packageZip file doesn't exist or doesn't have a ".zip" extension.
packageName
- The package name to look forversion
- The version of the package to look forpackagePath
- A file path to a local zip file that contains the packageStore a package in the artifact cache. This expects that the package is already downloaded and stored somewhere on the local filesystem.
packageName
- The package name to look forversion
- The version of the package to look forpackageFolder
- A file path to a local folder that contains the packageFigures out the closest satisfying version that's available for a package in the local artifacts cache.
slug
- Slug of packageversion
- Version range to satisfyReturns the descriptor file (box.json) for a packge parsed as a struct. This data will be merged with a default document to guaruntee existence of standard variables and reduce the need for "exist" checks in our code
packageName
- The package name to look forversion
- The version of the package to look forReturns the filesystem path of the artifact zip file
packageName
- The package name to look forversion
- The version of the package to look forReturns the filesystem path of the package path
packageName
- The package name to look forversion
- The version to look forList the packages in the artifacts cache.
packageName
- Supply a package to see only versions of this packageDI complete
Returns true if a package exists in the artifact cache, false if not.
packageName
- The package name to look forversion
- The version to look forRemoves an artifact or an artifact package, true if removed
packageName
- The package name to look forversion
- The version to look forartifactDir
configService
logger
packageService
semanticVersion
tempDir