Class CCureMockServiceHandler
java.lang.Object
edu.internet2.middleware.grouper.j2ee.MockServiceHandler
edu.internet2.middleware.grouper.app.ccure.CCureMockServiceHandler
Simulates the CCure Web Service API for tests (URL /grouper/mockServices/ccure/...); requests
are dispatched by HTTP method + path. This implementation was developed against the CCure
API version 2.9.
Personnel and Clearance records have no create endpoint in Grouper's CCure provisioner (people and
badges are provisioned outside of Grouper), so those two mock tables (mock_ccure_personnel and
mock_ccure_clearance) start empty and must be seeded directly (e.g. via Hibernate) by whatever is
testing against this mock.
Implemented (the operations the real client, CCureApiCommands, actually calls):
POST /api/Authenticate/Login -> login
POST /api/Authenticate/Logout -> logout
GET /api/Objects/Get/{type}/{id} -> getObject
GET /api/Objects/GetAll/{type} -> getAllObjects
POST /api/Objects/GetAllWithCriteria -> findObjectsWithCriteria
POST /api/Objects/PersistToContainer -> persistToContainer
POST /api/Objects/RemoveFromContainer -> removeFromContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionsensitive headers not to logsensitive parameters not to log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreate the mock tables if they are not already present.voidhandleRequest(MockServiceRequest mockServiceRequest, MockServiceResponse mockServiceResponse)
-
Field Details
-
doNotLogParameters
sensitive parameters not to log -
doNotLogHeaders
sensitive headers not to log
-
-
Constructor Details
-
CCureMockServiceHandler
public CCureMockServiceHandler()
-
-
Method Details
-
doNotLogParameters
- Overrides:
doNotLogParametersin classMockServiceHandler
-
doNotLogHeaders
- Overrides:
doNotLogHeadersin classMockServiceHandler
-
handleRequest
public void handleRequest(MockServiceRequest mockServiceRequest, MockServiceResponse mockServiceResponse) - Specified by:
handleRequestin classMockServiceHandler
-
ensureCcureMockTables
public static void ensureCcureMockTables()Create the mock tables if they are not already present.
-