mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Fixes and refinements to links management UI
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6082 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -74,8 +74,7 @@ public class LinkValidationState
|
||||
private int noBrokenLinksStart = -1;
|
||||
private int noBrokenLinksLast = -1;
|
||||
|
||||
private int noFixedFiles = -1;
|
||||
private int noFixedLinks = -1;
|
||||
private int noFixedItems = -1;
|
||||
|
||||
private List<String> brokenStaticFilesStart;
|
||||
private List<String> brokenFormsStart;
|
||||
@@ -204,19 +203,11 @@ public class LinkValidationState
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The number of files fixed since the initial link check
|
||||
* @return The number of items fixed since the initial link check
|
||||
*/
|
||||
public int getNumberFixedFiles()
|
||||
public int getNumberFixedItems()
|
||||
{
|
||||
return this.noFixedFiles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The number of links fixed since the initial link check
|
||||
*/
|
||||
public int getNumberFixedLinks()
|
||||
{
|
||||
return this.noFixedLinks;
|
||||
return this.noFixedItems;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,15 +226,6 @@ public class LinkValidationState
|
||||
return this.brokenFormsLast;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A list of all files found (including those generated by forms) that
|
||||
* contain broken links
|
||||
*/
|
||||
public List<String> getAllFilesWithBrokenLinks()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param form The name of a form to find broken files for
|
||||
* @return The list of broken files generated by the given form
|
||||
@@ -351,8 +333,7 @@ public class LinkValidationState
|
||||
this.noBrokenLinksLast = report.getNumberBrokenLinks();
|
||||
this.noFilesCheckedLast = report.getNumberFilesChecked();
|
||||
this.noLinksCheckedLast = report.getNumberLinksChecked();
|
||||
this.noFixedFiles = 0;
|
||||
this.noFixedLinks = 0;
|
||||
this.noFixedItems = 0;
|
||||
|
||||
// setup fixed lists
|
||||
this.fixedFiles = new ArrayList<String>(this.noBrokenFilesStart);
|
||||
@@ -370,18 +351,6 @@ public class LinkValidationState
|
||||
this.noFilesCheckedLast = report.getNumberFilesChecked();
|
||||
this.noLinksCheckedLast = report.getNumberLinksChecked();
|
||||
|
||||
this.noFixedFiles = this.noBrokenFilesStart - this.noBrokenFilesLast;
|
||||
this.noFixedLinks = this.noBrokenLinksStart - this.noBrokenLinksLast;
|
||||
|
||||
if (this.noFixedFiles < 0)
|
||||
{
|
||||
this.noFixedFiles = 0;
|
||||
}
|
||||
if (this.noFixedLinks < 0)
|
||||
{
|
||||
this.noFixedLinks = 0;
|
||||
}
|
||||
|
||||
// process the broken files and determine which ones are static files
|
||||
// and which ones are generated
|
||||
processFiles(report.getFilesWithBrokenLinks(), updatedReport, report);
|
||||
@@ -404,6 +373,9 @@ public class LinkValidationState
|
||||
this.fixedForms.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
// calculate the number of fixed items we have
|
||||
this.noFixedItems = this.fixedFiles.size() + this.fixedForms.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user