com.goonit.imapi.jaxrs.servlet.isim
Class person

java.lang.Object
  extended by com.goonit.imapi.jaxrs.servlet.isim.person

public class person
extends java.lang.Object

person is a RESTFul service which performs Create, Read, Update and Delete operations on Person Entities.

This class has a Path annotation with the value "/person/{dnStr}" which means the resource will be available at: http://<hostname>:<port>/<context root>/<servlet path>/person/{dnStr} For GET, POST and DELETE Methods the dnStr represents the DN of the Person For PUT (Create Person) dnStr is the DN of the Organization Container within which the user should be created.


Constructor Summary
person()
           
 
Method Summary
 java.lang.String DELETE(java.lang.String strDN)
          Processes a DELETE (Person Delete) request and returns the ISIM process id of the request.
 java.lang.String GET(javax.servlet.http.HttpServletRequest requestObj, javax.servlet.http.HttpServletResponse responseObj, java.lang.String strDN)
          Processes a GET request (READ) and returns a JSON object with the Person Details.
 java.lang.String POST(java.lang.String json, java.lang.String dnStr)
          Processes a POST (Person Update) request and returns the ISIM process id of the request.
 java.lang.String PUT(java.lang.String json, java.lang.String profileName, java.lang.String dnstr)
          Processes a PUT (Person Create) request and returns the ISIM process id of the request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

person

public person()
Method Detail

GET

public java.lang.String GET(@Context
                            javax.servlet.http.HttpServletRequest requestObj,
                            @Context
                            javax.servlet.http.HttpServletResponse responseObj,
                            java.lang.String strDN)
Processes a GET request (READ) and returns a JSON object with the Person Details.

Returns:
e.g. http://192.168.1.94/goonit/goonapi/person/erglobalid=8157654929874629362,ou=0,ou=people,erglobalid=00000000000000000000,ou=goonit,dc=com2?request.preventCache=1361295822937 {"attributeValueMap":{"uid":{"name":"uid","values":["j.smith@goonit.co.uk"]},"ercustomdisplay":{"name":"ercustomdisplay","values":["smith"]},"erpersonstatus":{"name":"erpersonstatus","values":["0"]},"employeenumber":{"name":"employeenumber","values":["1931"]},"erparent":{"name":"erparent","values":["erglobalid=7359272358681445710,ou=orgchart,erglobalid=00000000000000000000,ou=goonit,dc=com2"]},"givenname":{"name":"givenname","values":["john"]},"objectclass":{"name":"objectclass","values":["top","inetOrgPerson","erManagedItem","organizationalPerson","person","erPersonItem"]},"sn":{"name":"sn","values":["smith"]},"cn":{"name":"cn","values":["john smith"]},"erglobalid":{"name":"erglobalid","values":["3795440510851651648"]},"initials":{"name":"initials","values":["js"]}}}

POST

public java.lang.String POST(java.lang.String json,
                             java.lang.String dnStr)
Processes a POST (Person Update) request and returns the ISIM process id of the request.

Parameters:
{dnStr} - the DN of the Person being updated.
?date - - Query String containing the scheduled date ("null" = submit now) e.g https://localhost/goonit/goonapi/person/erglobalid=6328172302732505759,ou=orgchart,erglobalid=00000000000000000000,ou=goonit,dc=com2?date=null
?date= - optional date to schedule the request
messageBody - - A JSON Object representing the attributes being changed, e.g. {"attributeValueMap":{ "givenname":{"name":"givenname","values":["Alice2"]}, "homepostaladdress":{"name":"homepostaladdress","values":["Gunner Lane"]}, "cn":{"name":"cn","values":["Alice Goon"]}, "erglobalid":{"name":"erglobalid","values":["5499064908328644351"]}, "l":{"name":"l","values":["Edinburgh"]}, "telephonenumber":{"name":"telephonenumber", "values":["555-1234"]}, "initials":{"name":"initials","values":["AMG"]}, "ersharedsecret":{"name":"ersharedsecret","values":["testing"]}, "roomnumber":{"name":"roomnumber","values":[""]} }}
Returns:
the Request ID returned by ISIM

PUT

public java.lang.String PUT(java.lang.String json,
                            java.lang.String profileName,
                            java.lang.String dnstr)
Processes a PUT (Person Create) request and returns the ISIM process id of the request.

Parameters:
{dnStr} - the DN of the Organisation container within which the Person Entity should be created.
?date - QueryString the scheduled date to process the request (null = now) e.g https://192.168.1.31/goonit/goonapi/person/erglobalid=6328172302732505759,ou=orgchart,erglobalid=00000000000000000000,ou=goonit,dc=com2?profilename=person
messageBody - - A JSON Object representing the AttributeValueMap of the Person Entity being created. e.g.: - {"attributeValueMap":{ "sn":{"name":"sn","values":["Goon"]}, "cn":{"name":"cn","values":["Daniel Goon"]}, "uid":{"name":"uid","values":["goond"]}, "givenname":{"name":"givenname", "values":["daniel"]}, "initials":{"name":"initials", "values":["DG"]}, "ersharedsecret":{"name":"ersharedsecret","values":[""]}, "roomnumber":{"name":"roomnumber","values":[""]}, "employeenumber":{"name":"employeenumber","values":[""]}, "title":{"name":"title","values":[""]}, "postaladdress":{"name":"postaladdress","values":[""]}, "orgstartdate":{"name":"orgstartdate","values":[""]}, "erlocale":{"name":"erlocale","values":[""]}, "l":{"name":"l","values":[""]}, "mail":{"name":"mail","values":[""]}, "telephonenumber":{"name":"telephonenumber", "values":[""]},"mobile":{"name":"mobile","values":[""]}, "pager":{"name":"pager","values":[""]}, "homephone":{"name":"homephone","values":[""]}, "homepostaladdress":{"name":"homepostaladdress","values":[""]}}}
Returns:
the Request ID from ITIM

DELETE

public java.lang.String DELETE(java.lang.String strDN)
Processes a DELETE (Person Delete) request and returns the ISIM process id of the request.

Parameters:
{dnStr} - the DN of the Organisation container within which the Person Entity should be created.
?date - QueryString the scheduled date to process the request (null = now) e.g https://192.168.1.31/goonit/goonapi/person/erglobalid=6328172302732505759,ou=orgchart,erglobalid=00000000000000000000,ou=goonit,dc=com2?profilename=person
Returns:
ISIM Request Id