Package org.apache.ivy.plugins.resolver
Class FileSystemResolver
java.lang.Object
org.apache.ivy.plugins.resolver.AbstractResolver
org.apache.ivy.plugins.resolver.BasicResolver
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
org.apache.ivy.plugins.resolver.RepositoryResolver
org.apache.ivy.plugins.resolver.FileSystemResolver
- All Implemented Interfaces:
Validatable,DependencyResolver,HasLatestStrategy
- Direct Known Subclasses:
CacheResolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe pattern leading to the directory where files are published before being moved at the end of a transactionMap between actual patterns and patterns used during the transaction to put files in a temporary directoryprivate BooleanWhen set indicates if this resolver supports transactionprivate static final Stringprivate static final Patternprivate StringTransactional mode.private FileLocation where files should end up at the end of the transactionprivate FileLocation where files are published during the transactionFields inherited from class org.apache.ivy.plugins.resolver.BasicResolver
DATE_FORMAT, DESCRIPTOR_OPTIONAL, DESCRIPTOR_REQUIRED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddArtifactPattern(String pattern) voidvoidvoidaddIvyPattern(String pattern) example of pattern : ~/Workspace/[module]/[module].ivy.xmlvoidbeginPublishTransaction(ModuleRevisionId module, boolean overwrite) private voidprivate voidvoidprotected Collection<String>filterNames(Collection<String> values) Filters names before returning them in the findXXXNames or findTokenValues method.protected StringgetDestination(String pattern, Artifact artifact, ModuleRevisionId mrid) private FileRepositoryprivate voidinitTransaction(ModuleRevisionId module) booleanisLocal()private booleanvoidsetLocal(boolean local) voidsetTransactional(String transactional) booleanprivate voidMethods inherited from class org.apache.ivy.plugins.resolver.RepositoryResolver
download, dumpSettings, exist, findResourceUsingPattern, findTokenValues, get, getRepository, getResource, isAlwaysCheckExactRevision, listResources, listTokenValues, publish, put, putChecksum, putSignature, setAlwaysCheckExactRevision, setName, setRepository, setSettings, setSignerMethods inherited from class org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver
convertM2CriteriaForResourceSearch, convertM2IdForResourceSearch, convertM2OrganizationForResourceSearch, convertM2ResourceSearchIdToNormal, convertM2TokenValuesForResourceSearch, findArtifactNames, findArtifactRef, findIvyFileRef, findIvyNames, findNames, findResource, findResourceUsingPatterns, getArtifactPatterns, getIvyPatterns, getModuleDescriptorExtension, isM2compatible, listTokenValues, setArtifactPatterns, setIvyPatterns, setM2compatibleMethods inherited from class org.apache.ivy.plugins.resolver.BasicResolver
acceptLatest, checkModuleDescriptorRevision, clearArtifactAttempts, clearIvyAttempts, doFindArtifactRef, download, exists, findFirstArtifactRef, getAndCheck, getArtifactRef, getChecksumAlgorithms, getDefaultRMDParser, getDependency, getPublicationDate, getRMDParser, getWorkspaceName, isAllownomd, isCheckconsistency, isEnvDependent, isForce, listModules, listOrganisations, listRevisions, listTokenValues, locate, logArtifactAttempt, logAttempt, logIvyAttempt, parse, reportFailure, reportFailure, setAllownomd, setCheckconsistency, setChecksums, setDescriptor, setEnvDependent, setForce, setWorkspaceName, shouldReturnResolvedModule, toStringMethods inherited from class org.apache.ivy.plugins.resolver.AbstractResolver
checkInterrupted, checkLatest, doValidate, findModuleInCache, findModuleInCache, fromSystem, fromSystem, getCacheDownloadOptions, getCacheOptions, getChangingMatcherName, getChangingPattern, getDownloadOptions, getEventManager, getLatest, getLatestStrategy, getName, getNamespace, getParserSettings, getRepositoryCacheManager, getSettings, getSystemNode, getTimeoutConstraint, hidePassword, isAfter, isValidate, saveModuleRevisionIfNeeded, setCache, setChangingMatcher, setChangingPattern, setCheckmodified, setEventManager, setLatest, setLatestStrategy, setNamespace, setRepositoryCacheManager, setTimeoutConstraint, setValidate, toSystem, toSystem, toSystem, toSystem, toSystem, toSystem, validate
-
Field Details
-
TRANSACTION_DESTINATION_SUFFIX
- See Also:
-
TRANSACTION_PATTERN
-
transactional
Transactional mode. auto: use transaction if possible, only log verbose message if not true: always use transaction, fail if not supported false: never use transactions -
supportTransaction
When set indicates if this resolver supports transaction -
baseTransactionPattern
The pattern leading to the directory where files are published before being moved at the end of a transaction -
fullTransactionPatterns
Map between actual patterns and patterns used during the transaction to put files in a temporary directory -
transactionTempDir
Location where files are published during the transaction -
transactionDestDir
Location where files should end up at the end of the transaction
-
-
Constructor Details
-
FileSystemResolver
public FileSystemResolver()
-
-
Method Details
-
getTypeName
- Overrides:
getTypeNamein classRepositoryResolver
-
isLocal
public boolean isLocal() -
setLocal
public void setLocal(boolean local) -
getFileRepository
-
getDestination
- Overrides:
getDestinationin classRepositoryResolver
-
isTransactionStarted
private boolean isTransactionStarted() -
abortPublishTransaction
- Specified by:
abortPublishTransactionin interfaceDependencyResolver- Overrides:
abortPublishTransactionin classAbstractResolver- Throws:
IOException
-
commitPublishTransaction
- Specified by:
commitPublishTransactionin interfaceDependencyResolver- Overrides:
commitPublishTransactionin classAbstractResolver- Throws:
IOException
-
beginPublishTransaction
- Specified by:
beginPublishTransactionin interfaceDependencyResolver- Overrides:
beginPublishTransactionin classAbstractResolver- Throws:
IOException
-
filterNames
Description copied from class:BasicResolverFilters names before returning them in the findXXXNames or findTokenValues method.Remember to call the super implementation when overriding this method.
- Overrides:
filterNamesin classBasicResolver- Parameters:
values- the list to filter.- Returns:
- the filtered list
-
supportTransaction
public boolean supportTransaction() -
closeTransaction
private void closeTransaction() -
checkSupportTransaction
private void checkSupportTransaction() -
unsupportedTransaction
-
initTransaction
-
getTransactional
-
setTransactional
-
addConfiguredIvy
- Overrides:
addConfiguredIvyin classAbstractPatternsBasedResolver
-
addIvyPattern
Description copied from class:AbstractPatternsBasedResolverexample of pattern : ~/Workspace/[module]/[module].ivy.xml- Overrides:
addIvyPatternin classAbstractPatternsBasedResolver- Parameters:
pattern- String
-
addConfiguredArtifact
- Overrides:
addConfiguredArtifactin classAbstractPatternsBasedResolver
-
addArtifactPattern
- Overrides:
addArtifactPatternin classAbstractPatternsBasedResolver
-