Patch checkpoint.

Service descriptor changes including introduction of schema number.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2161 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-01-20 14:45:16 +00:00
parent b4220a973b
commit 02dc9ced9b
20 changed files with 407 additions and 359 deletions

View File

@@ -26,5 +26,5 @@ import java.util.List;
*/
public interface AdminService
{
public List<PatchInfo> getPatches();
// public List<PatchInfo> getPatches();
}

View File

@@ -1,123 +0,0 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.service.cmr.admin;
import java.io.Serializable;
import java.util.Date;
import org.alfresco.repo.domain.AppliedPatch;
/**
* Provides information regarding an individual patch.
*
* @since 1.2
* @author Derek Hulley
*/
public class PatchInfo implements Serializable
{
private static final long serialVersionUID = -8288217080763245510L;
private String id;
private String description;
private String applyToVersion;
private boolean succeeded;
private String appliedOnVersion;
private Date appliedOnDate;
private String report;
public PatchInfo(String id, String description, String applyAfterVersion)
{
this.id = id;
this.description = description;
this.applyToVersion = applyAfterVersion;
this.succeeded = false;
}
public PatchInfo(AppliedPatch appliedPatch)
{
this.id = appliedPatch.getId();
this.description = appliedPatch.getDescription();
this.applyToVersion = appliedPatch.getApplyToVersion();
this.succeeded = appliedPatch.getSucceeded();
this.appliedOnVersion = appliedPatch.getAppliedOnVersion();
this.appliedOnDate = appliedPatch.getAppliedOnDate();
this.report = appliedPatch.getReport();
}
/**
* @return Returns the unique patch identifier
*/
public String getId()
{
return id;
}
/**
* @return Returns a description of the patch
*/
public String getDescription()
{
return description;
}
/**
* @return Returns the version of the repository after which this patch must be applied
*/
public String getApplyToVersion()
{
return applyToVersion;
}
/**
* @return Returns true if the patch has been successfully applied
*/
public boolean getSucceeded()
{
return succeeded;
}
/**
* @return Returns the repository version that the patch was applied on, or null if the patch
* has not been applied
*/
public String getAppliedOnVersion()
{
return appliedOnVersion;
}
/**
* @return Returns the date that the patch was applied, or null if the patch has not been applied
*/
public Date getAppliedOnDate()
{
return appliedOnDate;
}
/**
* Get a report generated during the last attempted application. This will be an error report if
* the last attempt failed. If the application of the patch was successful
* ({@link #getAppliedOnDate() applied date} is not null) the it will be a message saying that it worked.
*
* @return Returns a report generated during application. This is only null if no attempt has been
* made to apply the patch.
*/
public String getReport()
{
return report;
}
}

View File

@@ -25,21 +25,21 @@ package org.alfresco.service.descriptor;
public interface Descriptor
{
/**
* Gets the major version number
* Gets the major version number, e.g. <u>1</u>.2.3
*
* @return major version number
*/
public String getVersionMajor();
/**
* Gets the minor version number
* Gets the minor version number, e.g. 1.<u>2</u>.3
*
* @return minor version number
*/
public String getVersionMinor();
/**
* Gets the version revision number
* Gets the version revision number, e.g. 1.2.<u>3</u>
*
* @return revision number
*/
@@ -66,6 +66,13 @@ public interface Descriptor
*/
public String getEdition();
/**
* Gets the schema number
*
* @return a positive integer
*/
public int getSchema();
/**
* Gets the list available descriptors
*

View File

@@ -30,7 +30,7 @@ public interface DescriptorService
*
* @return server descriptor
*/
public Descriptor getDescriptor();
public Descriptor getServerDescriptor();
/**
* Get descriptor for the repository