Class MockBundle
java.lang.Object
org.apache.sling.commons.testing.osgi.MockBundle
- All Implemented Interfaces:
Comparable<org.osgi.framework.Bundle>,org.osgi.framework.Bundle
-
Field Summary
Fields inherited from interface org.osgi.framework.Bundle
ACTIVE, INSTALLED, RESOLVED, SIGNERS_ALL, SIGNERS_TRUSTED, START_ACTIVATION_POLICY, START_TRANSIENT, STARTING, STOP_TRANSIENT, STOPPING, UNINSTALLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<A> AintcompareTo(org.osgi.framework.Bundle o) findEntries(String path, String filePattern, boolean recurse) org.osgi.framework.BundleContextlonggetDataFile(String filename) getEntryPaths(String path) getHeaders(String locale) longorg.osgi.framework.ServiceReference[]getResource(String name) getResources(String name) org.osgi.framework.ServiceReference[]getSignerCertificates(int signersType) intgetState()org.osgi.framework.VersionbooleanhasPermission(Object permission) Class<?> voidstart()voidstart(int options) voidstop()voidstop(int options) voidvoidupdate()voidupdate(InputStream in)
-
Constructor Details
-
MockBundle
public MockBundle(long bundleId)
-
-
Method Details
-
getBundleId
public long getBundleId()- Specified by:
getBundleIdin interfaceorg.osgi.framework.Bundle
-
findEntries
- Specified by:
findEntriesin interfaceorg.osgi.framework.Bundle
-
getEntry
- Specified by:
getEntryin interfaceorg.osgi.framework.Bundle
-
getEntryPaths
- Specified by:
getEntryPathsin interfaceorg.osgi.framework.Bundle
-
getHeaders
- Specified by:
getHeadersin interfaceorg.osgi.framework.Bundle
-
getHeaders
- Specified by:
getHeadersin interfaceorg.osgi.framework.Bundle
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceorg.osgi.framework.Bundle
-
getLocation
- Specified by:
getLocationin interfaceorg.osgi.framework.Bundle
-
getRegisteredServices
public org.osgi.framework.ServiceReference[] getRegisteredServices()- Specified by:
getRegisteredServicesin interfaceorg.osgi.framework.Bundle
-
getResource
- Specified by:
getResourcein interfaceorg.osgi.framework.Bundle
-
getResources
- Specified by:
getResourcesin interfaceorg.osgi.framework.Bundle
-
getServicesInUse
public org.osgi.framework.ServiceReference[] getServicesInUse()- Specified by:
getServicesInUsein interfaceorg.osgi.framework.Bundle
-
getState
public int getState()- Specified by:
getStatein interfaceorg.osgi.framework.Bundle
-
getSymbolicName
- Specified by:
getSymbolicNamein interfaceorg.osgi.framework.Bundle
-
hasPermission
- Specified by:
hasPermissionin interfaceorg.osgi.framework.Bundle
-
loadClass
- Specified by:
loadClassin interfaceorg.osgi.framework.Bundle- Throws:
ClassNotFoundException
-
start
public void start()- Specified by:
startin interfaceorg.osgi.framework.Bundle
-
stop
public void stop()- Specified by:
stopin interfaceorg.osgi.framework.Bundle
-
uninstall
public void uninstall()- Specified by:
uninstallin interfaceorg.osgi.framework.Bundle
-
update
public void update()- Specified by:
updatein interfaceorg.osgi.framework.Bundle
-
update
- Specified by:
updatein interfaceorg.osgi.framework.Bundle
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()- Specified by:
getBundleContextin interfaceorg.osgi.framework.Bundle
-
start
public void start(int options) throws org.osgi.framework.BundleException - Specified by:
startin interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
stop
public void stop(int options) throws org.osgi.framework.BundleException - Specified by:
stopin interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
getSignerCertificates
- Specified by:
getSignerCertificatesin interfaceorg.osgi.framework.Bundle
-
getVersion
public org.osgi.framework.Version getVersion()- Specified by:
getVersionin interfaceorg.osgi.framework.Bundle
-
compareTo
public int compareTo(org.osgi.framework.Bundle o) - Specified by:
compareToin interfaceComparable<org.osgi.framework.Bundle>
-
adapt
- Specified by:
adaptin interfaceorg.osgi.framework.Bundle
-
getDataFile
- Specified by:
getDataFilein interfaceorg.osgi.framework.Bundle
-