Retrieve member information 

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


Before starting

To run administrative commands, use the wsadmin client. See Starting the wsadmin client for details.


About this task

Some of the other administrative commands, such as ActivityService.fetchActivitiesByMember(java.util.Hashtable member) 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.


Procedure

  1. Start the Activities Jython script interpreter.

    1. Access the Activities configuration file:

        execfile("activitiesAdmin.py")

        If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Use any of the following commands to retrieve a list of activity members:

    • To 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}]

    • To 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}

    • To 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}

    • To retrieve information about a member using the person's email 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}

    • To 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}


What to do next

See Manage users for information about how to update the data associated with a member.


Parent topic

Manage activity membership

Related concepts
Manage users


Related tasks


Starting the wsadmin client


   

 

});

+

Search Tips   |   Advanced Search