|
|
@ -25,19 +25,20 @@ import org.wso2.carbon.device.mgt.input.adapter.extension.ContentValidator;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.InputAdapterExtensionService;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.InputAdapterExtensionService;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.InputAdapterExtensionServiceImpl;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.InputAdapterExtensionServiceImpl;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.transformer.DefaultContentTransformer;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.transformer.DefaultContentTransformer;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.transformer.MQTTContentTransformer;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.validator.DefaultContentValidator;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.validator.DefaultContentValidator;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.validator.HTTPContentValidator;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.validator.HTTPContentValidator;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.validator.MQTTContentValidator;
|
|
|
|
import org.wso2.carbon.device.mgt.input.adapter.extension.validator.MQTTContentValidator;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @scr.component name="input.adapter.extension.adapterService.component" immediate="true"
|
|
|
|
* @scr.component name="input.adapter.extension.adapterService.component" immediate="true"
|
|
|
|
* @scr.reference name="InputAdapterServiceComponent.service"
|
|
|
|
* @scr.reference name="InputAdapterServiceComponent.content.validator.service"
|
|
|
|
* interface="org.wso2.carbon.device.mgt.input.adapter.extension.ContentValidator"
|
|
|
|
* interface="org.wso2.carbon.device.mgt.input.adapter.extension.ContentValidator"
|
|
|
|
* cardinality="0..n"
|
|
|
|
* cardinality="0..n"
|
|
|
|
* policy="dynamic"
|
|
|
|
* policy="dynamic"
|
|
|
|
* bind="setContentValidator"
|
|
|
|
* bind="setContentValidator"
|
|
|
|
* unbind="unsetContentValidator"
|
|
|
|
* unbind="unsetContentValidator"
|
|
|
|
* * @scr.reference name="InputAdapterServiceComponent.service"
|
|
|
|
* @scr.reference name="InputAdapterServiceComponent.transformer.service"
|
|
|
|
* interface="org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer"
|
|
|
|
* interface="org.wso2.carbon.device.mgt.input.adapter.extension.ContentTransformer"
|
|
|
|
* cardinality="0..n"
|
|
|
|
* cardinality="0..n"
|
|
|
|
* policy="dynamic"
|
|
|
|
* policy="dynamic"
|
|
|
@ -56,6 +57,7 @@ public class InputAdapterServiceComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentTransformer(new DefaultContentTransformer());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentTransformer(new DefaultContentTransformer());
|
|
|
|
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentTransformer(new MQTTContentTransformer());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentValidator(new DefaultContentValidator());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentValidator(new DefaultContentValidator());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentValidator(new HTTPContentValidator());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentValidator(new HTTPContentValidator());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentValidator(new MQTTContentValidator());
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentValidator(new MQTTContentValidator());
|
|
|
@ -87,7 +89,7 @@ public class InputAdapterServiceComponent {
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentTransformer(contentTransformer);
|
|
|
|
InputAdapterServiceDataHolder.getInstance().addContentTransformer(contentTransformer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void unsetContentValidator(ContentTransformer contentTransformer) {
|
|
|
|
protected void unsetContentTransformer(ContentTransformer contentTransformer) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug("Un-setting ContentTransformer Service");
|
|
|
|
log.debug("Un-setting ContentTransformer Service");
|
|
|
|
}
|
|
|
|
}
|
|
|
|