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

org.nakedobjects.noa.reflect.checks.CheckNakedObjectActionInstanceNotDisabledDeclaratively Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.noa.reflect.checks;

import org.nakedobjects.noa.adapter.Naked;
import org.nakedobjects.noa.annotations.DisabledAnnotation;
import org.nakedobjects.noa.reflect.NakedObjectActionInstance;

/**
 * Checks that the {@link NakedObjectActionInstance} is not annotated
 * with the @Disabled annotation (or equivalent).
 * 
 */
public class CheckNakedObjectActionInstanceNotDisabledDeclaratively extends AbstractCheckNakedObjectActionInstance {
    
    public CheckNakedObjectActionInstanceNotDisabledDeclaratively(
            NakedObjectActionInstance nakedObjectActionInstance) {
        super(nakedObjectActionInstance);
    }

    public String check(
            Naked[] values) {
        //return !getNakedObjectActionInstance().getNakedObjectAction().isProtected();
        return hasAnnotation(getNakedObjectActionInstance(), DisabledAnnotation.class)?"Disabled":null;
    }


    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy