Skip to content

Commit

Permalink
remove workflow related components
Browse files Browse the repository at this point in the history
  • Loading branch information
asha15 committed Dec 4, 2023
1 parent 674b6dc commit a99fe42
Show file tree
Hide file tree
Showing 123 changed files with 61 additions and 31,356 deletions.
8 changes: 4 additions & 4 deletions components/user-mgt/org.wso2.carbon.user.mgt.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.user.store.count.stub</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.user.mgt.workflow.stub</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down Expand Up @@ -92,6 +88,10 @@
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.claim.metadata.mgt</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.user.mgt</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@


import org.apache.axis2.AxisFault;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.user.mgt.workflow.stub.UserManagementWorkflowServiceStub;
import org.wso2.carbon.user.mgt.workflow.stub.UserManagementWorkflowServiceWorkflowExceptionException;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.user.mgt.UserManagementWorkflowStub;

import java.rmi.RemoteException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

public class UserManagementWorkflowServiceClient {

private UserManagementWorkflowServiceStub stub;
private UserManagementWorkflowStub service;
private static final Log log = LogFactory.getLog(UserManagementWorkflowServiceClient.class);

/**
Expand All @@ -44,13 +46,15 @@ public class UserManagementWorkflowServiceClient {
public UserManagementWorkflowServiceClient(String cookie, String backendServerURL,
ConfigurationContext configCtx) throws AxisFault {

String serviceURL = backendServerURL + "UserManagementWorkflowService";
stub = new UserManagementWorkflowServiceStub(configCtx, serviceURL);

ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
try{
service = (UserManagementWorkflowStub) PrivilegedCarbonContext.getThreadLocalCarbonContext().getOSGiService
(UserManagementWorkflowStub.class, null);
if (service != null) {
service.initiateUserManagementWorkflowServiceClient(cookie, backendServerURL, configCtx);
}
} catch (NullPointerException e) {
log.debug("UserManagementWorkflowServiceClient is not available. Hence, not initializing the service client.");
}
}

/**
Expand All @@ -59,17 +63,12 @@ public UserManagementWorkflowServiceClient(String cookie, String backendServerUR
* @param entityType Entity Type of the Work-flow.
* @param entityIdFilter Entity ID filter to search
* @return
* @throws java.rmi.RemoteException
* @throws org.wso2.carbon.user.mgt.workflow.stub.UserManagementWorkflowServiceWorkflowExceptionException
*/
public String[] listAllEntityNames(String wfOperationType, String wfStatus, String entityType,
String entityIdFilter) throws RemoteException {

public String[] listAllEntityNames(String wfOperationType, String wfStatus, String entityType, String
entityIdFilter) throws RemoteException, UserManagementWorkflowServiceWorkflowExceptionException {

String[] entityNames = stub.listAllEntityNames(wfOperationType, wfStatus, entityType, entityIdFilter);
if (entityNames == null) {
entityNames = new String[0];
}
return entityNames;
String[] entityNames = (service != null) ? service.listAllEntityNames(wfOperationType, wfStatus, entityType, entityIdFilter)
: new String[0];
return (entityNames != null) ? entityNames : new String[0];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.wso2.carbon.user.mgt;

import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;

import java.rmi.RemoteException;

/**
* This interface is used to check Workflow related services.
*/
public interface UserManagementWorkflowStub {

public void initiateUserManagementWorkflowServiceClient(String Cookie, String backendServerURL,
ConfigurationContext configCtx) throws AxisFault;

public String[] listAllEntityNames(String wfOperationType,
String wfStatus, String entityType, String entityIdFilter) throws RemoteException;
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a99fe42

Please sign in to comment.