public class GeoFence
extends java.lang.Object
Constructor and Description |
---|
GeoFence(java.lang.String geofenceRestUrl)
Constructor of GeoFence to build the REST API to access on geofence instance.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.http.HttpStatus |
assignToUserGroupByUserIdGroupId(java.lang.String userId,
java.lang.String groupId)
Returns an HttpStatus (status) when you try to assign the user by id to group by id.
|
org.springframework.http.HttpStatus |
assignToUserGroupByUserIdGroupName(java.lang.String userId,
java.lang.String groupName)
Returns an HttpStatus (status) when you try to assign the user by id to group by name.
|
org.springframework.http.HttpStatus |
assignToUserGroupByUserNameGroupId(java.lang.String userName,
java.lang.String groupId)
Returns an HttpStatus (status) when you try to assign the user by username to group by id.
|
org.springframework.http.HttpStatus |
assignToUserGroupByUserNameGroupName(java.lang.String userName,
java.lang.String groupName)
Returns an HttpStatus (status) when you try to assign the user by username to group by name.
|
org.springframework.http.HttpStatus |
createInstance(Instance instance)
Returns an HttpStatus (status) when you try to create the Instance object.
|
org.springframework.http.HttpStatus |
createRule(Rule rule)
Returns an HttpStatus (status) when you try to create the Rule object.
|
org.springframework.http.HttpStatus |
createUser(User user)
Returns an HttpStatus (status) when you try to create the User object.
|
org.springframework.http.HttpStatus |
createUserGroup(UserGroup userGroup)
Returns an HttpStatus (status) when you try to create the UserGroup object using the UserGroup object.
|
org.springframework.http.HttpStatus |
deleteInstanceById(java.lang.String instanceId)
Returns an HttpStatus (status) when you try to delete the Instance object using the instanceId.
|
org.springframework.http.HttpStatus |
deleteInstanceByName(java.lang.String instanceName,
boolean removeAllRules)
Returns an HttpStatus (status) when you try to delete the Instance object using the instanceName.
|
org.springframework.http.HttpStatus |
deleteRule(java.lang.String ruleId)
Returns an HttpStatus (status) when you try to delete the Rule object using the ruleId.
|
org.springframework.http.HttpStatus |
deleteUserById(java.lang.String id,
boolean removeAllRules)
Returns an HttpStatus (status) when you try to delete the User object using the id.
|
org.springframework.http.HttpStatus |
deleteUserByUsername(java.lang.String userName,
boolean removeAllRules)
Returns an HttpStatus (status) when you try to delete the User object using the userName.
|
org.springframework.http.HttpStatus |
deleteUserGroupById(java.lang.String groupId)
Returns an HttpStatus (status) when you try to delete the Group object using the groupId.
|
org.springframework.http.HttpStatus |
deleteUserGroupByName(java.lang.String groupName)
Returns an HttpStatus (status) when you try to delete the Group object using the groupName.
|
GSInstance |
getInstanceById(java.lang.String instanceId)
Returns an GSInstance object using a specific id of instance.
|
GSInstance |
getInstanceByName(java.lang.String instanceName)
Returns an GSInstance object using a specific name of instance.
|
GSInstanceList |
getInstanceList()
Returns a GSInstanceList object within a list of Instance object.
|
Rules |
getRulesById(java.lang.String id)
Returns a Rule object using a specific id of rule.
|
RuleList |
getRulesList()
Returns a RuleList object within a list of Rule object.
|
GSUser |
getUserById(java.lang.String id)
Returns a GeoServer User (GSUser) object using a specific id of user.
|
GSUser |
getUserByUsername(java.lang.String userName)
Returns a GeoServer User (GSUser) object using a specific name of user.
|
Group |
getUserGroupById(java.lang.String id)
Returns an Group object using a specific id of user.
|
Group |
getUserGroupByName(java.lang.String userName)
Returns an Group object using a specific userName of user.
|
UserGroupList |
getUserGroupList()
Returns a UserGroupList object within a list of UserGroups object.
|
UserList |
getUserList()
Returns a UserList object within a list of Users object.
|
org.springframework.http.HttpStatus |
removeUserGroupByUserIdGroupId(java.lang.String userId,
java.lang.String groupId)
Returns an HttpStatus (status) when you try to remove the user by id and the group by id.
|
org.springframework.http.HttpStatus |
removeUserGroupByUserIdGroupName(java.lang.String userId,
java.lang.String groupName)
Returns an HttpStatus (status) when you try to remove the user by id and the group by name.
|
org.springframework.http.HttpStatus |
removeUserGroupByUserNameGroupId(java.lang.String userName,
java.lang.String groupId)
Returns an HttpStatus (status) when you try to remove the user by username and the group by id.
|
org.springframework.http.HttpStatus |
removeUserGroupByUserNameGroupName(java.lang.String userName,
java.lang.String groupName)
Returns an HttpStatus (status) when you try to remove the user by username and the group by name.
|
org.springframework.http.HttpStatus |
updateInstance(Instance instance)
Returns an HttpStatus (status) when you try to update the Instance object using an instance.
|
org.springframework.http.HttpStatus |
updateInstanceById(java.lang.String id,
java.lang.String username,
java.lang.String password,
java.lang.String baseURL,
java.lang.String description)
Returns an HttpStatus (status) when you try to update the Instance object with a specific id.
|
org.springframework.http.HttpStatus |
updateInstanceByName(java.lang.String instanceName,
java.lang.String username,
java.lang.String password,
java.lang.String baseURL,
java.lang.String description)
Returns an HttpStatus (status) when you try to update the Instance object with a specific instanceName.
|
org.springframework.http.HttpStatus |
updateRule(Rule rule)
Returns an HttpStatus (status) when you try to update the Rule object.
|
org.springframework.http.HttpStatus |
updateRuleById(java.lang.String id,
java.lang.String priority,
java.lang.String service,
java.lang.String request,
java.lang.String workspace,
java.lang.String layer,
java.lang.String userId,
java.lang.String groupId,
java.lang.String instanceId)
Returns an HttpStatus (status) when you try to update the Rule object with a specific id.
|
org.springframework.http.HttpStatus |
updateUser(User user)
Returns an HttpStatus (status) when you try to update the User object.
|
org.springframework.http.HttpStatus |
updateUserById(java.lang.String id,
java.lang.String password,
java.lang.String email,
boolean admin,
boolean enabled)
Returns an HttpStatus (status) when you try to update the User object using the id.
|
org.springframework.http.HttpStatus |
updateUserByUsername(java.lang.String userName,
java.lang.String password,
java.lang.String email,
boolean admin,
boolean enabled)
Returns an HttpStatus (status) when you try to update the User object using the userName.
|
org.springframework.http.HttpStatus |
updateUserGroup(Group group)
Returns an HttpStatus (status) when you try to update the Group object using a group.
|
org.springframework.http.HttpStatus |
updateUserGroupById(java.lang.String id,
boolean enabled)
Returns an HttpStatus (status) when you try to update the Group object using a group.
|
org.springframework.http.HttpStatus |
updateUserGroupByName(java.lang.String name,
boolean enabled)
Returns an HttpStatus (status) when you try to update the Group object using a name.
|
public GeoFence(java.lang.String geofenceRestUrl)
geofenceRestUrl
- It's the REST API URL of your geofence instance.public GSUser getUserById(java.lang.String id)
id
- It's the userId of user you are looking for.public GSUser getUserByUsername(java.lang.String userName)
userName
- It's the name of user you are looking for.public org.springframework.http.HttpStatus createUser(User user)
user
- It's the User object you are creating.public org.springframework.http.HttpStatus updateUser(User user)
user
- It's the User object you are updating.public org.springframework.http.HttpStatus updateUserById(java.lang.String id, java.lang.String password, java.lang.String email, boolean admin, boolean enabled)
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.public org.springframework.http.HttpStatus updateUserByUsername(java.lang.String userName, java.lang.String password, java.lang.String email, boolean admin, boolean enabled)
userName
- It's the username 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.public org.springframework.http.HttpStatus deleteUserById(java.lang.String id, boolean removeAllRules)
id
- It's the id of user.removeAllRules
- It's a flag to remove all rules together to the user.public org.springframework.http.HttpStatus deleteUserByUsername(java.lang.String userName, boolean removeAllRules)
userName
- It's the username of user.removeAllRules
- It's a flag to remove all rules together to the user.public UserList getUserList()
public org.springframework.http.HttpStatus createUserGroup(UserGroup userGroup)
userGroup
- It's the UserGroup object you are creating.public Group getUserGroupById(java.lang.String id)
id
- It's the id of group you are looking for.public Group getUserGroupByName(java.lang.String userName)
userName
- It's the username of group you are looking for.public org.springframework.http.HttpStatus updateUserGroup(Group group)
group
- It's the Group object you are updating.public org.springframework.http.HttpStatus updateUserGroupById(java.lang.String id, boolean enabled)
id
- It's the id of group you are updating.enabled
- It's the enabled flag of group.public org.springframework.http.HttpStatus updateUserGroupByName(java.lang.String name, boolean enabled)
name
- It's the name of Group object you are updating.enabled
- It's the enabled flag of group.public org.springframework.http.HttpStatus deleteUserGroupById(java.lang.String groupId)
groupId
- It's the groupId of group.public org.springframework.http.HttpStatus deleteUserGroupByName(java.lang.String groupName)
groupName
- It's the id of group.public UserGroupList getUserGroupList()
public org.springframework.http.HttpStatus assignToUserGroupByUserIdGroupId(java.lang.String userId, java.lang.String groupId)
userId
- It's the id of user.groupId
- It's the id of group.public org.springframework.http.HttpStatus assignToUserGroupByUserIdGroupName(java.lang.String userId, java.lang.String groupName)
userId
- It's the id of user.groupName
- It's the name of group.public org.springframework.http.HttpStatus assignToUserGroupByUserNameGroupId(java.lang.String userName, java.lang.String groupId)
userName
- It's the username of user.groupId
- It's the id of group.public org.springframework.http.HttpStatus assignToUserGroupByUserNameGroupName(java.lang.String userName, java.lang.String groupName)
userName
- It's the username of user.groupName
- It's the name of group.public org.springframework.http.HttpStatus removeUserGroupByUserIdGroupId(java.lang.String userId, java.lang.String groupId)
userId
- It's the id of user.groupId
- It's the id of group.public org.springframework.http.HttpStatus removeUserGroupByUserIdGroupName(java.lang.String userId, java.lang.String groupName)
userId
- It's the id of user.groupName
- It's the name of group.public org.springframework.http.HttpStatus removeUserGroupByUserNameGroupId(java.lang.String userName, java.lang.String groupId)
userName
- It's the username of user.groupId
- It's the id of group.public org.springframework.http.HttpStatus removeUserGroupByUserNameGroupName(java.lang.String userName, java.lang.String groupName)
userName
- It's the username of user.groupName
- It's the name of group.public org.springframework.http.HttpStatus createInstance(Instance instance)
instance
- It's the Instance object.public GSInstance getInstanceById(java.lang.String instanceId)
instanceId
- It's the id of Instance object.public GSInstance getInstanceByName(java.lang.String instanceName)
instanceName
- It's the name of Instance object.public org.springframework.http.HttpStatus updateInstance(Instance instance)
instance
- It's the Instance object.public org.springframework.http.HttpStatus updateInstanceById(java.lang.String id, java.lang.String username, java.lang.String password, java.lang.String baseURL, java.lang.String description)
id
- It's the id of Instance object, not editable.username
- It's the username of Instance object.password
- It's the password of Instance object.baseURL
- It's the baseURL of Instance object.description
- It's the description of Instance object.public org.springframework.http.HttpStatus updateInstanceByName(java.lang.String instanceName, java.lang.String username, java.lang.String password, java.lang.String baseURL, java.lang.String description)
instanceName
- It's the name of Instance object, not editable.username
- It's the username of Instance object.password
- It's the password of Instance object.baseURL
- It's the baseURL of Instance object.description
- It's the description of Instance object.public org.springframework.http.HttpStatus deleteInstanceById(java.lang.String instanceId)
instanceId
- It's the id of Instance object.public org.springframework.http.HttpStatus deleteInstanceByName(java.lang.String instanceName, boolean removeAllRules)
instanceName
- It's the name of Instance object.removeAllRules
- It's a parameter to removes all rules together the Instance object.public GSInstanceList getInstanceList()
public org.springframework.http.HttpStatus createRule(Rule rule)
rule
- It's the Rule object.public Rules getRulesById(java.lang.String id)
id
- It's the id of rule.public org.springframework.http.HttpStatus updateRule(Rule rule)
rule
- It's the rule object.public org.springframework.http.HttpStatus updateRuleById(java.lang.String id, java.lang.String priority, java.lang.String service, java.lang.String request, java.lang.String workspace, java.lang.String layer, java.lang.String userId, java.lang.String groupId, java.lang.String instanceId)
id
- It's the id of Instance object, not editable.priority
- It's the priority of Instance object.service
- It's the service of Instance object.request
- It's the request of Instance object.workspace
- It's the workspace of Instance object.layer
- It's the layer of Instance object.userId
- It's the userId of Instance object (not necessary the username).groupId
- It's the groupId of Instance object (not necessary the name).instanceId
- It's the instanceId of Instance object (not necessary the name of instance).public org.springframework.http.HttpStatus deleteRule(java.lang.String ruleId)
ruleId
- It's the id of Rule object.public RuleList getRulesList()