All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.yawp.servlet.rest.CustomRestAction Maven / Gradle / Ivy

There is a newer version: 2.08alpha
Show newest version
package io.yawp.servlet.rest;

import io.yawp.commons.http.JsonResponse;
import io.yawp.commons.http.StatusObject;

public class CustomRestAction extends RestAction {

	public CustomRestAction() {
		super("custom");
	}

	@Override
	public void shield() {
		shield.protectCustom();
	}

	@Override
	public Object action() {
		Object object = r.action(id, endpointClazz, customActionKey, params);

		if (object == null) {
			return new JsonResponse(StatusObject.success().toJson());
		}

		applyGetFacade(object);
		if (hasTransformer()) {
			return transform(object);
		}

		return object;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy