Home

 

Retrieving member information


Overview

Use administrative commands to retrieve a single activity member, to retrieve a list of activity members, or to update member information.

Use wsadmin

Some of the other administrative commands, such as...

..take the java.util.Hashtable variable as a parameter. You can use this procedure to retrieve member information and save it as a java.util.Hashtable variable.


Retrieve or update member information

  1. Start the Activities Jython script interpreter.

    1. Access the Activities configuration file:

      If prompted to specify which server to connect to, type 1.

      The information about which server to connect to is only used by wsadmin when you are running administrative commands to collect statistics.

  2. Return a list of members or groups whose names match the search criteria:

      ActivitiesMemberService.fetchMembers(java.lang.String name)

    This command returns a vector of hash tables. Each hashtable represents a member or group. For example, the following command:

      ActivitiesMemberService.fetchMembers("Jane Fairfax")

    ...returns the following vector [], which contains a single hash table {}:

      [{memberId=FBFG092191072384B4DB336C9B5BF9000043, displayName=Jane Fairfax, loginNames=[jfairfax@acme.com, Jane Fairfax], staticProfile=false, externalId=3901C921-E104-40BC-8AAA-C947146C8F68, email=jfairfax@acme.com, memberType=person}]

    This command uses a wildcard character to fetch all members or groups that begin with the word Acme:

      ActivitiesMemberService.fetchMembers("Acme*")

    It returns the following vector which contains two hash tables: one for Acme Sales and one for Acme Marketing.

      [{memberId=0BEG7F00000145EAB17F33E66924AA00009D, displayName=Acme Marketing, staticProfile=false, externalId=46b4a55a-47ae-4e29-ae8c-03c42d83f1cc, memberType=group} {memberId=7DG09218G7F00000145EAB17F33E669007, displayName=Acme Sales, staticProfile=false, externalId=12c4c66a-44aa-4e31-ae44-01c42c83f1ab, memberType=group}]

  3. Retrieve information about a member or group using a name as input:

      ActivitiesMemberService.fetchMemberByName(java.lang.String name)

    For example:

      ActivitiesMemberService.fetchMemberByName("Paul Smith")

    ...returns a hash table that contains information for the one member that matched the name passed in as a parameter:

      {memberId=ACF1093191092345B4DB336C9B5BF9000055, displayName=Paul Smith, loginNames=[paul_smith@acme.com, Paul Smith], staticProfile=false, externalId=12345678-ABCD-44BC-8BBB-C947146C8F12, email=paul_smith@acme.com, memberType=person}

  4. Retrieve information about a member using the person's login name as input:

      ActivitiesMemberService.fetchMemberByLogin(java.lang.String name)

    For example, if you pass in the value of the Paul Smith:

      ActivitiesMemberService.fetchMemberByLogin("Paul Smith")

    ...it returns the following hash table, which represents Paul Smith:

      {memberId=FBFG092191072384B4DB336C9B5BF9000043, displayName=Paul Smith, loginNames=[paul_smith@acme.com, Paul Smith], staticProfile=false, externalId=3901C921-E104-40BC-8AAA-C947146C8F68, email=paul_smith@acme.com, memberType=person}

  5. Retrieve information about a member using the person's e-mail address as input:

      ActivitiesMemberService.fetchMemberByEmail(java.lang.String mail)

    For example:

      ActivitiesMemberService.fetchMemberByEmail("paul_smith@acme.com")

    ...returns a hash table that contains information for the one member that matched the name passed in as a parameter:

      {memberId=ACF1093191092345B4DB336C9B5BF9000055, displayName=Paul Smith, loginNames=[paul_smith@acme.com, Paul Smith], staticProfile=false, externalId=12345678-ABCD-44BC-8BBB-C947146C8F12, email=paul_smith@acme.com, memberType=person}

  6. Retrieve information about a member or group using their unique member ID as input:

      ActivitiesMemberService.fetchMemberById(java.lang.String id)

    For example, if you pass in the value of the memberID returned for Paul Smith:

      ActivitiesMemberService.fetchMemberById("ACF1093191092345B4DB336C9B5BF9000055")

    ...it returns the following hash table, which represents a single member named Paul Smith:

      {memberId=ACF1093191092345B4DB336C9B5BF9000055, displayName=Paul Smith, loginNames=[paul_smith@acme.com, Paul Smith], staticProfile=false, externalId=12345678-ABCD-44BC-8BBB-C947146C8F12, email=paul_smith@acme.com, memberType=person}

  7. To update a member:

      ActivitiesMemberService.updateMember(java.util.Hashtable pb)

    This command updates all the attributes of the member with the contents of the given hash table except the memberId and externalId attributes.

 

Related tasks

Manage membership
Start wsadmin

+

Search Tips   |   Advanced Search