Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/org.wso2.carbon.utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@
org.wso2.carbon.keystore.persistence.model,
org.wso2.carbon.utils.*,
org.wso2.carbon.context,
!org.wso2.carbon.context.internal
!org.wso2.carbon.context.internal,
org.wso2.carbon.context.model
</Export-Package>
<Bundle-Activator>org.wso2.carbon.context.internal.CarbonContextActivator</Bundle-Activator>
<Private-Package>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

package org.wso2.carbon.context;

import org.wso2.carbon.context.model.OperationScopeSet;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
* This class holds the context for validating operation scopes.
Expand All @@ -33,7 +33,7 @@ public class OperationScopeValidationContext {
private String apiIdentifier;
private boolean validationRequired;
private List<String> validatedScopes;
private Map<String, String> operationScopeMap = new ConcurrentHashMap<>();
private OperationScopeSet operationScopeSet;

public String getApiIdentifier() {

Expand Down Expand Up @@ -65,13 +65,13 @@ public void setValidatedScopes(List<String> validatedScopes) {
this.validatedScopes = validatedScopes;
}

public Map<String, String> getOperationScopeMap() {
public OperationScopeSet getOperationScopeSet() {

return operationScopeMap;
return operationScopeSet;
}

public void setOperationScopeMap(Map<String, String> operationScopeMap) {
public void setOperationScopeSet(OperationScopeSet operationScopeSet) {

this.operationScopeMap = operationScopeMap;
this.operationScopeSet = operationScopeSet;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2025, 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.context.model;

import java.util.Map;

/**
* Model class to hold operation scope details.
*/
public class OperationScopeSet {

private boolean isMandatory;
private Map<String, String> operationScopeMap;

public boolean getIsMandatory() {

return isMandatory;
}

public void setIsMandatory(boolean isMandatory) {

this.isMandatory = isMandatory;
}

public Map<String, String> getOperationScopeMap() {

return operationScopeMap;
}

public void setOperationScopeMap(Map<String, String> operationScopeMap) {

this.operationScopeMap = operationScopeMap;
}

}