A simple administration application typically involves a create operation for one of the following BIRT iHub objects:
User
Folder
UserGroup
To perform an administration operation that acts on an existing object in BIRT iHub System, such as a select, update, or delete operation, you must apply a search condition to the operation. To perform an administration operation that contains a set of administration operations requests, submit the request as a batch or transaction.
The following sections describe the techniques for building an application that performs a simple administration operation that creates a user in the volume.
Creating a user
The following application derives from the code in the BIRT iHub Integration Technology example applications for the Apache Axis 2 client. The application class, AcCreateUser, logs in to as Administrator and creates a user. AcCreateUser.createUser( ) method performs the following tasks.
Instantiates a com.actuate.schemas.User object using ActuateControl.newUser( ) to set the username, password, and home folder
Calls ActuateControl.createUser( ), passing the reference to the User object
// create the user
actuateControl.createUser(user);
System.out.println("User " + userName
+ ", view preferences, send notice and email features, plus job priority privileges created.");
}
}
About ActuateControl.createUser( )
ActuateControl.createUser( ) performs the following tasks:
Instantiates a com.actuate.schemas.CreateUser object
public com.actuate.schemas.AdministrateResponse createUser(com.actuate.schemas.User user)
throws RemoteException {
com.actuate.schemas.CreateUser createUser =
new com.actuate.schemas.CreateUser( );
The CreateUser operation is only available to a user with the Administrator user group.
Passes the reference to the User object, containing the username, password, and home folder, and other settings, to the CreateUser object
createUser.setUser(user);
Sets IgnoreDup to True
createUser.setIgnoreDup(Boolean.TRUE);
If the value of IgnoreDup is True, a volume ignores a duplicate request to create the user and does not report an error. If the value of IgnoreDup is False, a volume ignores the duplicate request and reports the error. The default value is False. A volume always rejects a duplicate request regardless of the IgnoreDup setting.
An AdminOperation represents a single unit of work within an Administrate request. The list of attributes in the com.actuate.schemas. AdminOperation class lists the possible administration operations that BIRT iHub can perform within the scope of an Actuate Information Delivery API request.
Passes the reference to the CreateUser object to AdminOperation.setCreateUser( )
adminOperation.setCreateUser(createUser);
Calls ActuateControl.runAdminOperation( ), returning a reference to the AdministrateResponse object that contains the volume response
return runAdminOperation(adminOperation);
}
}
About ActuateControl.runAdminOperation( )
ActuateControl.runAdminOperation( ) is an overloaded method that can assemble and run a single administration operation or an array of administration operations. The method that runs a single administration operation performs the following tasks:
Instantiates an Administrate object
public com.actuate.schemas.AdministrateResponse runAdminOperation(
Administrate is not an operation on its own. It is a mechanism for assembling the set of operations that the application is requesting BIRT iHub to perform. An Administrate request can be a composite operation and consist of multiple AdminOperation objects.
Calls administrate.setAdminOperation( ) to construct the AdminOperation array, adding the AdminOperation object as an element
administrate.setAdminOperation(
new com.actuate.schemas.AdminOperation[ ] {
adminOperation });
The com.actuate.schemas.Administrate object is an array of AdminOperation objects that can create, update, or delete an item or items in the volume. An Actuate Information Delivery API application must submit even a single AdminOperation request in an Administrate object as an array of AdminOperations. The AdminOperation array can contain one or more elements.
Makes the remote call to the Actuate SOAP port using proxy.Administrate( )