mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.0 to HEAD
5448: (From V1.4) 5281 (V1.4): Patches not executed in read-only mode 5284 (V1.4): Integrity messages 5308 (V1.4): Category selector performance 5331 (V1.4): Category performance 5402 (V1.4): AR-1315 5410 (V1.4): 5417 (V1.4): Upgrade script performance 5435 (V1.4): Lucene test text encoding git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5482 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -101,6 +101,7 @@ public class AssocSourceMultiplicityIntegrityEvent extends AbstractIntegrityEven
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"Association type does not exist: \n" +
|
||||
" Target Node: " + targetNodeRef + "\n" +
|
||||
" Target Node Type: " + targetNodeTypeQName + "\n" +
|
||||
" Association Type: " + assocTypeQName);
|
||||
eventResults.add(result);
|
||||
@@ -156,6 +157,7 @@ public class AssocSourceMultiplicityIntegrityEvent extends AbstractIntegrityEven
|
||||
String parentOrSourceStr = (assocDef.isChild() ? "parent" : "source");
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association " + parentOrSourceStr + " multiplicity has been violated: \n" +
|
||||
" Target Node: " + targetNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Required " + parentOrSourceStr + " Multiplicity: " + getMultiplicityString(mandatory, allowMany) + "\n" +
|
||||
" Actual " + parentOrSourceStr + " Multiplicity: " + actualSize);
|
||||
|
@@ -82,6 +82,7 @@ public class AssocSourceTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"Association type does not exist: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Source Node Type: " + sourceNodeTypeQName + "\n" +
|
||||
" Association Type: " + assocTypeQName);
|
||||
eventResults.add(result);
|
||||
@@ -110,6 +111,7 @@ public class AssocSourceTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association source type is incorrect: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Required Source Type: " + sourceDef.getName() + "\n" +
|
||||
" Actual Source Type: " + sourceNodeTypeQName);
|
||||
@@ -133,6 +135,7 @@ public class AssocSourceTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association source is missing the aspect required for this association: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Required Source Aspect: " + sourceDef.getName() + "\n" +
|
||||
" Actual Source Aspects: " + sourceAspects);
|
||||
@@ -143,6 +146,7 @@ public class AssocSourceTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"Unknown ClassDefinition subclass on the source definition: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Source Definition: " + sourceDef.getName());
|
||||
eventResults.add(result);
|
||||
|
@@ -101,6 +101,7 @@ public class AssocTargetMultiplicityIntegrityEvent extends AbstractIntegrityEven
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"Association type does not exist: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Source Node Type: " + sourceNodeTypeQName + "\n" +
|
||||
" Association Type: " + assocTypeQName);
|
||||
eventResults.add(result);
|
||||
@@ -156,6 +157,7 @@ public class AssocTargetMultiplicityIntegrityEvent extends AbstractIntegrityEven
|
||||
String childOrTargetStr = (assocDef.isChild() ? "child" : "target");
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association " + childOrTargetStr + " multiplicity has been violated: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Required " + childOrTargetStr + " Multiplicity: " + getMultiplicityString(mandatory, allowMany) + "\n" +
|
||||
" Actual " + childOrTargetStr + " Multiplicity: " + actualSize);
|
||||
|
@@ -55,6 +55,7 @@ public class AssocTargetRoleIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
QName assocTypeQName = getTypeQName();
|
||||
QName assocQName = getQName();
|
||||
NodeRef sourceNodeRef = getNodeRef();
|
||||
|
||||
// get the association def
|
||||
AssociationDefinition assocDef = getAssocDef(eventResults, assocTypeQName);
|
||||
@@ -80,7 +81,7 @@ public class AssocTargetRoleIntegrityEvent extends AbstractIntegrityEvent
|
||||
ChildAssociationDefinition childAssocDef = (ChildAssociationDefinition) assocDef;
|
||||
|
||||
// perform required checks
|
||||
checkAssocQNameRegex(eventResults, childAssocDef, assocQName);
|
||||
checkAssocQNameRegex(eventResults, childAssocDef, assocQName, sourceNodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +90,8 @@ public class AssocTargetRoleIntegrityEvent extends AbstractIntegrityEvent
|
||||
protected void checkAssocQNameRegex(
|
||||
List<IntegrityRecord> eventResults,
|
||||
ChildAssociationDefinition assocDef,
|
||||
QName assocQName)
|
||||
QName assocQName,
|
||||
NodeRef sourceNodeRef)
|
||||
{
|
||||
// check the association name
|
||||
QName assocRoleQName = assocDef.getTargetRoleName();
|
||||
@@ -101,6 +103,7 @@ public class AssocTargetRoleIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association name does not match the allowed role names: \n" +
|
||||
" Source Node: " + sourceNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Allowed roles: " + rolePattern + "\n" +
|
||||
" Name assigned: " + assocRoleQName);
|
||||
|
@@ -82,6 +82,7 @@ public class AssocTargetTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"Association type does not exist: \n" +
|
||||
" Target Node: " + targetNodeRef + "\n" +
|
||||
" Target Node Type: " + targetNodeTypeQName + "\n" +
|
||||
" Association Type: " + assocTypeQName);
|
||||
eventResults.add(result);
|
||||
@@ -110,6 +111,7 @@ public class AssocTargetTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association target type is incorrect: \n" +
|
||||
" Target Node: " + targetNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Required Target Type: " + targetDef.getName() + "\n" +
|
||||
" Actual Target Type: " + targetNodeTypeQName);
|
||||
@@ -133,6 +135,7 @@ public class AssocTargetTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"The association target is missing the aspect required for this association: \n" +
|
||||
" Target Node: " + targetNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Required Target Aspect: " + targetDef.getName() + "\n" +
|
||||
" Actual Target Aspects: " + targetAspects);
|
||||
@@ -143,6 +146,7 @@ public class AssocTargetTypeIntegrityEvent extends AbstractIntegrityEvent
|
||||
{
|
||||
IntegrityRecord result = new IntegrityRecord(
|
||||
"Unknown ClassDefinition subclass on the target definition: \n" +
|
||||
" Target Node: " + targetNodeRef + "\n" +
|
||||
" Association: " + assocDef + "\n" +
|
||||
" Source Definition: " + targetDef.getName());
|
||||
eventResults.add(result);
|
||||
|
Reference in New Issue
Block a user