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
|
// list all patches applied, including failures
|
||||||
for (PatchInfo patchInfo : appliedPatches)
|
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" +
|
logger.info("Applied patch: \n" +
|
||||||
" ID: " + patchInfo.getId() + "\n" +
|
" ID: " + patchInfo.getId() + "\n" +
|
||||||
|
@@ -41,6 +41,8 @@ public interface PatchInfo
|
|||||||
|
|
||||||
public Date getAppliedOnDate();
|
public Date getAppliedOnDate();
|
||||||
|
|
||||||
|
public boolean getWasExecuted();
|
||||||
|
|
||||||
public boolean getSucceeded();
|
public boolean getSucceeded();
|
||||||
|
|
||||||
public String getReport();
|
public String getReport();
|
||||||
|
@@ -209,6 +209,7 @@ public class PatchServiceImpl implements PatchService
|
|||||||
appliedPatch.setAppliedToServer(server); // the current version and label of the server
|
appliedPatch.setAppliedToServer(server); // the current version and label of the server
|
||||||
appliedPatch.setAppliedOnDate(new Date()); // the date applied
|
appliedPatch.setAppliedOnDate(new Date()); // the date applied
|
||||||
appliedPatch.setSucceeded(success); // whether or not the patch succeeded
|
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
|
appliedPatch.setReport(report); // additional, human-readable, status
|
||||||
|
|
||||||
// done
|
// done
|
||||||
|
@@ -42,6 +42,8 @@ import org.alfresco.service.namespace.QName;
|
|||||||
* <p>
|
* <p>
|
||||||
* This class should be replaced with a more generic <code>ImporterPatch</code>
|
* This class should be replaced with a more generic <code>ImporterPatch</code>
|
||||||
* that can do conditional importing into given locations.
|
* that can do conditional importing into given locations.
|
||||||
|
* <p>
|
||||||
|
* JIRA: {@link http://www.alfresco.org/jira/browse/AR-342 AR-342}
|
||||||
*
|
*
|
||||||
* @author Derek Hulley
|
* @author Derek Hulley
|
||||||
*/
|
*/
|
||||||
|
@@ -43,6 +43,8 @@ public interface AppliedPatch extends PatchInfo
|
|||||||
|
|
||||||
public void setAppliedOnDate(Date date);
|
public void setAppliedOnDate(Date date);
|
||||||
|
|
||||||
|
public void setWasExecuted(boolean executed);
|
||||||
|
|
||||||
public void setSucceeded(boolean succeeded);
|
public void setSucceeded(boolean succeeded);
|
||||||
|
|
||||||
public void setReport(String report);
|
public void setReport(String report);
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<property name="targetSchema" column="target_schema" type="integer" />
|
<property name="targetSchema" column="target_schema" type="integer" />
|
||||||
<property name="appliedOnDate" column="applied_on_date" type="timestamp" />
|
<property name="appliedOnDate" column="applied_on_date" type="timestamp" />
|
||||||
<property name="appliedToServer" column="applied_to_server" type="string" length="64" />
|
<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="succeeded" column="succeeded" type="boolean" />
|
||||||
<property name="report" column="report" type="string" length="1024" />
|
<property name="report" column="report" type="string" length="1024" />
|
||||||
</class>
|
</class>
|
||||||
|
@@ -36,6 +36,7 @@ public class AppliedPatchImpl implements AppliedPatch
|
|||||||
private int appliedToSchema;
|
private int appliedToSchema;
|
||||||
private String appliedToServer;
|
private String appliedToServer;
|
||||||
private Date appliedOnDate;
|
private Date appliedOnDate;
|
||||||
|
private boolean wasExecuted;
|
||||||
private boolean succeeded;
|
private boolean succeeded;
|
||||||
private String report;
|
private String report;
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ public class AppliedPatchImpl implements AppliedPatch
|
|||||||
.append(", appliedToSchema=").append(appliedToSchema)
|
.append(", appliedToSchema=").append(appliedToSchema)
|
||||||
.append(", appliedToServer=").append(appliedToServer)
|
.append(", appliedToServer=").append(appliedToServer)
|
||||||
.append(", appliedOnDate=").append(appliedOnDate)
|
.append(", appliedOnDate=").append(appliedOnDate)
|
||||||
|
.append(", wasExecuted=").append(wasExecuted)
|
||||||
.append(", succeeded=").append(succeeded)
|
.append(", succeeded=").append(succeeded)
|
||||||
.append(", report=").append(report)
|
.append(", report=").append(report)
|
||||||
.append("]");
|
.append("]");
|
||||||
@@ -140,6 +142,15 @@ public class AppliedPatchImpl implements AppliedPatch
|
|||||||
this.appliedOnDate = appliedOnDate;
|
this.appliedOnDate = appliedOnDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getWasExecuted()
|
||||||
|
{
|
||||||
|
return wasExecuted;
|
||||||
|
}
|
||||||
|
public void setWasExecuted(boolean wasExecuted)
|
||||||
|
{
|
||||||
|
this.wasExecuted = wasExecuted;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getSucceeded()
|
public boolean getSucceeded()
|
||||||
{
|
{
|
||||||
return succeeded;
|
return succeeded;
|
||||||
@@ -148,7 +159,7 @@ public class AppliedPatchImpl implements AppliedPatch
|
|||||||
{
|
{
|
||||||
this.succeeded = succeeded;
|
this.succeeded = succeeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReport()
|
public String getReport()
|
||||||
{
|
{
|
||||||
return report;
|
return report;
|
||||||
|
Reference in New Issue
Block a user