Skip to content

Commit

Permalink
ViewRowAttributesRestController_OLD: assertDeprecatedRestAPIAllowed
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Nov 29, 2017
1 parent fc59ef2 commit 659521f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import de.metas.ui.web.session.UserSession;
import de.metas.ui.web.view.json.JSONViewRowAttributes;
import de.metas.ui.web.view.json.JSONViewRowAttributesLayout;
import de.metas.ui.web.window.datatypes.json.JSONDocument;
Expand Down Expand Up @@ -52,6 +53,9 @@ public class ViewRowAttributesRestController_OLD
private static final String PARAM_RowId = "rowId";
/* package */static final String ENDPOINT = ViewRestController.ENDPOINT + "/{" + PARAM_ViewId + "}/{" + PARAM_RowId + "}";

@Autowired
private UserSession userSession;

@Autowired
private ViewRowAttributesRestController delegate;

Expand All @@ -62,6 +66,7 @@ public JSONViewRowAttributesLayout getAttributesLayout(
, @PathVariable(PARAM_RowId) final String rowIdStr //
)
{
userSession.assertDeprecatedRestAPIAllowed();
return delegate.getAttributesLayout(windowIdStr, viewIdStr, rowIdStr);
}

Expand All @@ -72,6 +77,7 @@ public JSONViewRowAttributes getData(
, @PathVariable(PARAM_RowId) final String rowIdStr //
)
{
userSession.assertDeprecatedRestAPIAllowed();
return delegate.getData(windowIdStr, viewIdStr, rowIdStr);
}

Expand All @@ -83,6 +89,7 @@ public List<JSONDocument> processChanges(
, @RequestBody final List<JSONDocumentChangedEvent> events //
)
{
userSession.assertDeprecatedRestAPIAllowed();
return delegate.processChanges(windowIdStr, viewIdStr, rowIdStr, events);
}

Expand All @@ -95,6 +102,7 @@ public JSONLookupValuesList getAttributeTypeahead(
, @RequestParam(name = "query", required = true) final String query //
)
{
userSession.assertDeprecatedRestAPIAllowed();
return delegate.getAttributeTypeahead(windowIdStr, viewIdStr, rowIdStr, attributeName, query);
}

Expand All @@ -106,6 +114,7 @@ public JSONLookupValuesList getAttributeDropdown(
, @PathVariable("attributeName") final String attributeName //
)
{
userSession.assertDeprecatedRestAPIAllowed();
return delegate.getAttributeDropdown(windowIdStr, viewIdStr, rowIdStr, attributeName);
}
}

0 comments on commit 659521f

Please sign in to comment.