Package jadex.platform.service.library
Class BasicDependencyService
- java.lang.Object
-
- jadex.platform.service.library.BasicDependencyService
-
- All Implemented Interfaces:
IDependencyService
public class BasicDependencyService extends java.lang.Object implements IDependencyService
The basic dependency service for creating (local) rids.
-
-
Field Summary
Fields Modifier and Type Field Description protected IComponentIdentifiercidThe component identifier to use for creating local resource IDs.protected IInternalAccesscomponentThe service providing component.protected java.util.logging.LoggerloggerThe logger.
-
Constructor Summary
Constructors Constructor Description BasicDependencyService()Bean constructor for service creation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<IResourceIdentifier>getResourceIdentifier(java.net.URL url)Get the resource identifier for an url.IFuture<Tuple2<IResourceIdentifier,java.util.Map<IResourceIdentifier,java.util.List<IResourceIdentifier>>>>loadDependencies(IResourceIdentifier rid, boolean workspace)Load dependencies from a resource identifier.IFuture<java.lang.Void>startService()Start the service.
-
-
-
Field Detail
-
component
protected IInternalAccess component
The service providing component.
-
logger
protected java.util.logging.Logger logger
The logger.
-
cid
protected IComponentIdentifier cid
The component identifier to use for creating local resource IDs. The assumption is that URLs are only valid on the local platform.
-
-
Method Detail
-
startService
public IFuture<java.lang.Void> startService()
Start the service.
-
loadDependencies
public IFuture<Tuple2<IResourceIdentifier,java.util.Map<IResourceIdentifier,java.util.List<IResourceIdentifier>>>> loadDependencies(IResourceIdentifier rid, boolean workspace)
Load dependencies from a resource identifier.- Specified by:
loadDependenciesin interfaceIDependencyService- Parameters:
rid- A local or global resource identifier. If both local and global ids are present, local takes precedence, e.g. resolving to workspace urls before fetching an older snapshot from a repository.- Returns:
- A map containing the dependencies as mapping (parent RID -> list of children RIDs).
-
getResourceIdentifier
public IFuture<IResourceIdentifier> getResourceIdentifier(java.net.URL url)
Get the resource identifier for an url.- Specified by:
getResourceIdentifierin interfaceIDependencyService- Parameters:
url- The url.- Returns:
- The resource identifier.
-
-