mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Patches that were not executed (but considered) are not output on startup
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2198 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -69,7 +69,14 @@ public class PatchExecuter
|
||||
// list all patches applied, including failures
|
||||
for (PatchInfo patchInfo : appliedPatches)
|
||||
{
|
||||
if (patchInfo.getSucceeded())
|
||||
if (!patchInfo.getWasExecuted())
|
||||
{
|
||||
// the patch was not executed
|
||||
logger.debug("Applied patch (not executed): \n" +
|
||||
" ID: " + patchInfo.getId() + "\n" +
|
||||
" RESULT: " + patchInfo.getReport());
|
||||
}
|
||||
else if (patchInfo.getSucceeded())
|
||||
{
|
||||
logger.info("Applied patch: \n" +
|
||||
" ID: " + patchInfo.getId() + "\n" +
|
||||
|
@@ -41,6 +41,8 @@ public interface PatchInfo
|
||||
|
||||
public Date getAppliedOnDate();
|
||||
|
||||
public boolean getWasExecuted();
|
||||
|
||||
public boolean getSucceeded();
|
||||
|
||||
public String getReport();
|
||||
|
@@ -209,6 +209,7 @@ public class PatchServiceImpl implements PatchService
|
||||
appliedPatch.setAppliedToServer(server); // the current version and label of the server
|
||||
appliedPatch.setAppliedOnDate(new Date()); // the date applied
|
||||
appliedPatch.setSucceeded(success); // whether or not the patch succeeded
|
||||
appliedPatch.setWasExecuted(applies); // whether or not the patch was executed
|
||||
appliedPatch.setReport(report); // additional, human-readable, status
|
||||
|
||||
// done
|
||||
|
@@ -42,6 +42,8 @@ import org.alfresco.service.namespace.QName;
|
||||
* <p>
|
||||
* This class should be replaced with a more generic <code>ImporterPatch</code>
|
||||
* that can do conditional importing into given locations.
|
||||
* <p>
|
||||
* JIRA: {@link http://www.alfresco.org/jira/browse/AR-342 AR-342}
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
|
@@ -43,6 +43,8 @@ public interface AppliedPatch extends PatchInfo
|
||||
|
||||
public void setAppliedOnDate(Date date);
|
||||
|
||||
public void setWasExecuted(boolean executed);
|
||||
|
||||
public void setSucceeded(boolean succeeded);
|
||||
|
||||
public void setReport(String report);
|
||||
|
@@ -22,6 +22,7 @@
|
||||
<property name="targetSchema" column="target_schema" type="integer" />
|
||||
<property name="appliedOnDate" column="applied_on_date" type="timestamp" />
|
||||
<property name="appliedToServer" column="applied_to_server" type="string" length="64" />
|
||||
<property name="wasExecuted" column="was_executed" type="boolean" />
|
||||
<property name="succeeded" column="succeeded" type="boolean" />
|
||||
<property name="report" column="report" type="string" length="1024" />
|
||||
</class>
|
||||
|
@@ -36,6 +36,7 @@ public class AppliedPatchImpl implements AppliedPatch
|
||||
private int appliedToSchema;
|
||||
private String appliedToServer;
|
||||
private Date appliedOnDate;
|
||||
private boolean wasExecuted;
|
||||
private boolean succeeded;
|
||||
private String report;
|
||||
|
||||
@@ -56,6 +57,7 @@ public class AppliedPatchImpl implements AppliedPatch
|
||||
.append(", appliedToSchema=").append(appliedToSchema)
|
||||
.append(", appliedToServer=").append(appliedToServer)
|
||||
.append(", appliedOnDate=").append(appliedOnDate)
|
||||
.append(", wasExecuted=").append(wasExecuted)
|
||||
.append(", succeeded=").append(succeeded)
|
||||
.append(", report=").append(report)
|
||||
.append("]");
|
||||
@@ -140,6 +142,15 @@ public class AppliedPatchImpl implements AppliedPatch
|
||||
this.appliedOnDate = appliedOnDate;
|
||||
}
|
||||
|
||||
public boolean getWasExecuted()
|
||||
{
|
||||
return wasExecuted;
|
||||
}
|
||||
public void setWasExecuted(boolean wasExecuted)
|
||||
{
|
||||
this.wasExecuted = wasExecuted;
|
||||
}
|
||||
|
||||
public boolean getSucceeded()
|
||||
{
|
||||
return succeeded;
|
||||
@@ -148,7 +159,7 @@ public class AppliedPatchImpl implements AppliedPatch
|
||||
{
|
||||
this.succeeded = succeeded;
|
||||
}
|
||||
|
||||
|
||||
public String getReport()
|
||||
{
|
||||
return report;
|
||||
|
Reference in New Issue
Block a user