Skip to content

Commit

Permalink
WindowRestController: removed deprecated "attribute" endpoints (keepi…
Browse files Browse the repository at this point in the history
…ng only "field")

#409
  • Loading branch information
teosarca committed May 25, 2017
1 parent 2196834 commit 90db04a
Showing 1 changed file with 0 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,21 +397,6 @@ public JSONLookupValuesList getDocumentFieldTypeahead(
return getDocumentFieldTypeahead(documentPath, fieldName, query);
}

@GetMapping("/{windowId}/{documentId}/attribute/{fieldName}/typeahead")
@Deprecated
public JSONLookupValuesList getDocumentFieldTypeahead_DEPRECATED(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
, @PathVariable("fieldName") final String fieldName //
, @RequestParam(name = "query", required = true) final String query //
)
{
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentPath documentPath = DocumentPath.rootDocumentPath(windowId, documentId);
return getDocumentFieldTypeahead(documentPath, fieldName, query);
}


/**
* Typeahead for included document's field
*/
Expand All @@ -430,26 +415,6 @@ public JSONLookupValuesList getDocumentFieldTypeahead(
return getDocumentFieldTypeahead(documentPath, fieldName, query);
}

/**
* Typeahead for included document's field
*/
@GetMapping(value = "/{windowId}/{documentId}/{tabId}/{rowId}/attribute/{fieldName}/typeahead")
@Deprecated
public JSONLookupValuesList getDocumentFieldTypeahead_DEPRECATED(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
, @PathVariable("tabId") final String tabId //
, @PathVariable("rowId") final String rowId //
, @PathVariable("fieldName") final String fieldName //
, @RequestParam(name = "query", required = true) final String query //
)
{
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentPath documentPath = DocumentPath.includedDocumentPath(windowId, documentId, tabId, rowId);
return getDocumentFieldTypeahead(documentPath, fieldName, query);
}


/** Typeahead: unified implementation */
private JSONLookupValuesList getDocumentFieldTypeahead(final DocumentPath documentPath, final String fieldName, final String query)
{
Expand All @@ -472,20 +437,6 @@ public JSONLookupValuesList getDocumentFieldDropdown(
return getDocumentFieldDropdown(documentPath, fieldName);
}

@GetMapping("/{windowId}/{documentId}/attribute/{fieldName}/dropdown")
@Deprecated
public JSONLookupValuesList getDocumentFieldDropdown_DEPRECATED(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
, @PathVariable("fieldName") final String fieldName //
)
{
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentPath documentPath = DocumentPath.rootDocumentPath(windowId, documentId);
return getDocumentFieldDropdown(documentPath, fieldName);
}


@GetMapping("/{windowId}/{documentId}/{tabId}/{rowId}/field/{fieldName}/dropdown")
public JSONLookupValuesList getDocumentFieldDropdown(
@PathVariable("windowId") final String windowIdStr //
Expand All @@ -500,22 +451,6 @@ public JSONLookupValuesList getDocumentFieldDropdown(
return getDocumentFieldDropdown(documentPath, fieldName);
}

@GetMapping("/{windowId}/{documentId}/{tabId}/{rowId}/attribute/{fieldName}/dropdown")
@Deprecated
public JSONLookupValuesList getDocumentFieldDropdown_DEPRECATED(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
, @PathVariable("tabId") final String tabId //
, @PathVariable("rowId") final String rowId //
, @PathVariable("fieldName") final String fieldName //
)
{
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentPath documentPath = DocumentPath.includedDocumentPath(windowId, documentId, tabId, rowId);
return getDocumentFieldDropdown(documentPath, fieldName);
}


private JSONLookupValuesList getDocumentFieldDropdown(final DocumentPath documentPath, final String fieldName)
{
userSession.assertLoggedIn();
Expand All @@ -538,21 +473,6 @@ public JSONZoomInto getDocumentFieldZoomInto(
return getDocumentFieldZoomInto(documentPath, fieldName);
}

@ApiOperation("field current value's window layout to zoom into")
@GetMapping("/{windowId}/{documentId}/attribute/{fieldName}/zoomInto")
@Deprecated
public JSONZoomInto getDocumentFieldZoomInto_DEPRECATED(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
, @PathVariable("fieldName") final String fieldName //
)
{
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentPath documentPath = DocumentPath.rootDocumentPath(windowId, documentId);
return getDocumentFieldZoomInto(documentPath, fieldName);
}


@ApiOperation("field current value's window layout to zoom into")
@GetMapping("/{windowId}/{documentId}/{tabId}/{rowId}/field/{fieldName}/zoomInto")
public JSONZoomInto getDocumentFieldZoomInto(
Expand All @@ -568,23 +488,6 @@ public JSONZoomInto getDocumentFieldZoomInto(
return getDocumentFieldZoomInto(documentPath, fieldName);
}

@ApiOperation("field current value's window layout to zoom into")
@GetMapping("/{windowId}/{documentId}/{tabId}/{rowId}/attribute/{fieldName}/zoomInto")
@Deprecated
public JSONZoomInto getDocumentFieldZoomInto_DEPRECATED(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
, @PathVariable("tabId") final String tabId //
, @PathVariable("rowId") final String rowId //
, @PathVariable("fieldName") final String fieldName //
)
{
final WindowId windowId = WindowId.fromJson(windowIdStr);
final DocumentPath documentPath = DocumentPath.includedDocumentPath(windowId, documentId, tabId, rowId);
return getDocumentFieldZoomInto(documentPath, fieldName);
}


private JSONZoomInto getDocumentFieldZoomInto(final DocumentPath documentPath, final String fieldName)
{
userSession.assertLoggedIn();
Expand Down

0 comments on commit 90db04a

Please sign in to comment.