mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
removed unwanted todos
This commit is contained in:
parent
dd1474c040
commit
fbc255b7a8
@ -148,7 +148,6 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
|
|||||||
for (API apiInfo : apisWithTag) {
|
for (API apiInfo : apisWithTag) {
|
||||||
String id = apiInfo.getId().getProviderName().replace("@", "-AT-")
|
String id = apiInfo.getId().getProviderName().replace("@", "-AT-")
|
||||||
+ "-" + apiInfo.getId().getName() + "-" + apiInfo.getId().getVersion();
|
+ "-" + apiInfo.getId().getName() + "-" + apiInfo.getId().getVersion();
|
||||||
// todo: amalka will this break old apis?
|
|
||||||
boolean subscriptionExist = false;
|
boolean subscriptionExist = false;
|
||||||
if (subscribedAPIs.size() > 0) {
|
if (subscribedAPIs.size() > 0) {
|
||||||
for (SubscribedAPI subscribedAPI : subscribedAPIs) {
|
for (SubscribedAPI subscribedAPI : subscribedAPIs) {
|
||||||
|
|||||||
@ -69,7 +69,6 @@ import javax.ws.rs.core.Response;
|
|||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
public interface DeviceEventManagementService {
|
public interface DeviceEventManagementService {
|
||||||
|
|
||||||
//todo:amalka
|
|
||||||
// @POST
|
// @POST
|
||||||
// @Path("/{type}")
|
// @Path("/{type}")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
@ -181,7 +180,6 @@ public interface DeviceEventManagementService {
|
|||||||
"ios, and windows.", required = false)
|
"ios, and windows.", required = false)
|
||||||
@PathParam("type")String deviceType);
|
@PathParam("type")String deviceType);
|
||||||
|
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("/{type}/{deviceId}")
|
// @Path("/{type}/{deviceId}")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
@ -244,7 +242,6 @@ public interface DeviceEventManagementService {
|
|||||||
// @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
|
// @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
|
||||||
// @QueryParam("limit") int limit);
|
// @QueryParam("limit") int limit);
|
||||||
|
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("last-known/{type}/{deviceId}")
|
// @Path("last-known/{type}/{deviceId}")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
@ -301,7 +298,6 @@ public interface DeviceEventManagementService {
|
|||||||
// @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
|
// @ApiParam(name = "limit", value = "limit of the records that needs to be picked up", required = false)
|
||||||
// @QueryParam("limit") int limit);
|
// @QueryParam("limit") int limit);
|
||||||
|
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("filter/{type}/{parameter}")
|
// @Path("filter/{type}/{parameter}")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
|
|||||||
@ -99,7 +99,6 @@ public interface GeoLocationBasedService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve Analytics for the device type
|
* Retrieve Analytics for the device type
|
||||||
*/
|
*/
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("stats/{deviceType}/{deviceId}")
|
// @Path("stats/{deviceType}/{deviceId}")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
@ -724,7 +723,6 @@ public interface GeoLocationBasedService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve Geo alerts history
|
* Retrieve Geo alerts history
|
||||||
*/
|
*/
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("alerts/history/{deviceType}/{deviceId}")
|
// @Path("alerts/history/{deviceType}/{deviceId}")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
@ -794,7 +792,6 @@ public interface GeoLocationBasedService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve Geo alerts history for geo clusters
|
* Retrieve Geo alerts history for geo clusters
|
||||||
*/
|
*/
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("alerts/history")
|
// @Path("alerts/history")
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
|
|||||||
@ -277,7 +277,6 @@ public class DeviceAgentServiceImpl implements DeviceAgentService {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: amalka: commented data publishing
|
|
||||||
// if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
|
// if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
|
||||||
// , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
|
// , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
|
||||||
// , Constants.DEFAULT_STREAM_VERSION, metaData
|
// , Constants.DEFAULT_STREAM_VERSION, metaData
|
||||||
@ -378,7 +377,7 @@ public class DeviceAgentServiceImpl implements DeviceAgentService {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: amalka: commented data publishing
|
|
||||||
// if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
|
// if (DeviceMgtAPIUtils.getEventPublisherService().publishEvent(DeviceMgtAPIUtils.getStreamDefinition(type
|
||||||
// , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
|
// , PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
|
||||||
// , Constants.DEFAULT_STREAM_VERSION, metaData
|
// , Constants.DEFAULT_STREAM_VERSION, metaData
|
||||||
|
|||||||
@ -58,7 +58,7 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
|||||||
private static final String MQTT_CONTENT_VALIDATOR = "default";
|
private static final String MQTT_CONTENT_VALIDATOR = "default";
|
||||||
private static final String TIMESTAMP_FIELD_NAME = "_timestamp";
|
private static final String TIMESTAMP_FIELD_NAME = "_timestamp";
|
||||||
|
|
||||||
//todo:amalka
|
|
||||||
// private static AnalyticsDataAPI getAnalyticsDataAPI() {
|
// private static AnalyticsDataAPI getAnalyticsDataAPI() {
|
||||||
// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
|
// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
|
||||||
// AnalyticsDataAPI analyticsDataAPI =
|
// AnalyticsDataAPI analyticsDataAPI =
|
||||||
@ -173,7 +173,6 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
|||||||
/**
|
/**
|
||||||
* Deploy Event Stream, Receiver, Publisher and Store Configuration.
|
* Deploy Event Stream, Receiver, Publisher and Store Configuration.
|
||||||
*/
|
*/
|
||||||
//todo:amalka
|
|
||||||
// @POST
|
// @POST
|
||||||
// @Path("/{type}")
|
// @Path("/{type}")
|
||||||
// @Override
|
// @Override
|
||||||
@ -328,7 +327,6 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
|||||||
/**
|
/**
|
||||||
* Returns device specific data for the give period of time.
|
* Returns device specific data for the give period of time.
|
||||||
*/
|
*/
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("/{type}/{deviceId}")
|
// @Path("/{type}/{deviceId}")
|
||||||
// @Override
|
// @Override
|
||||||
@ -383,7 +381,7 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
|||||||
* Returns last known data points up to the limit if limit is specified. Otherwise returns last known data point.
|
* Returns last known data points up to the limit if limit is specified. Otherwise returns last known data point.
|
||||||
* Limit parameter needs to be zero or positive.
|
* Limit parameter needs to be zero or positive.
|
||||||
*/
|
*/
|
||||||
//todo:amalka
|
|
||||||
// @GET
|
// @GET
|
||||||
// @Path("/last-known/{type}/{deviceId}")
|
// @Path("/last-known/{type}/{deviceId}")
|
||||||
// @Override
|
// @Override
|
||||||
@ -595,7 +593,7 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo:amalka
|
|
||||||
// private void publishEventStore(String streamName, String version, EventAttributeList eventAttributes)
|
// private void publishEventStore(String streamName, String version, EventAttributeList eventAttributes)
|
||||||
// throws RemoteException, UserStoreException, JWTClientException,
|
// throws RemoteException, UserStoreException, JWTClientException,
|
||||||
// EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException {
|
// EventStreamPersistenceAdminServiceEventStreamPersistenceAdminServiceExceptionException {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ public class CredentialManagementResponseBuilder {
|
|||||||
username = CarbonContext.getThreadLocalCarbonContext().getUsername();
|
username = CarbonContext.getThreadLocalCarbonContext().getUsername();
|
||||||
userStoreManager.updateCredential(username, credentials.getNewPassword(),
|
userStoreManager.updateCredential(username, credentials.getNewPassword(),
|
||||||
credentials.getOldPassword());
|
credentials.getOldPassword());
|
||||||
//todo:amalka
|
|
||||||
// DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
|
// DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
|
||||||
// PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
|
// PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
|
||||||
return Response.status(Response.Status.OK).entity("UserImpl password by username: " +
|
return Response.status(Response.Status.OK).entity("UserImpl password by username: " +
|
||||||
@ -108,7 +108,7 @@ public class CredentialManagementResponseBuilder {
|
|||||||
new ErrorResponse.ErrorResponseBuilder().setMessage(errorMsg).build()).build();
|
new ErrorResponse.ErrorResponseBuilder().setMessage(errorMsg).build()).build();
|
||||||
}
|
}
|
||||||
userStoreManager.updateCredentialByAdmin(username, credentials.getNewPassword());
|
userStoreManager.updateCredentialByAdmin(username, credentials.getNewPassword());
|
||||||
//todo:amalka
|
|
||||||
// DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
|
// DeviceMgtAPIUtils.getIntegrationClientService().resetUserInfo(username,
|
||||||
// PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
|
// PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain());
|
||||||
return Response.status(Response.Status.OK).entity("UserImpl password by username: " +
|
return Response.status(Response.Status.OK).entity("UserImpl password by username: " +
|
||||||
|
|||||||
@ -616,7 +616,6 @@ public class DeviceMgtAPIUtils {
|
|||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: amalka: commented
|
|
||||||
// public static EventsPublisherService getEventPublisherService() {
|
// public static EventsPublisherService getEventPublisherService() {
|
||||||
// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
|
// PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
|
||||||
// EventsPublisherService eventsPublisherService =
|
// EventsPublisherService eventsPublisherService =
|
||||||
|
|||||||
@ -169,7 +169,7 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
|
|||||||
deviceInfo.getAvailableRAMMemory(),
|
deviceInfo.getAvailableRAMMemory(),
|
||||||
deviceInfo.isPluggedIn()
|
deviceInfo.isPluggedIn()
|
||||||
};
|
};
|
||||||
//todo:amalka
|
|
||||||
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
||||||
// DEVICE_INFO_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
// DEVICE_INFO_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
||||||
// );
|
// );
|
||||||
@ -185,7 +185,6 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
|
|||||||
DeviceManagementDAOFactory.rollbackTransaction();
|
DeviceManagementDAOFactory.rollbackTransaction();
|
||||||
throw new DeviceDetailsMgtException("Error occurred while updating the last update timestamp of the " +
|
throw new DeviceDetailsMgtException("Error occurred while updating the last update timestamp of the " +
|
||||||
"device", e);
|
"device", e);
|
||||||
//todo:amalka
|
|
||||||
// } catch (DataPublisherConfigurationException e) {
|
// } catch (DataPublisherConfigurationException e) {
|
||||||
// throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
|
// throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
|
||||||
} finally {
|
} finally {
|
||||||
@ -382,7 +381,6 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
|
|||||||
deviceLocation.getBearing(),
|
deviceLocation.getBearing(),
|
||||||
deviceLocation.getDistance()
|
deviceLocation.getDistance()
|
||||||
};
|
};
|
||||||
//todo:amalka
|
|
||||||
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
||||||
// LOCATION_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
// LOCATION_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
||||||
// );
|
// );
|
||||||
@ -397,7 +395,6 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
|
|||||||
} catch (DeviceManagementException e) {
|
} catch (DeviceManagementException e) {
|
||||||
DeviceManagementDAOFactory.rollbackTransaction();
|
DeviceManagementDAOFactory.rollbackTransaction();
|
||||||
throw new DeviceDetailsMgtException("Error occurred while getting the device information.", e);
|
throw new DeviceDetailsMgtException("Error occurred while getting the device information.", e);
|
||||||
//todo:amalka
|
|
||||||
// } catch (DataPublisherConfigurationException e) {
|
// } catch (DataPublisherConfigurationException e) {
|
||||||
// DeviceManagementDAOFactory.rollbackTransaction();
|
// DeviceManagementDAOFactory.rollbackTransaction();
|
||||||
// throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
|
// throw new DeviceDetailsMgtException("Error occurred while publishing the device location information.", e);
|
||||||
|
|||||||
@ -1966,7 +1966,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
operation.getStatus() != null ? operation.getStatus().toString() : null,
|
operation.getStatus() != null ? operation.getStatus().toString() : null,
|
||||||
operation.getOperationResponse()
|
operation.getOperationResponse()
|
||||||
};
|
};
|
||||||
//todo:amalka
|
|
||||||
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
||||||
// OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
// OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
||||||
// );
|
// );
|
||||||
@ -1976,7 +1976,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
String msg = "Error occurred while reading configs.";
|
String msg = "Error occurred while reading configs.";
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
throw new OperationManagementException(msg, e);
|
throw new OperationManagementException(msg, e);
|
||||||
//todo:amalka
|
|
||||||
} //catch (DataPublisherConfigurationException e) {
|
} //catch (DataPublisherConfigurationException e) {
|
||||||
// String msg = "Error occurred while publishing event.";
|
// String msg = "Error occurred while publishing event.";
|
||||||
// log.error(msg, e);
|
// log.error(msg, e);
|
||||||
@ -2010,7 +2010,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
operation.getStatus() != null ? operation.getStatus().toString() : null,
|
operation.getStatus() != null ? operation.getStatus().toString() : null,
|
||||||
operation.getOperationResponse()
|
operation.getOperationResponse()
|
||||||
};
|
};
|
||||||
//todo:amalka
|
|
||||||
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
// DeviceManagerUtil.getEventPublisherService().publishEvent(
|
||||||
// OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
// OPERATION_RESPONSE_EVENT_STREAM_DEFINITION, "1.0.0", metaData, new Object[0], payload
|
||||||
// );
|
// );
|
||||||
@ -2020,7 +2019,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
String msg = "Error occurred while reading configs.";
|
String msg = "Error occurred while reading configs.";
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
throw new OperationManagementException(msg, e);
|
throw new OperationManagementException(msg, e);
|
||||||
//todo:amalka
|
|
||||||
} //catch (DataPublisherConfigurationException e) {
|
} //catch (DataPublisherConfigurationException e) {
|
||||||
// String msg = "Error occurred while publishing event.";
|
// String msg = "Error occurred while publishing event.";
|
||||||
// log.error(msg, e);
|
// log.error(msg, e);
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
package org.wso2.carbon.webapp.authenticator.framework.authorizer;
|
package org.wso2.carbon.webapp.authenticator.framework.authorizer;
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by amalka on 6/26/21.
|
|
||||||
*/
|
|
||||||
public class MatchingResource {
|
public class MatchingResource {
|
||||||
private String urlPattern;
|
private String urlPattern;
|
||||||
private String permission;
|
private String permission;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user