org.ow2.jonas.versioning.internal
Class VersioningServiceImpl
java.lang.Object
org.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.versioning.internal.VersioningServiceImpl
- All Implemented Interfaces:
- Service, VersioningServiceImplMBean, VersioningService, VersioningServiceBase
public class VersioningServiceImpl
- extends AbsServiceImpl
- implements VersioningService, VersioningServiceImplMBean
Implements the versioning service.
- Author:
- Frederic Germaneau, S. Ali Tokmen
- See Also:
VersioningService
| Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
convertToList, doInit, getDomainName, getJonasServerName, getName, getSequenceNumber, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
VersioningServiceImpl
public VersioningServiceImpl()
setRegistryService
public void setRegistryService(RegistryService registryService)
- Parameters:
registryService - Registry service to set.
setJmxService
public void setJmxService(JmxService jmxService)
- Parameters:
jmxService - JMX service to set.
getObjectName
public static ObjectName getObjectName(String domainName)
- Parameters:
domainName - Server's domain name.
- Returns:
- JMX name of the versioning service management bean.
doStart
protected void doStart()
- Registers the management bean with JMX.
- Specified by:
doStart in class AbsServiceImpl
doStop
protected void doStop()
- Unregisters the management bean from JMX.
- Specified by:
doStop in class AbsServiceImpl
getPolicies
public String[] getPolicies()
- Specified by:
getPolicies in interface VersioningServiceBase
- Returns:
- Possible policies.
isVersioningEnabled
public boolean isVersioningEnabled()
- Specified by:
isVersioningEnabled in interface VersioningServiceBase
- Returns:
- Whether versioning is started and enabled.
setVersioningEnabled
public void setVersioningEnabled(boolean versioningEnabled)
- Specified by:
setVersioningEnabled in interface VersioningService
- Parameters:
versioningEnabled - Whether versioning is enabled.
getDefaultDeploymentPolicy
public String getDefaultDeploymentPolicy()
- Specified by:
getDefaultDeploymentPolicy in interface VersioningServiceBase
- Returns:
- Default policy, as set via JMX.
setDefaultDeploymentPolicy
public void setDefaultDeploymentPolicy(String defaultPolicy)
- Specified by:
setDefaultDeploymentPolicy in interface VersioningServiceBase
- Parameters:
defaultPolicy - Default deployment policy to set.
getFilteredContentTypes
public String getFilteredContentTypes()
- Specified by:
getFilteredContentTypes in interface VersioningServiceBase
- Returns:
- The filtered content types. Each type is separated with a comma.
setFilteredContentTypes
public void setFilteredContentTypes(String filteredContentTypes)
- Specified by:
setFilteredContentTypes in interface VersioningServiceBase
- Parameters:
filteredContentTypes - The filtered content types to set. Each type
must be separated with a comma, any spacing character between
each type is omitted.
getFilteredContentTypesArray
public String[] getFilteredContentTypesArray()
- Specified by:
getFilteredContentTypesArray in interface VersioningServiceBase
- Returns:
- The filtered content types, each type is another element of the
returned array. DO NOT MODIFY THE RETURNED ARRAY !!
getVersionNumber
public String getVersionNumber(File file)
- Specified by:
getVersionNumber in interface VersioningService
- Parameters:
file - JAR, WAR or EAR file to read the version number from.
- Returns:
- Version number of file, null if none found.
getVersionNumber
public String getVersionNumber(URL url)
- Specified by:
getVersionNumber in interface VersioningServiceBase
- Parameters:
url - JAR, WAR or EAR file to read the version number from.
- Returns:
- Version number of url, null if none found.
getVersionNumber
public String getVersionNumber(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Specified by:
getVersionNumber in interface VersioningService
- Parameters:
deployable - JAR, WAR or EAR object to read the version number from.
- Returns:
- Version number of deployable, null if none found.
getVersionID
public String getVersionID(File file)
- Specified by:
getVersionID in interface VersioningService
- Parameters:
file - JAR, WAR or EAR file to read the version ID from.
- Returns:
- Version ID of file, null if none found.
getVersionID
public String getVersionID(URL url)
- Specified by:
getVersionID in interface VersioningServiceBase
- Parameters:
url - JAR, WAR or EAR file to read the version ID from.
- Returns:
- Version ID of url, null if none found.
getVersionID
public String getVersionID(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Specified by:
getVersionID in interface VersioningService
- Parameters:
deployable - JAR, WAR or EAR object to read the version ID from.
- Returns:
- Version ID of deployable, null if none found.
getPrefix
public String getPrefix(File file)
- Specified by:
getPrefix in interface VersioningService
- Parameters:
file - JAR or EAR object to create a JNDI prefix from.
- Returns:
- JNDI prefix for file, null if none found.
getPrefix
public String getPrefix(URL url)
- Specified by:
getPrefix in interface VersioningServiceBase
- Parameters:
url - JAR or EAR object to create a JNDI prefix from.
- Returns:
- JNDI prefix for url, null if none found.
getPrefix
public String getPrefix(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Specified by:
getPrefix in interface VersioningService
- Parameters:
deployable - JAR or EAR object to create a JNDI prefix from.
- Returns:
- JNDI prefix for deployable, null if none found.
createJNDIBindingMBeans
public void createJNDIBindingMBeans(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Creates JNDI binding management beans for a given archive.
- Specified by:
createJNDIBindingMBeans in interface VersioningService
- Parameters:
deployable - JAR, WAR or EAR object to read the JNDI prefix from.
garbageCollectJNDIBindingMBeans
public void garbageCollectJNDIBindingMBeans()
- Removes JNDI binding management beans that are not in the JNDI directory
anymore.
- Specified by:
garbageCollectJNDIBindingMBeans in interface VersioningService
getBaseName
public String getBaseName(URL url)
- Specified by:
getBaseName in interface VersioningServiceBase
- Parameters:
url - JAR, WAR or EAR object to get the base name for. The base name
is used when creating the JNDI naming prefix.
- Returns:
- Base name for URL, null if none found.
Copyright © 2011 OW2 Consortium. All Rights Reserved.