mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'release/V3.4'
This commit is contained in:
@@ -503,7 +503,52 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
@Override
|
||||
public boolean hasDisposableItems(DispositionSchedule dispositionSchdule)
|
||||
{
|
||||
return !getDisposableItems(dispositionSchdule).isEmpty();
|
||||
ParameterCheck.mandatory("dispositionSchedule", dispositionSchdule);
|
||||
|
||||
// Get the associated container
|
||||
NodeRef rmContainer = getAssociatedRecordsManagementContainer(dispositionSchdule);
|
||||
|
||||
return hasDisposableItemsImpl(dispositionSchdule.isRecordLevelDisposition(), rmContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that provides a boolean if given Records Management Container has disposable items.
|
||||
* This method is similar to getDisposableItemsImpl(boolean isRecordLevelDisposition, NodeRef rmContainer) but with improved performance:
|
||||
* For RecordLevelDisposition it will limit Record retrieval to 1.
|
||||
* Early returns once the first occurrence is found.
|
||||
* @param isRecordLevelDisposition
|
||||
* @param rmContainer
|
||||
* @return
|
||||
*/
|
||||
private boolean hasDisposableItemsImpl(boolean isRecordLevelDisposition, NodeRef rmContainer)
|
||||
{
|
||||
List<NodeRef> items = filePlanService.getAllContained(rmContainer);
|
||||
for (NodeRef item : items)
|
||||
{
|
||||
if (recordFolderService.isRecordFolder(item))
|
||||
{
|
||||
if (isRecordLevelDisposition)
|
||||
{
|
||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(item, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL, 1, true);
|
||||
if (!assocs.isEmpty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (filePlanService.isRecordCategory(item) && getAssociatedDispositionScheduleImpl(item) == null)
|
||||
{
|
||||
if (hasDisposableItemsImpl(isRecordLevelDisposition, item));
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -2,15 +2,15 @@
|
||||
set -e
|
||||
|
||||
echo "Travis commit message: $TRAVIS_COMMIT_MESSAGE"
|
||||
release_message=$(echo $TRAVIS_COMMIT_MESSAGE | grep -Po '(\[(community|enterprise)\srelease\s(\d\.)+(\d|[a-z])(-[A-Z]\d){0,1}\s(\d\.)+\d-SNAPSHOT\])')
|
||||
release_message=$(echo "$TRAVIS_COMMIT_MESSAGE" | grep -Po '(\[(community|enterprise)\srelease\s((\d)+\.)+((\d)+|[a-z])(-[A-Z](\d)+){0,1}\s((\d)+\.)+(\d)+-SNAPSHOT\])')
|
||||
|
||||
if [ ! -n "$release_message" ]; then
|
||||
echo "The commit message is in the wrong format or it does not contain all the required properties."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export RELEASE_VERSION=$(echo $release_message | grep -Po '(\d\.)+(\d|[a-z])(-[A-Z]\d){0,1}' | head -1)
|
||||
export DEVELOPMENT_VERSION=$(echo $release_message | grep -Po '(\d\.)+\d-SNAPSHOT')
|
||||
export RELEASE_VERSION=$(echo $release_message | grep -Po '((\d)+\.)+((\d)+|[a-z])(-[A-Z](\d)+){0,1}' | head -1)
|
||||
export DEVELOPMENT_VERSION=$(echo $release_message | grep -Po '((\d)+\.)+(\d)+-SNAPSHOT')
|
||||
|
||||
echo "Release version is set to $RELEASE_VERSION"
|
||||
echo "Development version is set to $DEVELOPMENT_VERSION"
|
@@ -9,7 +9,7 @@ jobs:
|
||||
deploy:
|
||||
- provider: s3
|
||||
access_key_id: ${RELEASE_AWS_ACCESS_KEY}
|
||||
secret_access_key: $RELEASE_AWS_ACCESS_SECRET}
|
||||
secret_access_key: ${RELEASE_AWS_SECRET_KEY}
|
||||
region: "eu-west-1"
|
||||
bucket: "eu.dl.alfresco.com"
|
||||
upload_dir: "release/community/RM/${RELEASE_VERSION}"
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
deploy:
|
||||
- provider: s3
|
||||
access_key_id: ${RELEASE_AWS_ACCESS_KEY}
|
||||
secret_access_key: ${RELEASE_AWS_ACCESS_SECRET}
|
||||
secret_access_key: ${RELEASE_AWS_SECRET_KEY}
|
||||
region: "eu-west-1"
|
||||
bucket: "eu.dl.alfresco.com"
|
||||
upload_dir: "release/enterprise/RM/${RELEASE_VERSION}"
|
||||
|
Reference in New Issue
Block a user