Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

oracle.apps.fnd.applcore.attachments.content
Class ServerConnection

java.lang.Object
  extended by oracle.apps.fnd.applcore.attachments.content.ServerConnection

public class ServerConnection
extends java.lang.Object


Field Summary
static java.lang.String ADMIN_PRIVILEGE
           
static java.lang.String USER_PRIVILEGE
           
 
Constructor Summary
ServerConnection(oracle.stellent.ridc.IdcClient client, oracle.stellent.ridc.IdcContext context)
           
 
Method Summary
 void addAccountPermission(java.lang.String userName, java.lang.String accountName, java.lang.String privilege)
           Grants the user permission to this role.
 void addRolePermission(java.lang.String userName, java.lang.String roleName, java.lang.String privilege)
           Grants the user permission to this role.
 void createAccount(java.lang.String accountName)
          Adds an account to the Content Server.
 void createRole(java.lang.String roleName, java.lang.String privilege)
          Creates a role on the Content Server.
 void createSecurityGroup(java.lang.String name, java.lang.String description, java.lang.String privilege)
          Adds a security group to the Content Server.
 void createUser(java.lang.String userName)
          Adds a user to the Content Server.
 void deleteAccount(java.lang.String accountName)
          Deletes an account from the Content Server.
 void deleteRole(java.lang.String roleName)
          Deletes a role from the Content Server.
 void deleteSecurityGroup(java.lang.String name)
          Deletes a secruity group from the Content Server.
 void deleteUser(java.lang.String userName)
          Deletes a user from the Content Server.
 java.util.List<ExtendedUserAttribute> getExtendedUserAttributes(java.lang.String username)
          Gets the Extended User Attributes for this user from the Content Server.
 void removeAccountPermission(java.lang.String userName, java.lang.String accountName, java.lang.String privilege)
           Remove permissions for this account from this user.
 void removeRolePermission(java.lang.String userName, java.lang.String roleName, java.lang.String privilege)
           Remove permissions for this role from this user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADMIN_PRIVILEGE

public static final java.lang.String ADMIN_PRIVILEGE
See Also:
Constant Field Values

USER_PRIVILEGE

public static final java.lang.String USER_PRIVILEGE
See Also:
Constant Field Values
Constructor Detail

ServerConnection

public ServerConnection(oracle.stellent.ridc.IdcClient client,
                        oracle.stellent.ridc.IdcContext context)
Method Detail

createUser

public void createUser(java.lang.String userName)
                throws oracle.stellent.ridc.IdcClientException
Adds a user to the Content Server.

Parameters:
userName - id of the user. This id is mandatory and must be unique.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server. eg. duplicate userName.
java.lang.RuntimeException - Thrown if the userName is null or zero length.

deleteUser

public void deleteUser(java.lang.String userName)
                throws oracle.stellent.ridc.IdcClientException
Deletes a user from the Content Server.

Parameters:
userName - id of the user.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server eg. current user does not have the privilege to delete users.

createRole

public void createRole(java.lang.String roleName,
                       java.lang.String privilege)
                throws oracle.stellent.ridc.IdcClientException
Creates a role on the Content Server.

Parameters:
roleName - id of the role. This id is mandatory and must be unique.
privilege - the permissions setting. This method restricts privileges to either ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server.
java.lang.RuntimeException - Thrown if
  • roleName is null or zero length
  • privilege is null or zero length
  • privlege is not ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE

deleteRole

public void deleteRole(java.lang.String roleName)
                throws oracle.stellent.ridc.IdcClientException
Deletes a role from the Content Server.

Parameters:
roleName - id of the role.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server.

createAccount

public void createAccount(java.lang.String accountName)
                   throws oracle.stellent.ridc.IdcClientException
Adds an account to the Content Server.

Parameters:
accountName - id of the account. The id is mandatory and must be unique.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server. eg. duplicate accountName
java.lang.RuntimeException - Thrown if the accountName is null or zero length.

deleteAccount

public void deleteAccount(java.lang.String accountName)
                   throws oracle.stellent.ridc.IdcClientException
Deletes an account from the Content Server.

Parameters:
accountName - id of the account.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server.

addRolePermission

public void addRolePermission(java.lang.String userName,
                              java.lang.String roleName,
                              java.lang.String privilege)
                       throws oracle.stellent.ridc.IdcClientException

Grants the user permission to this role. If this role is new then the role and privilege will be appended to the existing extended attributes (if any). If this role already has been assigned to this user then the existing privilege for this role will be updated.

Note that user must already exist on the Content Server.

Parameters:
userName - id of the user. This is mandatory.
roleName - id of the role. This is mandatory.
privilege - the permissions setting. A value of ServerConnect.ADMIN_PRIVILEGE grants RWDA (Read Write Delete Administration) permissions. Whereas a value of ServerConnect.USER_PRIVILEGE grants RWD permission. This method restricts privileges to either ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server. eg. user has not been created.
java.lang.RuntimeException - Thrown if
  • userName is null or zero length
  • roleName is null or zero length
  • privilege is null or zero length
  • privlege is not ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE

addAccountPermission

public void addAccountPermission(java.lang.String userName,
                                 java.lang.String accountName,
                                 java.lang.String privilege)
                          throws oracle.stellent.ridc.IdcClientException

Grants the user permission to this role. If this role is new then the role and privilege will be appended to the existing extended attributes (if any). If this role already has been assigned to this user then the existing privilege for this role will be updated.

Note that user must already exist on the Content Server.

Parameters:
userName - id of the user. This is mandatory.
accountName - id of the account. This is mandatory.
privilege - the permissions setting. A value of ServerConnect.ADMIN_PRIVILEGE grants RWDA (Read Write Delete Administration) permissions. Whereas a value of ServerConnect.USER_PRIVILEGE grants RWD permission. This method restricts privileges to either ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server. eg. user has not been created.
java.lang.RuntimeException - Thrown if
  • userName is null or zero length
  • accountName is null or zero length
  • privilege is null or zero length
  • privlege is not ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE

removeRolePermission

public void removeRolePermission(java.lang.String userName,
                                 java.lang.String roleName,
                                 java.lang.String privilege)
                          throws oracle.stellent.ridc.IdcClientException

Remove permissions for this role from this user.

A user with permissions against this role must exist in order to use this method.

Parameters:
userName - id of the user. This is mandatory.
roleName - id of the role. This is mandatory.
privilege - the permissions setting. This is mandatory. It is expected to be the current value of the privilege. However, this is not validated.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server. eg. role has not been added to this user.

removeAccountPermission

public void removeAccountPermission(java.lang.String userName,
                                    java.lang.String accountName,
                                    java.lang.String privilege)
                             throws oracle.stellent.ridc.IdcClientException

Remove permissions for this account from this user.

A user with permissions against this account must exist in order to use this method.

Parameters:
userName - id of the user. This is mandatory.
accountName - id of the account. This is mandatory.
privilege - the permissions setting. This is mandatory. It is expected to be the current value of the privilege. However, this is not validated.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server. eg. account has not been added to this user.

getExtendedUserAttributes

public java.util.List<ExtendedUserAttribute> getExtendedUserAttributes(java.lang.String username)
                                                                throws oracle.stellent.ridc.IdcClientException
Gets the Extended User Attributes for this user from the Content Server.

Parameters:
username - id of the user.
Returns:
List of Extended User Attributes. If there are no Extended User Attributes for this user then an empty list is returned.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server.

createSecurityGroup

public void createSecurityGroup(java.lang.String name,
                                java.lang.String description,
                                java.lang.String privilege)
                         throws oracle.stellent.ridc.IdcClientException
Adds a security group to the Content Server.

Parameters:
name - id of the security group.
description - description of the secruity group.
privilege - the permissions setting. If this value is set to 0 only the admin role has RWDA permission on the group. No other roles are able to access the group. If the value is set to 15 all roles get RWDA permission on the group. This method restricts privileges to either ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server.
java.lang.RuntimeException - Thrown if
  • id is null or zero length
  • privilege is null or zero length
  • privlege is not ServerConnect.ADMIN_PRIVILEGE or ServerConnect.USER_PRIVILEGE

deleteSecurityGroup

public void deleteSecurityGroup(java.lang.String name)
                         throws oracle.stellent.ridc.IdcClientException
Deletes a secruity group from the Content Server.

Parameters:
name - id of the secruity group.
Throws:
oracle.stellent.ridc.IdcClientException - Exceptions thrown by the Content Server.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

Copyright © 2013 Oracle. All Rights Reserved.