org.wso2.carbon.identity.entitlement.stub.dto.EntitledResultSetDTO Java Examples

The following examples show how to use org.wso2.carbon.identity.entitlement.stub.dto.EntitledResultSetDTO. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SOAPEntitlementServiceClient.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
private EntitledAttributesDTO[] getEntitledAttributes(String subjectName, String resourceName, String subjectId,
                                                      String action, boolean enableChildSearch,
                                                      EntitlementServiceStub stub, Authenticator authenticator)
        throws Exception {
    EntitledResultSetDTO results;
    try {
        results = stub.getEntitledAttributes(subjectName, resourceName, subjectId, action, enableChildSearch);
    } catch (AxisFault e) {
        if (ProxyConstants.SESSION_TIME_OUT.equals(e.getFaultCode().getLocalPart())) {
            setAuthCookie(true, stub, authenticator);
            results = stub.getEntitledAttributes(subjectName, resourceName, subjectId, action, enableChildSearch);
        } else {
            throw e;
        }
    }

    return results.getEntitledAttributesDTOs();
}
 
Example #2
Source File: SOAPEntitlementServiceClient.java    From carbon-identity with Apache License 2.0 6 votes vote down vote up
private EntitledAttributesDTO[] getEntitledAttributes(String subjectName, String resourceName,
                                                      String subjectId, String action, boolean enableChildSearch,
                                                      EntitlementServiceStub stub, Authenticator authenticator) throws Exception {
    EntitledResultSetDTO results;
    try {
        results = stub.getEntitledAttributes(subjectName, resourceName, subjectId, action,
                enableChildSearch);
    } catch (AxisFault e) {
        if (ProxyConstants.SESSION_TIME_OUT.equals(e.getFaultCode().getLocalPart())) {
            setAuthCookie(true, stub, authenticator);
            results = stub.getEntitledAttributes(subjectName, resourceName, subjectId, action,
                    enableChildSearch);
        } else {
            throw e;
        }
    }

    return results.getEntitledAttributesDTOs();
}
 
Example #3
Source File: BasicAuthEntitlementServiceClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
private EntitledAttributesDTO[] getEntitledAttributes(String subjectName, String resourceName, String subjectId,
                                                      String action, boolean enableChildSearch,
                                                      EntitlementServiceStub stub) throws Exception {
    EntitledResultSetDTO results;
    results = stub.getEntitledAttributes(subjectName, resourceName, subjectId, action, enableChildSearch);
    return results.getEntitledAttributesDTOs();
}
 
Example #4
Source File: EntitlementServiceClient.java    From carbon-identity-framework with Apache License 2.0 5 votes vote down vote up
/**
 * Gets user or role entitled resources
 *
 * @param subjectName       user or role name
 * @param resourceName      resource name
 * @param subjectId         attribute id of the subject, user or role
 * @param action            action name
 * @param enableChildSearch whether search is done for the child resources under the given resource name
 * @return entitled resources as String array
 * @throws org.apache.axis2.AxisFault throws
 */
public EntitledResultSetDTO getEntitledAttributes(String subjectName, String resourceName,
                                                  String subjectId, String action, boolean enableChildSearch)
        throws AxisFault {
    try {
        return stub.getEntitledAttributes(subjectName, resourceName, subjectId, action,
                enableChildSearch);
    } catch (Exception e) {
        handleException(e.getMessage(), e);
    }

    return null;
}
 
Example #5
Source File: EntitlementServiceClient.java    From carbon-identity with Apache License 2.0 5 votes vote down vote up
/**
 * Gets user or role entitled resources
 *
 * @param subjectName       user or role name
 * @param resourceName      resource name
 * @param subjectId         attribute id of the subject, user or role
 * @param action            action name
 * @param enableChildSearch whether search is done for the child resources under the given resource name
 * @return entitled resources as String array
 * @throws org.apache.axis2.AxisFault throws
 */
public EntitledResultSetDTO getEntitledAttributes(String subjectName, String resourceName,
                                                  String subjectId, String action, boolean enableChildSearch)
        throws AxisFault {
    try {
        return stub.getEntitledAttributes(subjectName, resourceName, subjectId, action,
                enableChildSearch);
    } catch (Exception e) {
        handleException(e.getMessage(), e);
    }

    return null;
}
 
Example #6
Source File: BasicAuthEntitlementServiceClient.java    From carbon-identity with Apache License 2.0 5 votes vote down vote up
private EntitledAttributesDTO[] getEntitledAttributes(String subjectName, String resourceName,
                                                      String subjectId, String action, boolean enableChildSearch,
                                                      EntitlementServiceStub stub) throws Exception {
    EntitledResultSetDTO results;
    results = stub.getEntitledAttributes(subjectName, resourceName, subjectId, action,
            enableChildSearch);
    return results.getEntitledAttributesDTOs();
}