use of org.entando.entando.aps.system.services.api.model.ApiResource in project entando-core by entando.
the class ApiResourceAction method updateAllMethodStatus.
public String updateAllMethodStatus() {
try {
ApiResource resource = this.getApiResource();
String requiredAuthority = this.getRequest().getParameter("methodAuthority");
String active = this.getRequest().getParameter("active");
String hidden = this.getRequest().getParameter("hidden");
if (null == requiredAuthority) {
// TODO MANAGE
return SUCCESS;
}
this.updateMethodStatus(resource.getGetMethod(), requiredAuthority, active, hidden);
this.updateMethodStatus(resource.getPostMethod(), requiredAuthority, active, hidden);
this.updateMethodStatus(resource.getPutMethod(), requiredAuthority, active, hidden);
this.updateMethodStatus(resource.getDeleteMethod(), requiredAuthority, active, hidden);
} catch (Throwable t) {
_logger.error("Error updating all method status", t);
// ApsSystemUtils.logThrowable(t, this, "updateAllMethodStatus", "Error updating all method status");
return FAILURE;
}
return SUCCESS;
}
use of org.entando.entando.aps.system.services.api.model.ApiResource in project entando-core by entando.
the class ApiResourceAction method checkMethod.
private String checkMethod() throws Throwable {
if (null == this.extractMethod()) {
ApiResource resource = this.getApiResource();
this.addActionError(this.getText("error.resource.method.invalid", new String[] { resource.getCode(), this.getHttpMethod().toString() }));
}
return null;
}
Aggregations