Derek Hulley 8307ba5ba9 AMP dependency checking on the tool side.
This is work in progress and the repo is not currently double checking the runtime dependencies.

To declare a dependency, add the following to your module.properties:
   module.depends.ABC=ABCfromVersion - ABCtoVersion
Wildcard * can be used in place of fromVersion or toVersion, as well as just a single version.
The most common usage will be:
   module.depends.ABC=1.0-*
i.e. this module depends on ABC version 1.0 or later being present.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2007-05-02 20:28:20 +00:00

64 lines
2.7 KiB
Java

/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.alfresco.service.cmr.module;
import java.io.Serializable;
/**
* An ensapsulated module dependency. Since module dependencies may be range based and even
* unbounded, it is not possible to describe a dependency using a list of module version numbers.
* This class answers the
*
* @author Derek Hulley
*/
public interface ModuleDependency extends Serializable
{
/**
* Get the ID of the module that this dependency describes. The dependency
* may be upon specific versions or a range of versions. Nevertheless, the
* module given by the returned ID will be required in one version or another.
*
* @return Returns the ID of the module that this depends on
*/
public String getDependencyId();
/**
* @return Returns a string representation of the versions supported
*/
public String getVersionString();
/**
* Check if a module satisfies the dependency requirements.
*
* @param moduleDetails the module details of the dependency. This must be
* the details of the module with the correct
* {@link #getDependencyId() ID}. This may be <tt>null</tt>
* in which case <tt>false</tt> will always be returned.
* @return Returns true if the module satisfies the dependency
* requirements.
*/
public boolean isValidDependency(ModuleDetails moduleDetails);
}