Class CodesService
java.lang.Object
edu.suffolk.litlab.efsp.server.services.CodesService
- Direct Known Subclasses:
CourtsOnlyCodesService,EcfCodesService
The endpoints for the court specific configurations that clients need to use to file properly.
"Codes" is short for genericodes, a XML standard that ECF uses to communicate these
configurations to EFSPs, and we use it to refer to any such court configurations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static jakarta.ws.rs.core.Responsecors(jakarta.ws.rs.core.Response.ResponseBuilder rb) Adds proper CORS headers to all responses to the codes API, which is publicabstract jakarta.ws.rs.core.ResponsegetAll()abstract jakarta.ws.rs.core.ResponsegetAllowedFileTypes(String courtId) abstract jakarta.ws.rs.core.ResponsegetAllPartyTypes(String courtId) Used for when you need to populate the party types names for a case search or something similarabstract jakarta.ws.rs.core.ResponsegetCaseSubtypes(String courtId, String caseTypeId) abstract jakarta.ws.rs.core.ResponsegetCaseTypes(String courtId, String categoryId, String timing) abstract jakarta.ws.rs.core.ResponsegetCategories(String courtId, boolean fileableOnly, String timing) abstract jakarta.ws.rs.core.ResponsegetCategoryByCode(String courtId, String catCode) abstract jakarta.ws.rs.core.ResponsegetCodesUnderCourt(String courtId) abstract jakarta.ws.rs.core.ResponsegetCourtLocationCodes(String courtId) abstract jakarta.ws.rs.core.ResponsegetCourts(jakarta.ws.rs.core.HttpHeaders httpHeaders, boolean fileable, boolean withNames) abstract jakarta.ws.rs.core.ResponsegetCrossReferences(String courtId, String caseTypeId) abstract jakarta.ws.rs.core.ResponsegetCrossReferencesOld(String courtId, String caseTypeId) Deprecated.abstract jakarta.ws.rs.core.ResponsegetDamageAmounts(String courtId, String categoryId) abstract jakarta.ws.rs.core.ResponsegetDataField(String courtId, String fieldName) abstract jakarta.ws.rs.core.ResponsegetDataFields(String courtId) abstract jakarta.ws.rs.core.ResponsegetDisclaimerRequirements(String courtId) abstract jakarta.ws.rs.core.ResponsegetDocumentTypes(String courtId, String filingCodeId) abstract jakarta.ws.rs.core.ResponsegetFilerTypes(String courtId) abstract jakarta.ws.rs.core.ResponsegetFilingComponents(String courtId, String filingCodeId) abstract jakarta.ws.rs.core.ResponsegetFilingStatuses(String courtId) abstract jakarta.ws.rs.core.ResponsegetFilingTypes(String courtId, String categoryId, String typeId, boolean initial) abstract jakarta.ws.rs.core.ResponsegetLanguages(String courtId) abstract jakarta.ws.rs.core.ResponsegetMotionTypes(String courtId, String filingCodeId) abstract jakarta.ws.rs.core.ResponsegetNameSuffixes(String courtId) abstract jakarta.ws.rs.core.ResponsegetOptionalService(String courtId, String optServCode) abstract jakarta.ws.rs.core.ResponsegetOptionalServices(String courtId, String filingCodeId) abstract jakarta.ws.rs.core.ResponsegetPartyType(String courtId, String caseTypeId, String partyTypeId) abstract jakarta.ws.rs.core.ResponsegetPartyTypeFromAll(String courtId, String partyTypeId) abstract jakarta.ws.rs.core.ResponsegetPartyTypes(String courtId, String caseTypeId) abstract jakarta.ws.rs.core.ResponsegetProcedureOrRemedies(String courtId, String categoryId) abstract jakarta.ws.rs.core.ResponsegetServiceTypes(String courtId) abstract jakarta.ws.rs.core.Responsejakarta.ws.rs.core.Responseoptions()
-
Constructor Details
-
CodesService
public CodesService()
-
-
Method Details
-
getAll
@GET @Path("/") @Produces("application/json") public abstract jakarta.ws.rs.core.Response getAll() -
getCourts
@GET @Path("/courts") public abstract jakarta.ws.rs.core.Response getCourts(@Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @DefaultValue("false") @QueryParam("fileable_only") boolean fileable, @DefaultValue("false") @QueryParam("with_names") boolean withNames) -
getCodesUnderCourt
@GET @Path("/courts/{court_id}") public abstract jakarta.ws.rs.core.Response getCodesUnderCourt(@PathParam("court_id") String courtId) -
getCourtLocationCodes
@GET @Path("/courts/{court_id}/codes") public abstract jakarta.ws.rs.core.Response getCourtLocationCodes(@PathParam("court_id") String courtId) -
getCategories
@GET @Path("/courts/{court_id}/categories") public abstract jakarta.ws.rs.core.Response getCategories(@PathParam("court_id") String courtId, @DefaultValue("false") @QueryParam("fileable_only") boolean fileableOnly, @QueryParam("timing") String timing) throws SQLException - Throws:
SQLException
-
getCategoryByCode
@GET @Path("/courts/{court_id}/categories/{cat_code}") public abstract jakarta.ws.rs.core.Response getCategoryByCode(@PathParam("court_id") String courtId, @PathParam("cat_code") String catCode) throws SQLException - Throws:
SQLException
-
getCaseTypes
@GET @Path("/courts/{court_id}/case_types") public abstract jakarta.ws.rs.core.Response getCaseTypes(@PathParam("court_id") String courtId, @QueryParam("category_id") String categoryId, @QueryParam("timing") String timing) throws SQLException - Throws:
SQLException
-
getNameSuffixes
@GET @Path("/courts/{court_id}/name_suffixes") public abstract jakarta.ws.rs.core.Response getNameSuffixes(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getCaseSubtypes
@GET @Path("/courts/{court_id}/case_types/{case_type_id}/case_subtypes") public abstract jakarta.ws.rs.core.Response getCaseSubtypes(@PathParam("court_id") String courtId, @PathParam("case_type_id") String caseTypeId) throws SQLException - Throws:
SQLException
-
getServiceTypes
@GET @Path("/courts/{court_id}/service_types") public abstract jakarta.ws.rs.core.Response getServiceTypes(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getProcedureOrRemedies
@GET @Path("/courts/{court_id}/procedures_or_remedies") public abstract jakarta.ws.rs.core.Response getProcedureOrRemedies(@PathParam("court_id") String courtId, @QueryParam("category_id") String categoryId) throws SQLException - Throws:
SQLException
-
getFilingTypes
@GET @Path("/courts/{court_id}/filing_types") public abstract jakarta.ws.rs.core.Response getFilingTypes(@PathParam("court_id") String courtId, @QueryParam("category_id") String categoryId, @QueryParam("type_id") String typeId, @QueryParam("initial") boolean initial) throws SQLException - Parameters:
courtId- The court id where these filing types are present.categoryId- (optional) used to filter by filing types that can only be used with this case category.typeId- (optional) used to filter by filing types that can only be used with this case typeinitial- if true, shows filing types that can be used on initial filings (or initial and subsequent filings). If false, shows filings that can be used on subsequent filings.- Returns:
- The filing info
- Throws:
SQLException- An example of the JSON response from this endpoint.
- application/json { "code": "29217", "name": "Proposed Order", "fee": "", "casecategory": "", "casetypeid": "", "filingtype": "Both", "iscourtuseonly": false, "civilclaimamount": "Not Available", "probateestateamount": "Not Available", "amountincontroversy": "Not Available", "useduedate": false, "isproposedorder": false, "efspcode": "", "location": "adams" }
-
getFilerTypes
@GET @Path("/courts/{court_id}/filer_types") public abstract jakarta.ws.rs.core.Response getFilerTypes(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getDamageAmounts
@GET @Path("/courts/{court_id}/damage_amounts") public abstract jakarta.ws.rs.core.Response getDamageAmounts(@PathParam("court_id") String courtId, @QueryParam("category_id") String categoryId) throws SQLException - Throws:
SQLException
-
getAllPartyTypes
@GET @Path("/courts/{court_id}/party_types") public abstract jakarta.ws.rs.core.Response getAllPartyTypes(@PathParam("court_id") String courtId) throws SQLException Used for when you need to populate the party types names for a case search or something similar- Parameters:
courtId-- Returns:
- Throws:
SQLException
-
getPartyTypeFromAll
@GET @Path("/courts/{court_id}/party_types/{party_type_id}") public abstract jakarta.ws.rs.core.Response getPartyTypeFromAll(@PathParam("court_id") String courtId, @PathParam("party_type_id") String partyTypeId) throws SQLException - Throws:
SQLException
-
getPartyTypes
@GET @Path("/courts/{court_id}/case_types/{case_type_id}/party_types") public abstract jakarta.ws.rs.core.Response getPartyTypes(@PathParam("court_id") String courtId, @PathParam("case_type_id") String caseTypeId) throws SQLException - Throws:
SQLException
-
getPartyType
@GET @Path("/courts/{court_id}/case_types/{case_type_id}/party_types/{party_type_id}") public abstract jakarta.ws.rs.core.Response getPartyType(@PathParam("court_id") String courtId, @PathParam("case_type_id") String caseTypeId, @PathParam("party_type_id") String partyTypeId) throws SQLException - Throws:
SQLException
-
getCrossReferencesOld
@GET @Path("/courts/{court_id}/casetypes/{case_type_id}/cross_references") @Deprecated public abstract jakarta.ws.rs.core.Response getCrossReferencesOld(@PathParam("court_id") String courtId, @PathParam("case_type_id") String caseTypeId) throws SQLException Deprecated.- Throws:
SQLException
-
getCrossReferences
@GET @Path("/courts/{court_id}/case_types/{case_type_id}/cross_references") public abstract jakarta.ws.rs.core.Response getCrossReferences(@PathParam("court_id") String courtId, @PathParam("case_type_id") String caseTypeId) throws SQLException - Throws:
SQLException
-
getDocumentTypes
@GET @Path("/courts/{court_id}/filing_types/{filing_code_id}/document_types") public abstract jakarta.ws.rs.core.Response getDocumentTypes(@PathParam("court_id") String courtId, @PathParam("filing_code_id") String filingCodeId) throws SQLException - Throws:
SQLException
-
getMotionTypes
@GET @Path("/courts/{court_id}/filing_types/{filing_code_id}/motion_types") public abstract jakarta.ws.rs.core.Response getMotionTypes(@PathParam("court_id") String courtId, @PathParam("filing_code_id") String filingCodeId) throws SQLException - Throws:
SQLException
-
getAllowedFileTypes
@GET @Path("/courts/{court_id}/allowed_file_types") public abstract jakarta.ws.rs.core.Response getAllowedFileTypes(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getFilingStatuses
@GET @Path("/courts/{court_id}/filing_statuses") public abstract jakarta.ws.rs.core.Response getFilingStatuses(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getFilingComponents
@GET @Path("/courts/{court_id}/filing_types/{filing_code_id}/filing_components") public abstract jakarta.ws.rs.core.Response getFilingComponents(@PathParam("court_id") String courtId, @PathParam("filing_code_id") String filingCodeId) throws SQLException - Throws:
SQLException
-
getOptionalServices
@GET @Path("/courts/{court_id}/filing_types/{filing_code_id}/optional_services") public abstract jakarta.ws.rs.core.Response getOptionalServices(@PathParam("court_id") String courtId, @PathParam("filing_code_id") String filingCodeId) throws SQLException - Throws:
SQLException
-
getStates
@GET @Path("/courts/{court_id}/countries/{country}/states") public abstract jakarta.ws.rs.core.Response getStates(@PathParam("court_id") String courtId, @PathParam("country") String country) throws SQLException - Throws:
SQLException
-
getLanguages
@GET @Path("/courts/{court_id}/languages") public abstract jakarta.ws.rs.core.Response getLanguages(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getDataFields
@GET @Path("/courts/{court_id}/datafields") public abstract jakarta.ws.rs.core.Response getDataFields(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
getDataField
@GET @Path("/courts/{court_id}/datafields/{field_name}") public abstract jakarta.ws.rs.core.Response getDataField(@PathParam("court_id") String courtId, @PathParam("field_name") String fieldName) throws SQLException - Throws:
SQLException
-
getOptionalService
@GET @Path("/courts/{court_id}/optional_services/{opt_serv_code}") public abstract jakarta.ws.rs.core.Response getOptionalService(@PathParam("court_id") String courtId, @PathParam("opt_serv_code") String optServCode) throws SQLException - Throws:
SQLException
-
getDisclaimerRequirements
@GET @Path("/courts/{court_id}/disclaimer_requirements") public abstract jakarta.ws.rs.core.Response getDisclaimerRequirements(@PathParam("court_id") String courtId) throws SQLException - Throws:
SQLException
-
cors
protected static jakarta.ws.rs.core.Response cors(jakarta.ws.rs.core.Response.ResponseBuilder rb) Adds proper CORS headers to all responses to the codes API, which is publicSee https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS and https://stackoverflow.com/a/28996470/11416267.
-
options
@OPTIONS @Path("{path : .*}") public jakarta.ws.rs.core.Response options()
-