1.0.0

org.eclipse.soda.dk.metadata.servlet
Class DeviceMetadataServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.eclipse.soda.dk.device.servlet.DeviceServlet
              extended by org.eclipse.soda.dk.metadata.servlet.DeviceMetadataServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, DeviceServletService

public class DeviceMetadataServlet
extends DeviceServlet
implements DeviceServletService, javax.servlet.Servlet

Version:
1.0.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.eclipse.soda.dk.device.servlet.service.DeviceServletService
SERVICE_NAME
 
Constructor Summary
DeviceMetadataServlet()
          Constructs an instance of this class.
 
Method Summary
 boolean changeConfiguration(java.util.Hashtable table, java.util.Hashtable oldTable)
          Change configuration with the specified table parameter and return the boolean result.
 DeviceServletContext createContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create context with the specified request and response parameters and return the DeviceServletContext result.
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Do post with the specified request and response parameters.
 int getColorValue()
          Gets the color value (int) value.
 org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
          Gets the configuration admin value.
 java.util.Hashtable getConfigurationAttributes(org.osgi.service.metatype.AttributeDefinition[] attributeDefinitions)
          Get configuration attributes with the specified attribute definitions parameter and return the Hashtable result.
 org.osgi.service.metatype.MetaTypeService getMetaTypeService()
          Gets the meta type service value.
 org.osgi.service.metatype.AttributeDefinition processConfigurationAttributes(DeviceServletContext context, java.util.Dictionary properties, org.osgi.service.metatype.AttributeDefinition[] attributeDefinitions, boolean required)
          Process configuration attributes with the specified context, properties, attribute definitions and required parameters and return the AttributeDefinition result.
 void processFactory(DeviceMetadataServletContext context, org.osgi.service.metatype.MetaTypeProvider metaTypeProvider, java.lang.String factoryPid)
          Process factory with the specified context, meta type provider and factory pid parameters.
 void processMetaData(DeviceMetadataServletContext context)
          Process meta data with the specified writer and language parameters.
 org.osgi.service.metatype.AttributeDefinition processObjectClass(DeviceMetadataServletContext context, org.osgi.service.metatype.ObjectClassDefinition objectClassDefinition, java.util.Dictionary properties)
          Process object class with the specified context, object class definition and properties parameters and return the AttributeDefinition result.
 void processRequest(DeviceServletContext context)
          Process request with the specified context parameter.
 void resetColorValue()
          Reset color value.
 void setColorValue(int colorValue)
          Sets the color value value.
 void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
          Sets the configuration admin value.
 void setMetaTypeService(org.osgi.service.metatype.MetaTypeService metaTypeService)
          Sets the meta type service value.
 void updateColorValue()
          Update color value.
 java.util.Hashtable validateConfiguration(DeviceServletContext context, java.util.Hashtable table)
          Validate configuration with the specified writer and table parameters and return the Hashtable result.
 
Methods inherited from class org.eclipse.soda.dk.device.servlet.DeviceServlet
buildMenu, doGet, escape, escape, findAttribute, getBundleContext, getBundles, getResouceAliasDefault, getResoucePathDefault, getResourceAlias, getResourcePath, getServer, getServiceReferences, getServletAlias, getServletAliasDefault, processFileRequest, processOverview, setBundleContext, setResourceAlias, setResourcePath, setServer, setServletAlias, setup
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.device.servlet.service.DeviceServletService
getServletAlias
 
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
 

Constructor Detail

DeviceMetadataServlet

public DeviceMetadataServlet()
Constructs an instance of this class.

Method Detail

changeConfiguration

public boolean changeConfiguration(java.util.Hashtable table,
                                   java.util.Hashtable oldTable)
Change configuration with the specified table parameter and return the boolean result.

Parameters:
table - The table (Hashtable) parameter.
oldTable - The old table (Hashtable) parameter.
Returns:
Results of the change configuration (boolean) value.
See Also:
validateConfiguration(DeviceServletContext,Hashtable)

createContext

public DeviceServletContext createContext(javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
Create context with the specified request and response parameters and return the DeviceServletContext result.

Overrides:
createContext in class DeviceServlet
Parameters:
request - The request (HttpServletRequest) parameter.
response - The response (HttpServletResponse) parameter.
Returns:
Results of the create context (DeviceServletContext) value.
See Also:
DeviceServlet.getBundleContext(), DeviceServlet.setBundleContext(BundleContext)

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException
Do post with the specified request and response parameters.

Overrides:
doPost in class DeviceServlet
Parameters:
request - The request (HttpServletRequest) parameter.
response - The response (HttpServletResponse) parameter.
Throws:
javax.servlet.ServletException - Servlet Exception.
java.io.IOException

getColorValue

public int getColorValue()
Gets the color value (int) value.

Returns:
The color value (int) value.
See Also:
resetColorValue(), setColorValue(int), updateColorValue()

getConfigurationAdmin

public org.osgi.service.cm.ConfigurationAdmin getConfigurationAdmin()
Gets the configuration admin value.

Returns:
The configuration admin (ConfigurationAdmin) value.
See Also:
setConfigurationAdmin(ConfigurationAdmin)

getConfigurationAttributes

public java.util.Hashtable getConfigurationAttributes(org.osgi.service.metatype.AttributeDefinition[] attributeDefinitions)
Get configuration attributes with the specified attribute definitions parameter and return the Hashtable result.

Parameters:
attributeDefinitions - The attribute definitions (AttributeDefinition[]) parameter.
Returns:
Results of the get configuration attributes (Hashtable) value.
See Also:
processConfigurationAttributes(DeviceServletContext,Dictionary,AttributeDefinition[],boolean)

getMetaTypeService

public org.osgi.service.metatype.MetaTypeService getMetaTypeService()
Gets the meta type service value.

Returns:
The meta type service (MetaTypeService) value.
See Also:
setMetaTypeService(MetaTypeService)

processConfigurationAttributes

public org.osgi.service.metatype.AttributeDefinition processConfigurationAttributes(DeviceServletContext context,
                                                                                    java.util.Dictionary properties,
                                                                                    org.osgi.service.metatype.AttributeDefinition[] attributeDefinitions,
                                                                                    boolean required)
Process configuration attributes with the specified context, properties, attribute definitions and required parameters and return the AttributeDefinition result.

Parameters:
context - The context (DeviceServletContext) parameter.
properties - The properties (Dictionary) parameter.
attributeDefinitions - The attribute definitions (AttributeDefinition[]) parameter.
required - The required (boolean) parameter.
Returns:
Results of the process configuration attributes (AttributeDefinition) value.
See Also:
getConfigurationAttributes(AttributeDefinition[])

processFactory

public void processFactory(DeviceMetadataServletContext context,
                           org.osgi.service.metatype.MetaTypeProvider metaTypeProvider,
                           java.lang.String factoryPid)
Process factory with the specified context, meta type provider and factory pid parameters.

Parameters:
context - The context (DeviceConfigurationServletContext) parameter.
metaTypeProvider - The meta type provider (MetaTypeProvider) parameter.
factoryPid - The factory pid (String) parameter.

processMetaData

public void processMetaData(DeviceMetadataServletContext context)
Process meta data with the specified writer and language parameters.

Parameters:
writer - The writer (PrintWriter) parameter.
language - The language (String) parameter.
context - The context (DeviceServletContext) parameter.

processObjectClass

public org.osgi.service.metatype.AttributeDefinition processObjectClass(DeviceMetadataServletContext context,
                                                                        org.osgi.service.metatype.ObjectClassDefinition objectClassDefinition,
                                                                        java.util.Dictionary properties)
Process object class with the specified context, object class definition and properties parameters and return the AttributeDefinition result.

Parameters:
context - The context (DeviceConfigurationServletContext) parameter.
objectClassDefinition - The object class definition (ObjectClassDefinition) parameter.
properties - The properties (Dictionary) parameter.
Returns:
Results of the process object class (AttributeDefinition) value.

processRequest

public void processRequest(DeviceServletContext context)
Process request with the specified context parameter.

Overrides:
processRequest in class DeviceServlet
Parameters:
context - The context (DeviceServletContext) parameter.
See Also:
DeviceServlet.processFileRequest(DeviceServletContext)

resetColorValue

public void resetColorValue()
Reset color value.

See Also:
getColorValue(), setColorValue(int), updateColorValue()

setColorValue

public void setColorValue(int colorValue)
Sets the color value value.

Parameters:
colorValue - The color value (int) parameter.
See Also:
getColorValue(), resetColorValue(), updateColorValue()

setConfigurationAdmin

public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
Sets the configuration admin value.

Parameters:
configurationAdmin - The configuration admin (ConfigurationAdmin) parameter.
See Also:
getConfigurationAdmin()

setMetaTypeService

public void setMetaTypeService(org.osgi.service.metatype.MetaTypeService metaTypeService)
Sets the meta type service value.

Parameters:
metaTypeService - The meta type service (MetaTypeService) parameter.
See Also:
getMetaTypeService()

updateColorValue

public void updateColorValue()
Update color value.

See Also:
getColorValue(), resetColorValue(), setColorValue(int)

validateConfiguration

public java.util.Hashtable validateConfiguration(DeviceServletContext context,
                                                 java.util.Hashtable table)
Validate configuration with the specified writer and table parameters and return the Hashtable result.

Parameters:
writer - The writer (PrintWriter) parameter.
table - The table (Hashtable) parameter.
context - The context (DeviceServletContext) parameter.
Returns:
Results of the validate configuration (Hashtable) value.
See Also:
changeConfiguration(Hashtable,Hashtable)

1.0.0

Copyright (c) 1999, 2007 IBM