Class SynapseLibrary
- java.lang.Object
-
- org.apache.synapse.libraries.model.SynapseLibrary
-
- All Implemented Interfaces:
Library,SynapseArtifact
public class SynapseLibrary extends Object implements Library
-
-
Field Summary
Fields Modifier and Type Field Description List<LibraryArtifact.Dependency>dependenciesprotected QNamequalifiedNamethis is the logical name of the Synapse library which constitutes of [package + library name]
-
Constructor Summary
Constructors Constructor Description SynapseLibrary(String name, String packageName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArtifactDescription(LibraryArtifact artifact)voidaddComponent(String qualifiedName, Object libComponent)voidaddDependency(LibraryArtifact.Dependency artifactDep)voidclear()ObjectgetArtifact(String artifacName)return synapse lib artifact deployed by this library with the given Local nameStringgetArtifactDescription(String artifactName)gives the Artifact description for the given artifact name (if available)Map<String,Object>getArtifacts()StringgetDescription()Retrieves the description of the artifactStringgetFileName()Map<String,String>getLibArtifactDetails()ClassLoadergetLibClassLoader()booleangetLibStatus()Gets the library status which can determine whether the library should be available during run timeList<String>getLocalEntries()Map<String,Object>getLocalEntryArtifacts()Returns the list of local entry definitionsStringgetName()StringgetPackage()returns the package that this Library belongs toQNamegetQName()get Fully qualified Name of the LibrarybooleanloadLibrary()load all library artifacts on this library this should be called when a import is taking placevoidloadLibrary(String artifactDependencyName)load all library artifacts on this library for the given QName this should be called when a import is taking placevoidremoveComponent(String qualifiedName)booleanresolveDependencies(List<LibraryArtifact> unresolvedPrincipalArtifactList)voidsetDescription(String description)Set the description of the artifactvoidsetFileName(String fileName)voidsetLibClassLoader(ClassLoader libClassLoader)voidsetLibStatus(boolean status)StringtoString()booleanunLoadLibrary()unload all library artifacts on this library for the given QName this should be called when a import is no longer valid/ non-existent
-
-
-
Field Detail
-
qualifiedName
protected QName qualifiedName
this is the logical name of the Synapse library which constitutes of [package + library name]
-
dependencies
public List<LibraryArtifact.Dependency> dependencies
-
-
Method Detail
-
getQName
public QName getQName()
Description copied from interface:Libraryget Fully qualified Name of the Library
-
getName
public String getName()
-
addDependency
public void addDependency(LibraryArtifact.Dependency artifactDep)
-
addArtifactDescription
public void addArtifactDescription(LibraryArtifact artifact)
-
getArtifactDescription
public String getArtifactDescription(String artifactName)
Description copied from interface:Librarygives the Artifact description for the given artifact name (if available)- Specified by:
getArtifactDescriptionin interfaceLibrary- Returns:
-
getLibArtifactDetails
public Map<String,String> getLibArtifactDetails()
- Specified by:
getLibArtifactDetailsin interfaceLibrary
-
removeComponent
public void removeComponent(String qualifiedName)
-
resolveDependencies
public boolean resolveDependencies(List<LibraryArtifact> unresolvedPrincipalArtifactList)
-
loadLibrary
public boolean loadLibrary()
load all library artifacts on this library this should be called when a import is taking place- Specified by:
loadLibraryin interfaceLibrary- Returns:
- success
-
loadLibrary
public void loadLibrary(String artifactDependencyName)
load all library artifacts on this library for the given QName this should be called when a import is taking place
-
unLoadLibrary
public boolean unLoadLibrary()
unload all library artifacts on this library for the given QName this should be called when a import is no longer valid/ non-existent- Specified by:
unLoadLibraryin interfaceLibrary- Returns:
- success
-
getLibClassLoader
public ClassLoader getLibClassLoader()
- Specified by:
getLibClassLoaderin interfaceLibrary- Returns:
- the Class loader that can be used to load classes/resources under this library
-
getFileName
public String getFileName()
- Specified by:
getFileNamein interfaceLibrary
-
setFileName
public void setFileName(String fileName)
- Specified by:
setFileNamein interfaceLibrary
-
clear
public void clear()
-
getArtifact
public Object getArtifact(String artifacName)
return synapse lib artifact deployed by this library with the given Local name- Specified by:
getArtifactin interfaceLibrary- Parameters:
artifacName-- Returns:
-
getArtifacts
public Map<String,Object> getArtifacts()
- Specified by:
getArtifactsin interfaceLibrary
-
getPackage
public String getPackage()
Description copied from interface:Libraryreturns the package that this Library belongs to- Specified by:
getPackagein interfaceLibrary- Returns:
- package name
-
setDescription
public void setDescription(String description)
Description copied from interface:SynapseArtifactSet the description of the artifact- Specified by:
setDescriptionin interfaceSynapseArtifact- Parameters:
description- tobe set to the artifact
-
getDescription
public String getDescription()
Description copied from interface:SynapseArtifactRetrieves the description of the artifact- Specified by:
getDescriptionin interfaceSynapseArtifact- Returns:
- description of the artifact
-
setLibClassLoader
public void setLibClassLoader(ClassLoader libClassLoader)
-
getLocalEntryArtifacts
public Map<String,Object> getLocalEntryArtifacts()
Description copied from interface:LibraryReturns the list of local entry definitions- Specified by:
getLocalEntryArtifactsin interfaceLibrary- Returns:
-
getLocalEntries
public List<String> getLocalEntries()
- Specified by:
getLocalEntriesin interfaceLibrary
-
getLibStatus
public boolean getLibStatus()
Description copied from interface:LibraryGets the library status which can determine whether the library should be available during run time- Specified by:
getLibStatusin interfaceLibrary- Returns:
-
setLibStatus
public void setLibStatus(boolean status)
- Specified by:
setLibStatusin interfaceLibrary
-
-