servlet and pom modifications

pull/238/head
Isuri Mendis 1 year ago
parent 6fc77ea04a
commit eeb9ce0250

@ -51,6 +51,8 @@ public class APIUtil {
private static final String DEFAULT_ENTERPRISE_TAG= "androidforwork";
private static final String DEFAULT_ANALYTICS_MGT_TAG= "analytics_management";
private static final String DEFAULT_DEVICE_ORGANIZATION_MGT_TAG= "deviceOrganization_management";
public static final String PERMISSION_PROPERTY_NAME = "name";
public static String getAuthenticatedUser() {
@ -121,6 +123,7 @@ public class APIUtil {
allowedApisTags.add(DEFAULT_ANALYTICS_ARTIFACT_TAG);
allowedApisTags.add(DEFAULT_TRANSPORT_MGT_TAG);
allowedApisTags.add(DEFAULT_ANALYTICS_MGT_TAG);
allowedApisTags.add(DEFAULT_DEVICE_ORGANIZATION_MGT_TAG);
// In an environment only super tenant should be capable of calling this API tag
if (PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId() ==
MultitenantConstants.SUPER_TENANT_ID) {

@ -98,7 +98,7 @@
<tasks>
<copy todir="${basedir}/../../../repository/deployment/server/webapps" overwrite="true">
<fileset dir="${basedir}/target">
<include name="api-deviceOrganization-mgt-v1.0.war" />
<include name="api#deviceOrganization-mgt-v1.0.war" />
</fileset>
</copy>
</tasks>

@ -25,13 +25,32 @@
<jaxrs:server id="services" address="/">
<jaxrs:serviceBeans>
<ref bean="deviceOrganizationService"/>
<ref bean="deviceOrganizationMgtService"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
<ref bean="jsonProvider"/>
<!--<ref bean="errorHandler"/>-->
<ref bean="swaggerWriter"/>
</jaxrs:providers>
</jaxrs:server>
<bean id="deviceOrganizationService" class="io.entgra.device.mgt.core.device.mgt.extensions.device.organization.api.DeviceOrganizationMgtServiceImpl"/>
<bean id="swaggerWriter" class="io.swagger.jaxrs.listing.SwaggerSerializers" />
<bean id="swaggerResource" class="io.swagger.jaxrs.listing.ApiListingResource" />
<bean id="swaggerConfig" class="io.swagger.jaxrs.config.BeanConfig">
<property name="resourcePackage" value="io.entgra.device.mgt.core.device.mgt.extensions.device.organization.api"/>
<property name="version" value="1.0"/>
<property name="host" value="localhost:9443"/>
<property name="schemes" value="https" />
<property name="basePath" value="/api/device-mgt/v1.0"/>
<property name="title" value="Device Management Admin Service API Definitions"/>
<property name="contact" value="dev@entgra.io"/>
<property name="license" value="Apache 2.0"/>
<property name="licenseUrl" value="http://www.apache.org/licenses/LICENSE-2.0.html"/>
<property name="scan" value="true"/>
</bean>
<bean id="deviceOrganizationMgtService" class="io.entgra.device.mgt.core.device.mgt.extensions.device.organization.api.DeviceOrganizationMgtServiceImpl"/>
</beans>

Loading…
Cancel
Save