30日間の無料評価版をお試しいただけます。

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleADDUSER

The following code will call the Yellowfin web service to create a user:

Code Block
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");
person.setPassword("test");
person.setFirstName("Simple");
person.setLastName("Simon");
person.setInitial("S");
person.setSalutationCode("MR");
person.setRoleCode("YFADMIN");
person.setEmailAddress("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("ADDUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

if ("SUCCESS".equals(rs.getStatusCode()) ) {
				
out.write("Success");
				
} else {
			
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
				
}

This code will return SUCCESS in rs.getStatusCode(), otherwise it will return an error message explaining why the user creation process failed.

This function will create a user in Yellowfin. The details in the AdministrationPerson object will be used in the user creation process.

Request Element

Data Type

Description

Setting Code

LoginId

String

Login ID of the account used to connect to Yellowfin webservices i.e admin@yellowfin.com.au

setLoginId()

Password

String

Password of the account used to connect to Yellowfin webservices

setPassword()

OrgId

Integer

Primary Organization ID within Yellowfin. Always set this to 1.

setOrgId()

Function = "ADDUSER"

 

Web services function

setFunction()

Person

AdministrationPerson

The AdministrationPerson object holding all of the new user's details for the user creation process

setPerson()

These are the parameters that you need to set in the AdministrationPerson object:

AdministrationPerson Element

Data Type

Description

Setting Code

UserId

String

User ID of the new user. This can be the user ID or the email address, depending on the Logon ID method

setUserId()

Password

String

Password of the new user

setPassword()

FirstName

String

First name of of the new user

setFirstName()

LastName

String

Last name of of the new user

setLastName()

Initial

String

Middle name of the new user

setInitial()

SalutationCode

String

Title of the new user. Possible values include:

  • DR
  • MISS
  • MR
  • MRS
  • MS

setSalutationCode()

RoleCode

String

Yellowfin role. The specified role here can be the Org Reference Code (YFADMIN) or the name of the role (Yellowfin Administrator)

setRoleCode()

EmailAddress

String

Email address of the new user

setEmailAddress()

The response returned will contain these parameters:

Response Element

Data Type

Description

Retrieval Code

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

getStatusCode()

Expand
titleDELUSER / DELETEUSER

The following code will call the Yellowfin web service to create a user:

Code Block
AdministrationServiceRequest rsr = new AdminstrationServiceRequest();
AdministrationServiceResponse rs = null;
AdministrationPerson person = new AdministrationPerson();

person.setUserId("test@yellowfin.com.au");

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
rsr.setOrgId(new Integer(1));
rsr.setFunction("DELUSER");
rsr.setPerson(person);

rs = AdministrationService.remoteAdministrationCall(rsr);

This code will return SUCCESS in rs.getStatusCode(), otherwise it will return an error message explaining why the user creation process failed.

...