PendingRequestsService.java revision 5bce2592c4caa6046c03b742da1e3b193e4c13a3
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
/**
* Service class responsible for creating, reading, querying, approving and
* denying UMA Pending Requests.
*
* @since 13.0.0
*/
public class PendingRequestsService {
private final UmaAuditLogger auditLogger;
private final CoreWrapper coreWrapper;
private final UmaProviderSettingsFactory settingsFactory;
this.auditLogger = auditLogger;
this.coreWrapper = coreWrapper;
this.settingsFactory = settingsFactory;
}
public void createPendingRequest(String resourceSetId, String resourceSetName, String resourceOwnerId,
//TODO email RO
}
}
try {
} catch (NotFoundException e) {
throw new org.forgerock.json.resource.NotFoundException("Pending request, " + id + ", not found", e);
} catch (ServerException e) {
}
}
public Set<UmaPendingRequest> queryPendingRequests(String resourceOwnerId, String realm) throws ResourceException {
try {
} catch (ServerException e) {
throw new InternalServerErrorException("Failed to query pending request for resource owner, "
+ resourceOwnerId, e); //TODO be consistent with exception types
}
}
public Set<UmaPendingRequest> queryPendingRequests(String resourceSetId, String resourceOwnerId, String realm,
));
}
try {
//TODO email RqP
}
auditLogger.log(request.getResourceSetId(), request.getResourceSetName(), request.getResourceOwnerId(),
} catch (NotFoundException e) {
throw new org.forgerock.json.resource.NotFoundException("Pending request, " + id + ", not found", e);
} catch (ServerException e) {
throw new InternalServerErrorException("Failed to mark pending request, " + id + ", as approved", e);
}
}
try {
auditLogger.log(request.getResourceSetId(), request.getResourceSetName(), request.getResourceOwnerId(),
} catch (NotFoundException e) {
throw new org.forgerock.json.resource.NotFoundException("Pending request, " + id + ", not found", e);
} catch (ServerException e) {
}
}
private boolean isEmailResourceOwnerOnPendingRequestCreationEnabled(String realm) throws ServerException {
try {
throw new ServerException("Failed to read UMA Provider settings", e);
}
}
private boolean isEmailRequestingPartyOnPendingRequestApprovalEnabled(String realm) throws ServerException {
try {
throw new ServerException("Failed to read UMA Provider settings", e);
}
}
}