mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge V1.2.0 BRANCH to HEAD
svn merge -r 2519:2565 svn://www.alfresco.org/alfresco/BRANCHES/V1.2.0/root HEAD/root git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2566 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,21 +27,20 @@ public class PatchException extends AlfrescoRuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 7022368915143884315L;
|
||||
|
||||
private String report;
|
||||
|
||||
/**
|
||||
* @param report the patch failure report
|
||||
* @param msgId the patch failure message ID
|
||||
*/
|
||||
public PatchException(String report)
|
||||
public PatchException(String msgId)
|
||||
{
|
||||
super(report);
|
||||
super(msgId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the patch failure report
|
||||
* @param msgId the patch failure message ID
|
||||
* @param args variable number of message arguments
|
||||
*/
|
||||
public String getReport()
|
||||
public PatchException(String msgId, Object ... args)
|
||||
{
|
||||
return report;
|
||||
super(msgId, args);
|
||||
}
|
||||
}
|
||||
|
@@ -61,6 +61,14 @@ public interface FileFolderService
|
||||
* Searches for all files and folders with the matching name pattern,
|
||||
* using wildcard characters <b>*</b> and <b>?</b>.
|
||||
*
|
||||
* @param contextNodeRef the context of the search. This node will never be returned
|
||||
* as part of the search results.
|
||||
* @param namePattern the name of the file or folder to search for, or a
|
||||
* {@link org.alfresco.util.SearchLanguageConversion#DEF_LUCENE wildcard} pattern
|
||||
* to search for.
|
||||
* @param includeSubFolders true to search the entire hierarchy below the search context
|
||||
* @return Returns a list of file or folder matches
|
||||
*
|
||||
* @see #search(NodeRef, String, boolean, boolean, boolean)
|
||||
*/
|
||||
public List<FileInfo> search(
|
||||
|
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
package org.alfresco.service.descriptor;
|
||||
|
||||
import org.alfresco.service.license.LicenseDescriptor;
|
||||
|
||||
|
||||
/**
|
||||
* Service for retrieving meta-data about Alfresco stack.
|
||||
@@ -40,4 +42,12 @@ public interface DescriptorService
|
||||
* @return repository descriptor
|
||||
*/
|
||||
public Descriptor getInstalledRepositoryDescriptor();
|
||||
|
||||
/**
|
||||
* Gets the License Service
|
||||
*
|
||||
* @return the license service
|
||||
*/
|
||||
public LicenseDescriptor getLicenseDescriptor();
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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.license;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* Provides access to License information.
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public interface LicenseDescriptor
|
||||
{
|
||||
|
||||
/**
|
||||
* Gets the date license was issued
|
||||
*
|
||||
* @return issue date
|
||||
*/
|
||||
public Date getIssued();
|
||||
|
||||
/**
|
||||
* Gets the date license is valid till
|
||||
*
|
||||
* @return valid until date (or null, if no time limit)
|
||||
*/
|
||||
public Date getValidUntil();
|
||||
|
||||
/**
|
||||
* Gets the length (in days) of license validity
|
||||
*
|
||||
* @return length in days of license validity (or null, if no time limit)
|
||||
*/
|
||||
public Integer getDays();
|
||||
|
||||
/**
|
||||
* Ges the number of remaining days left on license
|
||||
*
|
||||
* @return remaining days (or null, if no time limit)
|
||||
*/
|
||||
public Integer getRemainingDays();
|
||||
|
||||
/**
|
||||
* Gets the subject of the license
|
||||
*
|
||||
* @return the subject
|
||||
*/
|
||||
public String getSubject();
|
||||
|
||||
/**
|
||||
* Gets the holder of the license
|
||||
*
|
||||
* @return the holder
|
||||
*/
|
||||
public Principal getHolder();
|
||||
|
||||
/**
|
||||
* Gets the issuer of the license
|
||||
*
|
||||
* @return the issuer
|
||||
*/
|
||||
public Principal getIssuer();
|
||||
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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.license;
|
||||
|
||||
|
||||
/**
|
||||
* Base Exception of License Exceptions.
|
||||
*
|
||||
* @author David Caruana
|
||||
*/
|
||||
public class LicenseException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = -6463994144095426247L;
|
||||
|
||||
|
||||
public LicenseException(String msg)
|
||||
{
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public LicenseException(String msg, Throwable cause)
|
||||
{
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
}
|
43
source/java/org/alfresco/service/license/LicenseService.java
Normal file
43
source/java/org/alfresco/service/license/LicenseService.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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.license;
|
||||
|
||||
|
||||
/**
|
||||
* Contract for managing licenses
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public interface LicenseService
|
||||
{
|
||||
|
||||
/**
|
||||
* Verify License
|
||||
*
|
||||
* @throws LicenseException
|
||||
*/
|
||||
public void verifyLicense() throws LicenseException;
|
||||
|
||||
/**
|
||||
* Get description of installed license
|
||||
*
|
||||
* @return license descriptor (or null, if one is not installed)
|
||||
* @throws LicenseException
|
||||
*/
|
||||
public LicenseDescriptor getLicense() throws LicenseException;
|
||||
|
||||
}
|
Reference in New Issue
Block a user