ユーザーグループとロールは、こちらの項目で紹介するwebサービスの呼び出しを使用して、作成、または変更をすることができます。
注意:「システム構成」ページで「クライアント組織」機能を有効にすることで、特定タイプの呼び出しでは適用可能な場合に、クライアント組織を指定することができます。
ユーザーロール関数
これらの webサービスは、Yellowfinのユーザーロールに特化しています。
Note |
---|
LDAP認証を使用する場合、ロールを返す任意のwebサービスは、LDAPユーザーが最後に正常にログインしたロールを返します。(このロールは、LDAPユーザーがログインをする度に更新されます。) |
Expand |
---|
|
こちらの関数は、Yellowfinで利用可能なすべてのユーザーロールを返します。応答は、利用可能なロールを表示する、AdministrationRoleオブジェクトの配列を含みます。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「LISTROLES」に設定します。 |
リクエストの例以下のSOAPの例は、この呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>LISTROLES</function>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Roles | AdministrationRole[] | ロールの一覧です。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<roles>
<functions>
<accessLevelCode>CRUD</accessLevelCode>
<functionCode>ACTIVITYSTREAM</functionCode>
<functionDescription>Allows users to access the activity stream.</functionDescription>
<functionName>Activity Stream</functionName>
</functions>
<functions>
<accessLevelCode>CRUD</accessLevelCode>
<functionCode>TIMELINE</functionCode>
<functionDescription>Allows users to access their timeline.</functionDescription>
<functionName>Timeline</functionName>
</functions>
<functions>
<accessLevelCode>CRUD</accessLevelCode>
<functionCode>BROADCASTSUBSCRIBE</functionCode>
<functionDescription>Allows users to subscribe to report broadcasts.</functionDescription>
<functionName>Subscribe to Broadcast</functionName>
</functions>
<functions>
<accessLevelCode>R</accessLevelCode>
<functionCode>STORYBOARD</functionCode>
<functionDescription>Allows users to view, create, edit or delete Storyboards.</functionDescription>
<functionName>Storyboard</functionName>
</functions>
<functions>
<accessLevelCode>R</accessLevelCode>
<functionCode>DASHPUBLIC</functionCode>
<functionDescription>Allows users to create and edit Public dashboards.</functionDescription>
<functionName>Public Dashboards</functionName>
</functions>
<functions>
<accessLevelCode>CRUD</accessLevelCode>
<functionCode>TASKPERSONAL</functionCode>
<functionDescription>Allow users to create and assign tasks to themselves.</functionDescription>
<functionName>Personal Tasks</functionName>
</functions>
.
.
.
<roleCode>YFADMIN</roleCode>
<roleDescription>This user has the widest range of access to the system, and as such you should have a very limited number of people assigned this role. They can do everything from create content through to managing system tasks.</roleDescription>
<roleName>System Administrator</roleName>
</roles>
<sessionId>4f86f0e30e30bf4b07dea21267de0a74</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("LISTROLES"); |
|
完成例以下は、LISTROLES関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_listroles.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_listroles.jsp」を実行します。
Code Block |
---|
| <%
/* ws_listroles.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin webservices admin account
rsr.setPassword("test"); // change to be the password of the account above
rsr.setOrgId(1);
rsr.setFunction("LISTROLES");
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success.<br>Available Roles:");
AdministrationRole[] roles = rs.getRoles();
for (AdministrationRole role: roles){
out.write("<br>");
out.write("<br>Role Name: " + role.getRoleName());
out.write("<br>Role Code: " + role.getRoleCode());
out.write("<br>Role Description: " + role.getRoleDescription());
// uncomment to display all the security functions:
/*
out.write("<br>Function Name | Code | Description | TypeCode | AccessLevelCode");
for (AdministrationFunction f: role.getFunctions()){
out.write("<br>" + f.getFunctionName() + " | "
+ f.getFunctionCode() + " | "
+ f.getFunctionDescription() + " | "
+ f.getFunctionTypeCode() + " | "
+ f.getAccessLevelCode());
}
*/
}
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
こちらの関数は、新規ロールを作成し、ロール機能を更新します。リクエストは、ロールの詳細を指定するAdministrationRoleオブジェクトと、ロールのAdministrationFunctionの配列を含まなくてはいけません。こちらの関数を、ロールの更新、または新規ロール作成のいずれに使用するかに関わらず、すべてのYellowfinロールは、必須関数であるレポートアクセス(コード:MIREPORT)を要求することに注意してください。MIREPORTには、アクセスレベルコードとして、最低でもR(読み取り)を設定しなくてはいけません。こちらの関数が呼び出される度に、セキュリティ機能は上書きされます。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「SAVEROLE」に設定します。 | Role | AdministrationRole | 追加、または更新されるロールの詳細を含むオブジェクトです。詳細は、以下の表を参照してください。 |
以下は、こちらの関数のAdministrationRoleオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationRole 要素 | データ型 | 説明 | RoleCode | String | 既存のロールの内部コードを指定します。既存のロールを更新したい場合は、こちらのパラメーターを必ず含めなくてはいけません。こちらを指定しない場合は、既に同名のロールが存在していても、新規ロールとして作成されます。 | RoleName | String | 新規、または既存のロールの名前です。こちらは、既存のロールの変更時にも必須です。こちらを設定しない場合、呼び出しはロール名を空白にします。 | RoleDescription | String | ロールの説明です。 | Functions | AdministrationFunction | セキュリティ機能の一覧を含むオブジェクトです。これらは、SAVEROLE関数を呼び出す度に上書きされます。レポートアクセス関数は必須です。より詳細な情報は、以下の表を参照してください。 |
以下は、こちらのwebサービスのAdministrationFunctionオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationFunction要素 | データ型 | 説明 | FunctionCode | String | セキュリティ機能のコードを指定します。例えば、レポートアクセス関数を含める場合は、MIREPORTと設定します。 | AccessLevelCode | String | 関数のアクセスレベルです。例えば、Rは読み取りを意味します。 |
以下のSOAPの例は、この呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>SAVEROLE</function>
<role>
<roleCode>REPORTWRITER</roleCode>
<roleName>Report Content Writer</roleName>
<roleDescription>This role can generate reports.</roleDescription>
<functions>
<functionCode>MIREPORT</functionCode>
<accessLevelCode>R</accessLevelCode>
</functions>
</role>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<roles>
<functions>
<accessLevelCode>R</accessLevelCode>
<functionCode>MIREPORT</functionCode>
</functions>
<roleCode>REPORTCONTENTWRITER</roleCode>
<roleDescription>This role can generate reports.</roleDescription>
<roleName>Report Content Writer</roleName>
</roles>
<sessionId>ceaa85d0ca1eb6057dc4facb0a7a5aa9</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("SAVEROLE"); |
ロールを定義します。
Code Block |
---|
| AdministrationRole role = new AdministrationRole(); |
既存のロールを変更する場合は、ロールコードが必須になります。
Code Block |
---|
| role.setRoleCode("NEWROLE"); // If you want to create a new role, comment this out. |
ロールコードを指定しない場合は、同名のロールが既に存在していても、新規ロールとして作成されます。
Tip |
---|
YellowfinデータベースのOrgRoleテーブルから、ロールコードを取得することができます。(通常これはロール名に基づき、すべて大文字のスペースなしで表現されます。) |
既存のロールを変更する場合でもロール名は必須です。ロール名を指定しない場合、呼び出しはこれを空白にします。
Code Block |
---|
| role.setRoleName("New Role");
role.setRoleDescription("testing"); |
ロールにセキュリティ機能を割り当てます。
Code Block |
---|
| role.setFunctions(f);
rsr.setRole(role); |
|
完成例以下は、SAVEROLE関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_saverole.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_saverole.jsp」を実行します。
Code Block |
---|
| <%
/* ws_saverole.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // change to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("SAVEROLE");
//define a role:
AdministrationRole role = new AdministrationRole();
role.setRoleCode("NEWROLE");
role.setRoleName("New Role");
role.setRoleDescription("testing");
AdministrationFunction[] f = new AdministrationFunction[2];
f[0] = new AdministrationFunction();
f[0].setFunctionCode("MIREPORT"); // mandatory
f[0].setAccessLevelCode("R");
f[1] = new AdministrationFunction();
f[1].setFunctionCode("ACTIVITYSTREAM");
f[1].setAccessLevelCode("CRUD");
//Feed the security functions to the role:
role.setFunctions(f);
rsr.setRole(role);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
こちらの関数は、指定したユーザーロールを削除します。AdministrationRoleオブジェクトのロールコードを提供することで、対象のロールを識別することができます。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「DELETEROLE」に設定します。 | Role | AdministrationRole | 削除するロールの詳細を含むオブジェクトです。以下の表を参照してください。 |
以下は、AdministrationRoleオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationRole 要素 | データ型 | 説明 | RoleCode | String | 削除する既存のロールの内部コードを指定します。 |
以下のSOAPの例は、この呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>DELETEROLE</function>
<role>
<roleCode>REPORTWRITER</roleCode>
</role>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<roles>
<roleCode>REPORTWRITER</roleCode>
</roles>
<sessionId>6c494a263bb684c1082317d0e1d695eb</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("DELETEROLE"); |
削除するロールを定義します。
Code Block |
---|
| AdministrationRole role = new AdministrationRole();
role.setRoleCode("NEWROLE"); // existing role. Role Codes can be found by calling LISTROLES
// or retrieved from the Yellowfin database table OrgRole.
rsr.setRole(role); |
|
完成例以下は、DELETEROLE関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_deleterole.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、ロールコード値を調整します。
インターネットブラウザから、「http://<host>:<port>/ws_deleterole.jsp」を実行します。
Code Block |
---|
| <%
/* ws_deleterole.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin webservices admin account
rsr.setPassword("test"); // change to the password of the above account above
rsr.setOrgId(1);
rsr.setFunction("DELETEROLE");
AdministrationRole role = new AdministrationRole();
role.setRoleCode("NEWROLE");
rsr.setRole(role);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
ユーザーグループ関数
ユーザーグループに関連するwebサービスは、以下のように定義されます。
Expand |
---|
|
LISTGROUPS関数は、Yellowfin内の利用可能なすべてのグループを返します。応答には、利用可能なグループを示すAdministrationGroupオブジェクトの配列が含まれます。指定したクライアントに所属するグループの一覧を取得する場合は、呼び出し内でクライアント組織参照IDを渡します。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「LISTGROUPS」に設定します。 | OrgRef | String | 指定したクライアントに所属するグループの一覧を取得する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織のグループが返されます。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>LISTGROUPS</function>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Groups | AdministrationGroup[] | グループの一覧です。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<groups>
<groupDescription>This group contains all users with the Admin role.</groupDescription>
<groupId>11950</groupId>
<groupMembers>
<internalId>5</internalId>
<loginId>admin@yellowfin.com.au</loginId>
</groupMembers>
<groupMembers>
<internalId>13000</internalId>
<loginId>binish.sheikh@yellowfin.com.au</loginId>
</groupMembers>
<groupName>Administrators</groupName>
</groups>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>79d937ead121745d93289f287d55b0ac</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的な呼び出しです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("LISTGROUPS"); |
指定したクライアントのグループ一覧を取得する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー)組織のグループが表示されます。)
Code Block |
---|
| rsr.setOrgRef("org1"); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Groups | AdministrationGroup[] | グループの一覧です。 |
- AdministrationGroup.getGroupMembers()を使用することで、各グループのメンバーを取得することができます。これは、AdministrationGroupMemberの配列を取得します。グループにメンバーとしてのユーザーロールが含まれる場合、これは取得されません。getGroupMembers()を介して、ユーザーアカウントのみが取得されます。
|
完成例以下は、LISTGROUPS関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_listgroups.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザーの詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_listgroups.jsp」を実行します。
Code Block |
---|
| <%
/* ws_listgroups.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // change to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("LISTGROUPS");
//rsr.setOrgRef("org1"); // provide org reference if required. Default org groups will be retrieved otherwise
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success.<br>Available Groups:");
AdministrationGroup[] groups = rs.getGroups();
for (AdministrationGroup group: groups){
out.write("<br>");
out.write("<br>Group Name: " + group.getGroupName());
out.write("<br>Group Id: " + group.getGroupId());
out.write("<br>Group Description: " + group.getGroupDescription());
out.write("<br>Group Status: " + group.getGroupStatus());
out.write("<br>Group Internal Reference: " + group.getGroupInternalReference());
// uncomment to display the members:
/*
out.write("<br>Members:<br>Login Id | Internal Id ");
for (AdministrationGroupMember member: group.getGroupMembers()){
out.write("<br>" + member.getLoginId() + " | " + member.getInternalId() );
}
*/
}
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
指定したユーザーグループを、そのメンバーとともに取得する場合は、こちらの関数を使用します。リクエストには、必ずグループ名を提供しなくてはいけません。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「GETGROUP」に設定します。 | Group | AdministrationGroup | 取得するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織のグループが検索されます。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。 AdministrationGroup要素 | データ型 | 説明 | GroupName | String | その詳細とメンバー一覧を取得するユーザーグループの名前を指定します。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>GETGROUP</function>
<group>
<groupName>Administrators</groupName>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答の要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Group | AdministrationGroup[] | メンバーの一覧を含むグループの詳細です。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<group>
<groupDescription>This group contains all users with the Admin role.</groupDescription>
<groupId>11950</groupId>
<groupMembers>
<internalId>5</internalId>
<loginId>admin@yellowfin.com.au</loginId>
</groupMembers>
<groupMembers>
<internalId>13000</internalId>
<loginId>binish.sheikh@yellowfin.com.au</loginId>
</groupMembers>
<groupName>Administrators</groupName>
<groupStatus>OPEN</groupStatus>
</group>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>54c5cf263f323b439c5834d1f6d8b645</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("GETGROUP"); |
指定したクライアント組織のグループ一覧を取得する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー)組織のグループが表示されます)
Code Block |
---|
| rsr.setOrgRef("org1"); |
メンバーを取得するためにユーザーグループの名前を提供します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators");
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Group | AdministrationGroup[] | メンバー含むグループです。 |
メンバーを取得するためには、以下を使用します。
Code Block |
---|
| AdministrationGroupMember[] members = rs.getGroup().getGroupMembers(); |
Tip |
---|
YellowfinアカウントのIpIdを取得するために、AdministrationGroupMember.getInternalId()を使用することができます。これを、GETUSERBYIPの呼び出しに渡すことで、ユーザーのAdministrationPersonオブジェクトを取得します。 |
|
完成例以下は、GETGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_getgroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_getgroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_getgroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // change to the password of the account above
rsr.setOrgId(1);
rsr.setFunction("GETGROUP");
//rsr.setOrgRef("org1"); // provide org reference ID if required. Default org will be searched otherwise
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators");
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success.<br>");
group = rs.getGroup();
out.write("<br>");
out.write("<br>Group Name: " + group.getGroupName());
out.write("<br>Group Id: " + group.getGroupId());
out.write("<br>Group Description: " + group.getGroupDescription());
out.write("<br>Group Status: " + group.getGroupStatus());
out.write("<br>Group Internal Reference: " + group.getGroupInternalReference());
// display the members:
out.write("<br>Members:<br>Login Id | Internal Id ");
for (AdministrationGroupMember member: group.getGroupMembers()){
out.write("<br>" + member.getLoginId() + " | " + member.getInternalId() );
}
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
こちらの関数は、指定したクライアント組織(参照IDが提供される場合)、またはデフォルト(プライマリー)組織のいずれかに新規ユーザーグループを作成します。新規グループの詳細は、AdministrationGroupオブジェクトを使用して渡されます。新規グループにメンバーを追加する場合は、AdministrationGroupMemberを介して、グループメンバーの詳細を提供します。(追加するメンバーは、既存のYellowfinユーザーでなくてはいけません)
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「CREATEGROUP」に設定します。 | Group | AdministrationGroup | 追加するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織に新規グループを追加する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織にグループが作成されます。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | 新規グループの名前です。 | GroupMembers | AdministrationGroupMember | グループメンバーの詳細を提供するために使用されるオブジェクトです。以下の表を参照してください。 |
以下は、こちらの関数のAdministrationGroupMemberオブジェクトに設定しなくてはいけない主要なパラメーターです。 AdministrationGroupMember要素 | データ型 | 説明 | LoginId | String | 既存のYellowfinユーザーのユーザーIDです。グループに追加するために必要です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>CREATEGROUP</function>
<group>
<groupName>Supervisors</groupName>
<groupMembers>
<loginId>admin@yellowfin.com.au</loginId>
<loginId>binish.sheikh@yellowfin.com.au</loginId>
</groupMembers>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答の要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>b1f1b17d503e1e11c05b72e674bc80ec</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("CREATEGROUP"); |
指定したクライアントに新規グループを追加する場合は、クライアント組織IDを含めます。(こちらを指定しない場合は、デフォルト(プライマリー)組織にグループが作成されます。)
Code Block |
---|
| rsr.setOrgRef("org1"); |
新規グループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Test Group"); |
グループにメンバーを含めます。例:
Code Block |
---|
| AdministrationGroupMember[] member = new AdministrationGroupMember[2];
member[0] = new AdministrationGroupMember();
member[0].setLoginId("admin@yellowfin.com.au");
member[1] = new AdministrationGroupMember();
member[1].setLoginId("john.smith@yellowfin.com.au");
group.setGroupMembers(member);
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
応答には、これらのパラメーターが含まれます。
応答要素 | データ型 | 説明 | StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。 |
|
完成例以下は、CREATEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_creategroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループメンバー、グループ名の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_creategroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_creategroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("CREATEGROUP");
//Specify client org (if omitted, the group will be created in the default (primary) org):
rsr.setOrgRef("org1");
//Set parameters of the new group:
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Test Group"); // mandatory. Other parameters are optional.
//Add members:
AdministrationGroupMember[] member = new AdministrationGroupMember[2];
member[0] = new AdministrationGroupMember();
member[0].setLoginId("admin@yellowfin.com.au");
member[1] = new AdministrationGroupMember();
member[1].setLoginId("john.smith@yellowfin.com.au");
group.setGroupMembers(member);
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらの関数は、グループのメンバーを更新するために使用します。このリクエストともにメンバーの一覧が提供される場合、既存のメンバー一覧は上書きされます。そのため、サービスは既存のメンバーをすべて削除し、新しいメンバーを追加します。メンバー一覧が提供されない場合は、グループ内の既存のユーザーすべてが削除されます。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「MODIFYGROUP」に設定します。 | Group | AdministrationGroup | 変更するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト(プライマリー)組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | グループの名前です。 | GroupMembers | AdministrationGroupMember | グループメンバーの詳細を提供するために使用されるオブジェクトです。以下の表を参照してください。 |
以下は、こちらの関数のAdministrationGroupMemberオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroupMember要素 | データ型 | 説明 | LoginId | String | 既存のYellowfinユーザーのユーザーIDです。グループに追加するために必要です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>MODIFYGROUP</function>
<group>
<groupName>Supervisors</groupName>
<groupMembers>
<loginId>admin@yellowfin.com.au</loginId>
</groupMembers>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答の要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>6589bf668504fd3468e0b43844550a22</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("MODIFYGROUP"); |
クライアント組織に所属するグループを検索する場合は、クライアント組織IDを提供します。(こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。)
Code Block |
---|
| rsr.setOrgRef("org1"); |
新規グループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Test Group"); |
グループにメンバーを含めます。例:
Code Block |
---|
| AdministrationGroupMember[] member = new AdministrationGroupMember[1];
member[0] = new AdministrationGroupMember();
member[0].setLoginId("admin@yellowfin.com.au");
group.setGroupMembers(member);
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、MODIFYGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_modifygroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループメンバー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_modifygroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_modifygroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false);
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("MODIFYGROUP");
//Specify client org (if omitted, default (primary) org will be searched):
rsr.setOrgRef("org1");
//Set parameters of the new group:
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Test Group"); // mandatory. Other parameters are optional.
//Add members:
AdministrationGroupMember[] member = new AdministrationGroupMember[1];
member[0] = new AdministrationGroupMember();
member[0].setLoginId("admin@yellowfin.com.au");
group.setGroupMembers(member);
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%> |
|
Expand |
---|
|
こちらの関数は、グループの名前を変更するために使用します。AdministrationGroupオブジェクトと、グループのIDを使用して対象のグループを指定します。グループIDは、Yellowfinのデータベース(AccessGroupテーブルのAccessGroupIdフィールド)、またはグループ名とresponse.getGroup().getGroupId()を取得してGETGROUPを呼び出すことで取得することができます。
リクエスト要素以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「RENANEGROUP」に設定します。 | Group | AdministrationGroup | 名前を変更するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織に新規グループを追加する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内にグループが作成されます。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupId | Integer | グループを識別するための内部IDです。 | GroupName | String | グループの新しい名前です。 | GroupDescription | String | グループの説明です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>RENAMEGROUP</function>
<group>
<groupId>13001</groupId>
<groupName>Report Creators</groupName>
<groupDescription>Users of this group will create reports.</groupDescription>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答の要素返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>2ca79b1696913aa7a4f8b601ac1641a4</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 以下は、こちらの関数の基礎的なリクエストです。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("RENAMEGROUP"); |
指定したクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。(こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。)
Code Block |
---|
| rsr.setOrgRef("org1"); |
名前を変更するグループを定義します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup(); |
グループIDを使用して、グループを識別します。
Code Block |
---|
| group.setGroupId(13002); |
新しいグループ名と説明を提供します。
Code Block |
---|
| group.setGroupName("Org 1");
group.setGroupDescription("Organization 1 user group");
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、RENAMEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_renamegroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループメンバー、グループIDを調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_renamegroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_renamegroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); //password of the account above
rsr.setOrgId(1);
rsr.setFunction("RENAMEGROUP");
rsr.setOrgRef("org1"); // provide org reference if required. Default org will be searched otherwise
AdministrationGroup group = new AdministrationGroup();
group.setGroupId(13002); // identify the group to rename
group.setGroupName("Org1"); // new group name
group.setGroupDescription("Organization 1 user group"); // new description
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success.<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
グループ名を提供することで、Yellowfinから既存のユーザーグループを削除する場合は、こちらのwebサービスを呼び出します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「DELETEGROUP」に設定します。 | Group | AdministrationGroup | 削除するユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | 削除するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>DELETEGROUP</function>
<group>
<groupName>Admin</groupName>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>db18f2503e80ca02a9d37da13fc540a5</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 指定したクライアント組織に所属するグループを検索する場合は、クライアント組織IDを含めます。こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
Code Block |
---|
| rsr.setOrgRef("org1"); |
削除するグループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Test Group");
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、DELETEGROUP関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_deletegroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_deletegroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_deletegroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // set the password of the above account
rsr.setOrgId(1);
rsr.setFunction("DELETEGROUP");
rsr.setOrgRef("org1"); // specify a client org reference if required. Or skip this to search through the default org
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Test Group"); // this group must exist in the specified client org
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success.<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
こちらの関数は、指定したYellowfinのユーザーを、指定したユーザーグループに追加する場合に使用します。 こちらのリクエストは、ユーザーを指定するAdministrationPersonオブジェクト、ユーザーグループを定義するAdministrationGroupオブジェクトを要求します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「INCLUDEUSERINGROUP」に設定します。 | Person | AdministrationPerson | グループに追加するユーザーの詳細を含むオブジェクトです。以下の表を参照してください。 | Group | AdministrationGroup | 追加するユーザーのユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織内のグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationPersonオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationPerson要素 | データ型 | 説明 | UserId | String | グループに追加する既存のYellowfinユーザーです。これは、ログイン方法に応じて、ユーザーID、または電子メールアドレスになります。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | ユーザーを追加するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>INCLUDEUSERINGROUP</function>
<person>
<userId>binish.sheikh@yellowfin.com.au</userId>
</person>
<group>
<groupName>Administrators</groupName>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>a26d9c279a9c1a4f0dfda86424ca4267</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("INCLUDEUSERINGROUP"); |
指定したクライアント組織に所属するグループを検索する場合は、クライアント組織を指定します。こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
Code Block |
---|
| rsr.setOrgRef("org1"); |
グループに追加する既存ユーザーを識別するパラメーターを設定します。
Code Block |
---|
| AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap); |
ユーザーを含めるグループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators");
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_includeuseringroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、既存ユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_includeuseringroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_includeuseringroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // set to password of the above account
rsr.setOrgId(1);
rsr.setFunction("INCLUDEUSERINGROUP");
//Specify a client org (if omitted, default (primary) org groups will be searched):
rsr.setOrgRef("org1");
//Identify a user:
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap);
//Specify group to add the user to
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); // must be an existing user group
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
こちらの関数は、複数の指定したYellowfinユーザーを、指定したユーザーグループに追加する場合に使用します。 こちらのリクエストは、ユーザーを指定するAdministrationPersonオブジェクト、ユーザーグループを定義するAdministrationGroupオブジェクトを要求します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「INCLUDEUSERSINGROUP」に設定します。 | Person | AdministrationPerson[] | グループに追加するユーザーの詳細を含むオブジェクト配列です。以下の表を参照してください。 | Group | AdministrationGroup | 追加するユーザーのユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織内のグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationPersonオブジェクト配列に設定しなくてはいけない主要なパラメーターです。AdministrationPerson要素 | データ型 | 説明 | UserId | String | グループに追加する既存のYellowfinユーザーです。これは、ログイン方法に応じて、ユーザーID、または電子メールアドレスになります。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | ユーザーを追加するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>INCLUDEUSERSINGROUP</function>
<people>
<userId>binish.sheikh@yellowfin.com.au</userId>
<userId>admin@yellowfin.com.au</userId>
</people>
<group>
<groupName>Administrators</groupName>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>799b3c35c5359c6105586e426f1b9f8c</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("INCLUDEUSERSINGROUP"); |
指定したクライアント組織に所属するグループを検索する場合は、クライアント組織を指定します。こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
Code Block |
---|
| rsr.setOrgRef("org1"); |
グループに追加する既存ユーザーを識別するために、パラメーターを設定します。
Code Block |
---|
| AdministrationPerson[] ap = new AdministrationPerson[1];
ap[0] = new AdministrationPerson();
ap[0].setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPeople(ap); |
ユーザーを含めるグループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); //must be an existing group
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_includeusersingroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、既存ユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_includeusersingroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_includeusersingroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // set to password of the above account
rsr.setOrgId(1);
rsr.setFunction("INCLUDEUSERINGROUP");
//Specify a client org (if omitted, default (primary) org groups will be searched):
rsr.setOrgRef("org1");
//Provide all the users that are to be included:
AdministrationPerson[] ap = new AdministrationPerson[1];
ap[0] = new AdministrationPerson();
ap[0].setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap);
//Specify group to add the users to
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); // must be an existing user group
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
title | EXCLUDEUSERFROMGROUP |
---|
|
こちらの関数は、指定したYellowfinユーザーを、指定したユーザーグループに追加しますが、「含めない」タグが追加されます。ユーザーはグループから削除されるのではなく、除外されたメンバーとして存在することになります。 ![](https://yellowfinjp.atlassian.net/wiki/download/attachments/3014774/Screen%20Shot%202018-03-27%20at%2015.15.13.png?version=1&modificationDate=1522178342095&cacheVersion=1&api=v2)
こちらのリクエストは、ユーザーを指定するAdministrationPersonオブジェクト、ユーザーグループを定義するAdministrationGroupオブジェクトを要求します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「EXCLUDEUSERFROMGROUP」に設定します。 | Person | AdministrationPerson | グループから除外されるユーザーの詳細を含むオブジェクトです。以下の表を参照してください。 | Group | AdministrationGroup | ユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織内のグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationPersonオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationPerson要素 | データ型 | 説明 | UserId | String | グループから除外する既存のYellowfinユーザーです。これは、ログイン方法に応じて、ユーザーID、または電子メールアドレスになります |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | ユーザーを除外するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>EXCLUDEUSERFROMGROUP</function>
<person>
<userId>binish.sheikh@yellowfin.com.au</userId>
</person>
<group>
<groupName>Administrators</groupName>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>c15a0993df4f37f4dbff9b3244f41ea2</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("EXCLUDEUSERFROMGROUP"); |
指定したクライアント組織に所属するグループを検索する場合は、クライアント組織を指定します。こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
Code Block |
---|
| rsr.setOrgRef("org1"); |
ユーザーを識別するパラメーターを設定します。
Code Block |
---|
| AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap); |
グループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); //must be an existing user group
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_excludeuserfromgroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、除外するユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_excludeuserfromgroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_ excludeuserfromgroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // set the password of the above account
rsr.setOrgId(1);
rsr.setFunction("EXCLUDEUSERFROMGROUP");
//Specify the client org (if omitted, the default (primary) org groups will be searched):
rsr.setOrgRef("org1");
//Specify a user to exclude:
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin use
rsr.setPerson(ap);
//Specify which group to exclude from:
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); // must be an existing user group
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
title | EXCLUDEUSERSFROMGROUP |
---|
|
こちらの関数は、複数の指定したYellowfinユーザーを、指定したユーザーグループに追加しますが、「含めない」タグが追加されます。これらのユーザーはグループから削除されるのではなく、除外されたメンバーとして存在することになります。 ![](https://yellowfinjp.atlassian.net/wiki/download/attachments/3014774/Screen%20Shot%202018-03-27%20at%2015.15.13.png?version=1&modificationDate=1522178342095&cacheVersion=1&api=v2)
こちらのリクエストは、ユーザーを指定するAdministrationPersonオブジェクトの配列、ユーザーグループを定義するAdministrationGroupオブジェクトを要求します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「EXCLUDEUSERSFROMGROUP」に設定します。 | Person | AdministrationPerson[] | グループから除外されるユーザーの詳細を含むオブジェクト配列です。以下の表を参照してください。 | Group | AdministrationGroup | ユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織内のグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationPersonオブジェクト配列に設定しなくてはいけない主要なパラメーターです。AdministrationPerson要素 | データ型 | 説明 | UserId | String | グループから除外する既存のYellowfinユーザーです。これは、ログイン方法に応じて、ユーザーID、または電子メールアドレスになります |
以下は、こちらの関数のために、AdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | ユーザーを除外するグループの名前です。 |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("EXCLUDEUSERSFROMGROUP"); |
指定したクライアント組織に所属するグループを検索する場合は、クライアント組織を指定します。こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
Code Block |
---|
| rsr.setOrgRef("org1"); |
ユーザーを識別するパラメーターを設定します。
Code Block |
---|
| AdministrationPerson[] ap = new AdministrationPerson[1];
ap[0] = new AdministrationPerson();
ap[0].setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap); |
グループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); //must be an existing user group
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_excludeusersfromgroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、除外するユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_excludeusersfromgroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_ excludeusersfromgroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // set the password of the above account
rsr.setOrgId(1);
rsr.setFunction("EXCLUDEUSERFROMGROUP");
//Specify the client org (if omitted, the default (primary) org groups will be searched):
rsr.setOrgRef("org1");
//Specify users to exclude:
AdministrationPerson[] ap = new AdministrationPerson[1];
ap[0] = new AdministrationPerson();
ap[0].setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap);
//Specify which group to exclude from:
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); // must be an existing user group
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
|
こちらの関数は、指定したYellowfinユーザーを、指定したユーザーグループから削除します。こちらを実行することで、対象のユーザーはグループメンバーの一覧に表示されなくなります。 こちらのリクエストは、ユーザーを指定するAdministrationPersonオブジェクト、ユーザーグループを定義するAdministrationGroupオブジェクトを要求します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「DELUSERFROMGROUP」に設定します。 | Person | AdministrationPerson | グループから削除されるユーザーの詳細を含むオブジェクトです。以下の表を参照してください。 | Group | AdministrationGroup | ユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | OrgRef | String | 指定したクライアント組織内のグループを検索する場合は、クライアント組織IDを含めます。こちらを指定しない場合は、デフォルト組織内のグループが検索されます。 |
以下は、こちらの関数のAdministrationPersonオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationPerson要素 | データ型 | 説明 | UserId | String | グループから削除する既存のYellowfinユーザーです。これは、ログイン方法に応じて、ユーザーID、または電子メールアドレスになります |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | ユーザーを削除するグループの名前です。 |
以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>DELUSERFROMGROUP</function>
<person>
<userId>binish.sheikh@yellowfin.com.au</userId>
</person>
<group>
<groupName>Administrators</groupName>
</group>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>ed4f6504e415411875b2c359b9384cf9</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("DELUSERFROMGROUP"); |
指定したクライアント組織に所属するグループを検索する場合は、クライアント組織を指定します。こちらを含めない場合は、デフォルト(プライマリー)組織内のグループが検索されます。
Code Block |
---|
| rsr.setOrgRef("org1"); |
削除するユーザーを識別するパラメーターを設定します。
Code Block |
---|
| AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin user
rsr.setPerson(ap); |
ユーザーを削除するグループのパラメーターを設定します。
Code Block |
---|
| AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); //must be an existing user group
rsr.setGroup(group); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_deluserfromgroup.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、削除するユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_deluserfromgroup.jsp」を実行します。
Code Block |
---|
| <%
/* ws_ deluserfromgroup.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // set the password of the above account
rsr.setOrgId(1);
rsr.setFunction("DELUSERFROMGROUP");
//Specify the client org (if omitted, the default (primary) org groups will be searched):
rsr.setOrgRef("org1");
//Specify a user to remove from a group:
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au"); // must be an existing Yellowfin use
rsr.setPerson(ap);
//Specify which group to remove user from:
AdministrationGroup group = new AdministrationGroup();
group.setGroupName("Administrators"); // must be an existing user group
rsr.setGroup(group);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
%> |
|
Expand |
---|
title | ASSIGNDEFAULTDASHBOARD |
---|
|
こちらの関数は、特定のダッシュボードを指定したユーザーグループのデフォルトダッシュボードとして設定するために使用します。ダッシュボードを指定するためにContentResourceオブジェクト、ユーザーグループを識別するためにAdministrationGroupオブジェクトを使用します。
リクエストパラメーター以下のパラメーターは、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | ログインをして、この関数を実行する、Webサービス管理者ユーザーのIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「ASSIGNDEFAULTDASHBOARD」に設定します。 | Group | AdministrationGroup | ユーザーグループの詳細を含むオブジェクトです。以下の表を参照してください。 | ContentResource | ContentResource[] | グループのデフォルトに設定するダッシュボードの詳細を含むオブジェクト配列です。以下の表を参照してください。 |
以下は、こちらの関数のAdministrationGroupオブジェクトに設定しなくてはいけない主要なパラメーターです。AdministrationGroup要素 | データ型 | 説明 | GroupName | String | デフォルトダッシュボードを設定するグループの名前です。 | GroupId | Integer | ユーザーグループに一意のIDです。 |
以下は、こちらの関数のContentResourceオブジェクトに設定しなくてはいけない主要なパラメーターです。ContentResource要素 | データ型 | 説明 | ResourceId | Integer | ダッシュボードのIDです。 | ResourceType | String | 固定値「GROUP」に設定しなくてはいけません。この値が正しく設定されていない要素は無視されます。 |
リクエストの例以下のSOAPの例は、こちらの呼び出しに渡すことのできるパラメーターを表示しています。 Code Block |
---|
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
<soapenv:Header/>
<soapenv:Body>
<web:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>ASSIGNDEFAULTDASHBOARD</function>
<group>
<groupName>Administrators</groupName>
<groupId>11950</groupId>
</group>
<contentResources>
<resourceId>61251</resourceId>
<ResourceType>GROUP</ResourceType>
</contentResources>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
応答のパラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 |
応答の例サービスは、今回のSOAPの例に基づき、以下の応答を返します。 Code Block |
---|
| <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
<return>
<errorCode>0</errorCode>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>7b5510bf9919823f6067747b5d305984</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("ASSIGNDEFAULTDASHBOARD"); |
AdministrationGroupオブジェクトを使用して、グループを指定します。
Code Block |
---|
| AdministrationGroup administrationGroup = new AdministrationGroup();
administrationGroup.setGroupName("Administrators");
administrationGroup.setGroupId(11950); |
ContentResourceオブジェクトを使用して、ダッシュボードを指定します。
Code Block |
---|
| ContentResource dashboardContentResource = new ContentResource();
dashboardContentResource.setResourceId(61195);
dashboardContentResource.setResourceType("GROUP"); |
こちらのオブジェクトをリクエストに設定します。
Code Block |
---|
| rsr.setContentResources(new ContentResource[] { dashboardContentResource }); |
リクエストの構成が完了したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理Webサービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらの関数の完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_assigndefaultdashboard.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、削除するユーザー、グループ名を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_assigndefaultdashboard.jsp」を実行します。
Code Block |
---|
| <%
/* ws_assigndefaultdashboard.jsp */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
AdministrationServiceResponse rs = null;
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceService ts = new AdministrationServiceServiceLocator("localhost", 8080, "/services/AdministrationService", false);
AdministrationServiceSoapBindingStub rssbs = (AdministrationServiceSoapBindingStub) ts.getAdministrationService();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setFunction("ASSIGNDEFAULTDASHBOARD");
// This is the group
AdministrationGroup administrationGroup = new AdministrationGroup();
administrationGroup.setGroupName("Administrators");
administrationGroup.setGroupId(11950);
rsr.setGroup(administrationGroup);
// This is the Dashboard
ContentResource dashboardContentResource = new ContentResource();
dashboardContentResource.setResourceId(61195);
dashboardContentResource.setResourceType("GROUP");
rsr.setContentResources(new ContentResource[] { dashboardContentResource });
rs = rssbs.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode())) {
out.write("Success");
} else {
out.write("Failure");
out.write(rs.toString());
}
%> |
|