Difference between revisions of "GeoFence library"

From Gcube Wiki
Jump to: navigation, search
Line 5: Line 5:
  
  
*GeoFence()
+
====Invocation details====
<pre>
+
Parameters List :  
Parameters:
+
*"geofenceRestUrl" : [String value] The URL of Geofence instance;
    No input parameter, the default endpoint of Geofence instance is located in the config.properties file.
+
 
Returns:
+
====Invocation example====
    GeoFence object.
+
<source lang="java5">
</pre>
+
GeoFence gf = new GeoFence("<geofence_endpoint>");
 +
</source>
 +
 
  
 
*GeoFence(geofenceRestUrl)
 
*GeoFence(geofenceRestUrl)

Revision as of 16:32, 21 November 2017

This section aims to describe the Geofence library in order to help developers to manage users, groups, rules and instances in Geofence server. After configuring between Geofence server with GeoServer, for instance, it's possible create an user in Geofence and automatically it's possible to login (with this user) in GeoServer. Following is a list of methods, with all details to uderstand how invoke them.


Invocation details

Parameters List :

  • "geofenceRestUrl" : [String value] The URL of Geofence instance;

Invocation example

GeoFence gf = new GeoFence("<geofence_endpoint>");


  • GeoFence(geofenceRestUrl)
Parameters:
    geofenceRestUrl - GeoFence endpoint.
Returns:
    GeoFence object.

User section

  • getUserById(String id)
Parameters:
    id - It's the userId of user you are looking for.
Returns:
    GSUser object.
  • getUserByUsername(String userName)
Parameters:
    userName - It's the name of user you are looking for.
Returns:
    GSUser object.
  • createUser(User user)
Parameters:
     user - It's the User object you are creating.
Returns:
     HttpStatus object.
  • updateUser(User user)
Parameters:
    user - It's the User object you are updating.
Returns:
    HttpStatus object.
  • updateUserById(String id, String password, String email, boolean admin, boolean enabled)
Parameters:
    id - It's the id of user.
    password - It's the password of user.
    email - It's the email of user.
    admin - It's the boolean flag to define if user is administrator or not.
    enabled - It's the boolean flag to define if user is enabled or not.
Returns:
    HttpStatus object.

Group section