Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sadilchamishka committed Oct 24, 2023
1 parent 1b87905 commit 9ba3501
Show file tree
Hide file tree
Showing 21 changed files with 474 additions and 384 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.74-SNAPSHOT</version>
<version>1.3.75-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.organization.management.organization.user.association</artifactId>
<name>WSO2 - Organization User Association Management Service</name>
<artifactId>org.wso2.carbon.identity.organization.management.organization.user.sharing</artifactId>
<name>WSO2 - Organization User Sharing Service</name>
<packaging>bundle</packaging>

<properties>
Expand Down Expand Up @@ -104,11 +104,11 @@
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Description>Organization User Association Management Service Bundle</Bundle-Description>
<Private-Package>
org.wso2.carbon.identity.organization.management.organization.user.association.internal
org.wso2.carbon.identity.organization.management.organization.user.sharing.internal
</Private-Package>
<Export-Package>
!org.wso2.carbon.identity.organization.management.organization.user.association.internal,
org.wso2.carbon.identity.organization.management.organization.user.association.*;
!org.wso2.carbon.identity.organization.management.organization.user.sharing.internal,
org.wso2.carbon.identity.organization.management.organization.user.sharing.*;
version="${identity.organization.management.exp.pkg.version}",
</Export-Package>
<Import-Package>
Expand All @@ -125,6 +125,7 @@
org.wso2.carbon.identity.organization.management.service.util;version="${org.wso2.identity.organization.mgt.imp.pkg.version.range}",
org.wso2.carbon.identity.organization.management.service.exception;version="${org.wso2.identity.organization.mgt.imp.pkg.version.range}",
org.wso2.carbon.identity.organization.management.service.model; version="${org.wso2.identity.organization.mgt.core.imp.pkg.version.range}",
org.wso2.carbon.identity.organization.management.service.constant;version="${org.wso2.identity.organization.mgt.core.imp.pkg.version.range}",
org.wso2.carbon.user.api;version="${carbon.user.api.imp.pkg.version.range}",
org.wso2.carbon.user.core;version="${carbon.kernel.package.import.version.range}",
org.wso2.carbon.user.core.common;version="${carbon.kernel.package.import.version.range}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,42 @@
* under the License.
*/

package org.wso2.carbon.identity.organization.management.organization.user.association;
package org.wso2.carbon.identity.organization.management.organization.user.sharing;

import org.wso2.carbon.identity.organization.management.organization.user.association.models.SharedUserAssociation;
import org.wso2.carbon.identity.organization.management.organization.user.sharing.models.SharedUserAssociation;
import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException;

/**
* Service that manages the organization user sharing.
*/
public interface OrganizationUserAssociationService {
public interface OrganizationUserSharingService {

/**
* Creates the association between the shared user and the actual user in the shared organization.
*
* @param userId Actual user ID of the user in the parent organization.
* @param realUserId Actual user ID of the user in the parent organization.
* @param userResidentOrgId The organization ID where the user's identity is managed.
* @param sharedUserId ID of the user which is created in the shared organization.
* @param sharedOrgId Organization ID of the user shared organization.
* @param sharedOrgId Organization ID of the user shared organization.
* @throws OrganizationManagementException If an error occurs while creating the organization user association.
*/
void createOrganizationUserAssociation(String userId, String userResidentOrgId, String sharedUserId,
String sharedOrgId) throws OrganizationManagementException;
void shareOrganizationUser(String realUserId, String userResidentOrgId, String sharedOrgId)
throws OrganizationManagementException;

/**
* UnShare all the shared users for the given user.
*
* @param realUserId The ID of the user.
* @param userResidentOrgId The ID of the organization where the user is managed.
* @return True if the organization user associations are deleted successfully.
* @throws OrganizationManagementException If an error occurs while deleting the organization user associations.
*/
boolean unShareOrganizationUsers(String realUserId, String userResidentOrgId)
throws OrganizationManagementException;

/**
* Delete the organization user association of the shared user.
*
* @param sharedUserId The ID of the shared user.
* @param sharedUserId The ID of the shared user.
* @param userResidentOrgId The ID of organization where the user's identity is managed.
* @return True if the organization user association is deleted successfully.
* @throws OrganizationManagementException If an error occurs while deleting the organization user association.
Expand All @@ -50,24 +60,24 @@ boolean deleteOrganizationUserAssociationOfSharedUser(String sharedUserId, Strin
throws OrganizationManagementException;

/**
* Delete the organization user associations of a given user.
* Get the shared user association of the user.
*
* @param userId The ID of the user.
* @param userResidentOrgId The ID of the organization where the user is managed.
* @return True if the organization user associations are deleted successfully.
* @throws OrganizationManagementException If an error occurs while deleting the organization user associations.
* @param realUserId The actual ID of the user.
* @param sharedOrganizationId The organization ID of the user.
* @return The shared user association of the user.
* @throws OrganizationManagementException If an error occurs while retrieving the shared user association.
*/
boolean deleteOrganizationUserAssociations(String userId, String userResidentOrgId)
SharedUserAssociation getSharedUserAssociationOfUser(String realUserId, String sharedOrganizationId)
throws OrganizationManagementException;

/**
* Get the shared user association of the user.
* Get the shared user association of a shared user.
*
* @param userId The actual ID of the user.
* @param sharedUserId The user ID of the shared user.
* @param sharedOrganizationId The organization ID of the user.
* @return The shared user association of the user.
* @return The shared user association of the shared user.
* @throws OrganizationManagementException If an error occurs while retrieving the shared user association.
*/
SharedUserAssociation getSharedUserAssociationOfUserAtSubOrg(String userId, String sharedOrganizationId)
SharedUserAssociation getSharedUserAssociationOfSharedUser(String sharedUserId, String sharedOrganizationId)
throws OrganizationManagementException;
}
Loading

0 comments on commit 9ba3501

Please sign in to comment.