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

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

public class account
extends java.lang.Object

account is a RESTFul service which performs Create, Read, Update and Delete operations on individual Accounts.

This class has a Path annotation with the value "/account/{dnStr}" which means the resource will be available at: http://<hostname>:<port>/<context root>/<servlet path>/account/{accountDN}


Constructor Summary
account()
           
 
Method Summary
 java.lang.String DELETE(java.lang.String strDN)
          Processes a DELETE 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 Account Details.
 java.lang.String POST(java.lang.String json, java.lang.String dnStr)
          Processes a POST (Account Update) request and returns the Request ID received from ISIM.
 java.lang.String PUT(java.lang.String json, java.lang.String profileName, java.lang.String ownershipType, java.lang.String serviceDNstr, java.lang.String dateString, java.lang.String dnStr)
          Processes a PUT request and returns the incoming request message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

account

public account()
Method Detail

GET

public java.lang.String GET(@Context
                            javax.servlet.http.HttpServletRequest requestObj,
                            @Context
                            javax.servlet.http.HttpServletResponse responseObj,
                            java.lang.String strDN)
                     throws java.rmi.RemoteException,
                            com.ibm.itim.apps.ApplicationException
Processes a GET request (READ) and returns a JSON object with the Account Details.

Parameters:
dn - the dn of the Account
 e.g. http://localhost/goonit/goonapi/account/erglobalid=8283467927700422958,ou=0,ou=accounts,erglobalid=00000000000000000000,ou=goonit,dc=com2
Returns:
{ "attributeValueMap": { "eruid": { "name": "eruid", "values": [ "user.3123" ] }, "pager": { "name": "pager", "values": [ "+1 114 340 3001" ] }, "street": { "name": "street", "values": [ "74086 Valley Street" ] }, "givenname": { "name": "givenname", "values": [ "Gloriane" ] }, "postaladdress": { "name": "postaladdress", "values": [ "Gloriane Dissinger$74086 Valley Street$Montgomery, NV 04741" ] }, "eraccountownershiptype": { "name": "eraccountownershiptype", "values": [ "Individual" ] }, "telephonenumber": { "name": "telephonenumber", "values": [ "+1 018 005 9891" ] }, "uid": { "name": "uid", "values": [ "user.3123" ] }, "eraccountstatus": { "name": "eraccountstatus", "values": [ "1" ] }, "erparent": { "name": "erparent", "values": [ "erglobalid=7139752969768418058,ou=0,ou=people,erglobalid=00000000000000000000,ou=goonit,dc=com2" ] }, "objectclass": { "name": "objectclass", "values": [ "top", "erLDAPUserAccount", "erManagedItem", "inetorgperson", "organizationalPerson", "person", "erAccountItem" ] }, "sn": { "name": "sn", "values": [ "Dissinger" ] }, "st": { "name": "st", "values": [ "NV" ] }, "mobile": { "name": "mobile", "values": [ "+1 630 414 2925" ] }, "erservice": { "name": "erservice", "values": [ "erglobalid=5913724919930104998,ou=services,erglobalid=00000000000000000000,ou=goonit,dc=com2" ] }, "cn": { "name": "cn", "values": [ "Gloriane Dissinger" ] }, "erglobalid": { "name": "erglobalid", "values": [ "5920620184718281475" ] }, "l": { "name": "l", "values": [ "Montgomery" ] }, "homephone": { "name": "homephone", "values": [ "+1 051 820 8306" ] }, "initials": { "name": "initials", "values": [ "GVD" ] }, "owner": { "name": "owner", "values": [ "erglobalid=7139752969768418058,ou=0,ou=people,erglobalid=00000000000000000000,ou=goonit,dc=com2" ] }, "mail": { "name": "mail", "values": [ "user.3123@maildomain.net" ] }, "employeenumber": { "name": "employeenumber", "values": [ "3123" ] }, "erldapcontainername": { "name": "erldapcontainername", "values": [ "ou=Users,ou=RB,ou=Applications,dc=Goonit,DC=ORG" ] }, "postalcode": { "name": "postalcode", "values": [ "04741" ] }, "eraccountcompliance": { "name": "eraccountcompliance", "values": [ "3" ] }, "description": { "name": "description", "values": [ "This is the description for Gloriane Dissinger." ] } } }
Throws:
java.rmi.RemoteException
com.ibm.itim.apps.ApplicationException

POST

public java.lang.String POST(java.lang.String json,
                             java.lang.String dnStr)
Processes a POST (Account Update) request and returns the Request ID received from ISIM.

Parameters:
accountDN - the Distinguished Name of the Account being updated
?date - QueryString the scheduled date to process the request (null = now)
messageBody - 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":[""]}
 }}
 

PUT

public java.lang.String PUT(java.lang.String json,
                            java.lang.String profileName,
                            java.lang.String ownershipType,
                            java.lang.String serviceDNstr,
                            java.lang.String dateString,
                            java.lang.String dnStr)
Processes a PUT request and returns the incoming request message. NB The ownerDN is specified in the URL
 e.g. http://localhost/goonit/goonapi/account/{ownerDN}?profileName={profileName},ownershipType={ownershipType},serviceDN={serviceDN},date={date or null for now}
 

Parameters:
ownerDN - the Distinguished Name of the Owner (Person entity)
profileName - QueryString containing the name of the account profile.
ownershipType - QueryString containing the OwnershipType e.g. "INDIVIDUAL"
date - QueryString representing the scheduled date for the account to be created "null" = now
messageBody - e.g:
 {"attributeValueMap":{
 
 "sn":{"name":"sn","values":["Goon"]},
 "givenname":{"name":"givenname","values":["Alice2"]},
 "homepostaladdress":{"name":"homepostaladdress","values":["Gunner Lane"]},
 "cn":{"name":"cn","values":["Alice2 Goon"]},
 "l":{"name":"l","values":["Edinburgh"]},
 "telephonenumber":{"name":"telephonenumber",
 "values":["555-6633"]},
 "initials":{"name":"initials","values":["AMG2"]},

 }}
 
Returns:
the request ID from ISIM

DELETE

public java.lang.String DELETE(java.lang.String strDN)
Processes a DELETE request.

Returns:
"success" response with a 200 status code