Package be.c4j.ee.security.view.component.secured

Examples of be.c4j.ee.security.view.component.secured.SecuredComponentData


     * @return Is it allowed to show this component to the user.
     */
    public boolean allowed(final UIComponent someUiComponent) {

        boolean result = true;
        SecuredComponentData data = (SecuredComponentData) someUiComponent.getAttributes().get(SecuredComponent.DATA);
        if (data != null) {
            result = componentAuthorizationService.hasAccess(data);
        }
        return result;
    }
View Full Code Here


        return true;
    }

    @Override
    public void processEvent(SystemEvent event) {
        SecuredComponentData data = (SecuredComponentData) component.getAttributes().get(SecuredComponent.DATA);
        if (data == null) {
            // We have a PreRenderViewEvent defined in the screen.
            return;
        }
        List<UIComponent> targets = ComponentUtil.findTargets(component, component.getParent(), data.getTargets());
        if (component.getAttributes().containsKey(SecuredComponent.MARKER)) {
            for (UIComponent targetComponent : targets) {
                SecuredComponentData dataForTarget = new SecuredComponentData(data);
                dataForTarget.setTargetComponent(targetComponent);

                ComponentUtil.setNoAccess(targetComponent, dataForTarget);
            }
        } else {
            for (UIComponent targetComponent : targets) {
View Full Code Here

TOP

Related Classes of be.c4j.ee.security.view.component.secured.SecuredComponentData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.