use of com.runwaysdk.mvc.Endpoint in project geoprism-registry by terraframe.
the class RegistryController method updateOrganization.
/**
* Update organization.
*
* @param sessionId
* @param json
*/
@Endpoint(method = ServletMethod.POST, error = ErrorSerialization.JSON, url = "orgainization/update")
public ResponseIF updateOrganization(ClientRequestIF request, @RequestParamter(name = "json", required = true) String json) {
OrganizationDTO org = this.registryService.updateOrganization(request.getSessionId(), json);
CustomSerializer serializer = this.registryService.serializer(request.getSessionId());
return new RestBodyResponse(org.toJSON(serializer));
}
use of com.runwaysdk.mvc.Endpoint in project geoprism-registry by terraframe.
the class RegistryController method getGeoObjectOverTime.
@Endpoint(method = ServletMethod.GET, error = ErrorSerialization.JSON, url = RegistryUrls.GEO_OBJECT_TIME_GET)
public ResponseIF getGeoObjectOverTime(ClientRequestIF request, @RequestParamter(name = RegistryUrls.GEO_OBJECT_TIME_GET_PARAM_ID) String id, @RequestParamter(name = RegistryUrls.GEO_OBJECT_TIME_GET_PARAM_TYPE_CODE) String typeCode) throws JSONException {
GeoObjectOverTime geoObject = this.registryService.getGeoObjectOverTime(request.getSessionId(), id, typeCode);
CustomSerializer serializer = this.registryService.serializer(request.getSessionId());
return new RestBodyResponse(geoObject.toJSON(serializer));
}
use of com.runwaysdk.mvc.Endpoint in project geoprism-registry by terraframe.
the class RegistryController method updateHierarchyType.
/**
* Updates the given {@link HierarchyType} represented as JSON.
*
* @param sessionId
* @param gtJSON
* JSON of the {@link HierarchyType} to be updated.
*/
@Endpoint(method = ServletMethod.POST, error = ErrorSerialization.JSON, url = RegistryUrls.HIERARCHY_TYPE_UPDATE)
public ResponseIF updateHierarchyType(ClientRequestIF request, @RequestParamter(name = "htJSON", required = true) String htJSON) {
HierarchyType hierarchyType = ServiceFactory.getHierarchyService().updateHierarchyType(request.getSessionId(), htJSON);
CustomSerializer serializer = this.registryService.serializer(request.getSessionId());
return new RestBodyResponse(hierarchyType.toJSON(serializer));
}
use of com.runwaysdk.mvc.Endpoint in project geoprism-registry by terraframe.
the class RegistryController method createGeoObjectOverTime.
@Endpoint(method = ServletMethod.POST, error = ErrorSerialization.JSON, url = RegistryUrls.GEO_OBJECT_TIME_CREATE)
public ResponseIF createGeoObjectOverTime(ClientRequestIF request, @RequestParamter(name = RegistryUrls.GEO_OBJECT_TIME_CREATE_PARAM_GEOOBJECT) String jGeoObj) {
GeoObjectOverTime geoObject = this.registryService.createGeoObjectOverTime(request.getSessionId(), jGeoObj);
CustomSerializer serializer = this.registryService.serializer(request.getSessionId());
return new RestBodyResponse(geoObject.toJSON(serializer));
}
use of com.runwaysdk.mvc.Endpoint in project geoprism-registry by terraframe.
the class RegistryController method getGeoObjectBoundsAtDate.
@Endpoint(method = ServletMethod.GET, error = ErrorSerialization.JSON, url = "geoobject-time/get-bounds")
public ResponseIF getGeoObjectBoundsAtDate(ClientRequestIF request, @RequestParamter(name = RegistryUrls.GEO_OBJECT_GET_CODE_PARAM_CODE) String code, @RequestParamter(name = RegistryUrls.GEO_OBJECT_GET_PARAM_TYPE_CODE) String typeCode, @RequestParamter(name = "date") String date) throws JSONException, ParseException {
Date forDate = GeoRegistryUtil.parseDate(date, true);
GeoObject geoObject = this.registryService.getGeoObjectByCode(request.getSessionId(), code, typeCode, forDate);
String bounds = this.registryService.getGeoObjectBoundsAtDate(request.getSessionId(), geoObject, forDate);
return new RestBodyResponse(bounds);
}
Aggregations