5353import it .eng .spago .error .EMFUserError ;
5454import it .eng .spago .security .IEngUserProfile ;
5555import it .eng .spagobi .commons .bo .Role ;
56- import it .eng .spagobi .commons .constants .CommunityFunctionalityConstants ;
5756import it .eng .spagobi .commons .dao .DAOFactory ;
5857import it .eng .spagobi .commons .utilities .SpagoBIUtilities ;
5958import it .eng .spagobi .mapcatalogue .bo .GeoLayer ;
6059import it .eng .spagobi .mapcatalogue .dao .ISbiGeoLayersDAO ;
6160import it .eng .spagobi .mapcatalogue .serializer .GeoLayerJSONDeserializer ;
6261import it .eng .spagobi .mapcatalogue .serializer .GeoLayerJSONSerializer ;
6362import it .eng .spagobi .services .rest .annotations .ManageAuthorization ;
64- import it .eng .spagobi .services .rest .annotations .UserConstraint ;
6563import it .eng .spagobi .utilities .assertion .Assert ;
6664import it .eng .spagobi .utilities .exceptions .SpagoBIRuntimeException ;
6765import it .eng .spagobi .utilities .rest .RestUtilities ;
@@ -77,7 +75,6 @@ public class LayerCRUD {
7775
7876 @ GET
7977 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
80- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
8178 public String loadLayers (@ Context HttpServletRequest req ) throws JSONException , UnsupportedEncodingException {
8279 ISbiGeoLayersDAO dao = DAOFactory .getSbiGeoLayerDao ();
8380 List <GeoLayer > layers = null ;
@@ -111,7 +108,6 @@ public String loadLayers(@Context HttpServletRequest req) throws JSONException,
111108 @ GET
112109 @ Path ("/getFilter" )
113110 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
114- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
115111 public String getFilter (@ Context HttpServletRequest req ) throws JSONException {
116112 String layerLabel ;
117113
@@ -151,7 +147,6 @@ public String getFilter(@Context HttpServletRequest req) throws JSONException {
151147 @ Path ("/getDownload" )
152148 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
153149 @ Deprecated
154- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
155150 public String getDownload (@ Context HttpServletRequest req ) throws JSONException {
156151 Object id = null ;
157152 Integer layerId = null ;
@@ -215,7 +210,6 @@ private String getData(int layerId, String typeWFS) {
215210 @ GET
216211 @ Path ("/getroles" )
217212 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
218- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
219213 public String getRoles (@ Context HttpServletRequest req ) throws JSONException , IOException {
220214 IEngUserProfile profile = (IEngUserProfile ) req .getSession ().getAttribute (IEngUserProfile .ENG_USER_PROFILE );
221215
@@ -251,7 +245,6 @@ public String getRoles(@Context HttpServletRequest req) throws JSONException, IO
251245 @ GET
252246 @ Path ("/GetLayer" )
253247 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
254- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
255248 public String getLayer (@ Context HttpServletRequest req )
256249 throws EMFUserError , UnsupportedEncodingException , JSONException {
257250 Object id = null ;
@@ -288,7 +281,6 @@ public String getLayer(@Context HttpServletRequest req)
288281 @ POST
289282 @ Path ("/postitem" )
290283 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
291- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
292284 public String postItem (@ Context HttpServletRequest req ) throws EMFUserError , JSONException {
293285
294286 JSONObject requestBodyJSON = null ;
@@ -330,7 +322,6 @@ public String postItem(@Context HttpServletRequest req) throws EMFUserError, JSO
330322 @ POST
331323 @ Path ("/deleteLayer" )
332324 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
333- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
334325 public String deleteLayer (@ Context HttpServletRequest req ) throws JSONException {
335326 Object label = null ;
336327 String layerLabel = null ;
@@ -359,7 +350,6 @@ public String deleteLayer(@Context HttpServletRequest req) throws JSONException
359350
360351 @ POST
361352 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
362- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
363353 public String saveLayer (@ Context HttpServletRequest req ) throws JSONException , EMFUserError , IOException {
364354 JSONObject requestBodyJSON = null ;
365355 Integer id ;
@@ -395,7 +385,6 @@ public String saveLayer(@Context HttpServletRequest req) throws JSONException, E
395385 @ Path ("/addData" )
396386 @ Consumes ("multipart/form-data" )
397387 @ Produces (MediaType .TEXT_PLAIN )
398- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
399388 public String saveLayer2 (MultiPartBody input , @ Context HttpServletRequest req ) {
400389 JSONObject requestBodyJSON = null ;
401390 Integer id ;
@@ -429,7 +418,6 @@ public String saveLayer2(MultiPartBody input, @Context HttpServletRequest req) {
429418 @ POST
430419 @ Path ("/deleterole" )
431420 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
432- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
433421 public String deleteRole (@ Context HttpServletRequest req ) throws JSONException {
434422 JSONObject requestBodyJSON = null ;
435423 Integer id_role = null ;
@@ -459,7 +447,6 @@ public String deleteRole(@Context HttpServletRequest req) throws JSONException {
459447 @ Path ("/updateData" )
460448 @ Consumes ("multipart/form-data" )
461449 @ Produces (MediaType .TEXT_PLAIN )
462- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
463450 public String modifyLayerwithFile (MultiPartBody input , @ Context HttpServletRequest req ) {
464451 JSONObject requestBodyJSON = null ;
465452
@@ -492,7 +479,6 @@ public String modifyLayerwithFile(MultiPartBody input, @Context HttpServletReque
492479
493480 @ PUT
494481 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
495- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
496482 public String modifyLayer (@ Context HttpServletRequest req )
497483 throws EMFUserError , JSONException , UnsupportedEncodingException {
498484 JSONObject requestBodyJSON = null ;
@@ -523,7 +509,6 @@ public String modifyLayer(@Context HttpServletRequest req)
523509 @ Path ("/getLayerProperties" )
524510 @ Consumes ("application/x-www-form-urlencoded" )
525511 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
526- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
527512 public String getLayerProperties (@ Context HttpServletRequest req , MultivaluedMap <String , String > form ) {
528513
529514 String s = "[]" ;
@@ -592,7 +577,6 @@ private String getFileName(MultivaluedMap<String, String> header) {
592577 @ POST
593578 @ Path ("/getLayerFromList" )
594579 @ Produces (MediaType .APPLICATION_JSON + "; charset=UTF-8" )
595- @ UserConstraint (functionalities = { CommunityFunctionalityConstants .GEO_LAYERS_MANAGEMENT })
596580 public String getLayerFromList (@ Context HttpServletRequest req )
597581 throws JSONException , EMFUserError , JsonGenerationException , JsonMappingException , IOException {
598582 ISbiGeoLayersDAO dao = DAOFactory .getSbiGeoLayerDao ();
0 commit comments