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

org.nakedobjects.metamodel.facets.disable.DisableForContextFacetAbstract Maven / Gradle / Ivy

There is a newer version: 4.0-beta-1
Show newest version
package org.nakedobjects.metamodel.facets.disable;

import org.nakedobjects.applib.events.UsabilityEvent;
import org.nakedobjects.metamodel.adapter.NakedObject;
import org.nakedobjects.metamodel.facets.Facet;
import org.nakedobjects.metamodel.facets.FacetAbstract;
import org.nakedobjects.metamodel.facets.FacetHolder;
import org.nakedobjects.metamodel.interactions.UsabilityContext;


public abstract class DisableForContextFacetAbstract extends FacetAbstract implements DisableForContextFacet {

    public static Class type() {
        return DisableForContextFacet.class;
    }

    public DisableForContextFacetAbstract(final FacetHolder holder) {
        super(type(), holder, false);
    }

    public String disables(final UsabilityContext ic) {
        final NakedObject target = ic.getTarget();
        return disabledReason(target);
    }

}

// Copyright (c) Naked Objects Group Ltd.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy