Package org.apache.slide.structure

Examples of org.apache.slide.structure.ActionNode


        Map actionAggregation = ((SecurityImpl)nsaToken.getSecurityHelper()).getActionAggregation();
        Set rootSet = new HashSet(actionAggregation.keySet());
        Map work = new HashMap();
        Iterator actions = actionAggregation.keySet().iterator();
        while (actions.hasNext()) {
            ActionNode a = (ActionNode)actions.next();
            Element sp = new Element(E_SUPPORTED_PRIVILEGE, DNSP);
            Element p = new Element(E_PRIVILEGE, DNSP);
            p.addContent(new Element(a.getPath().lastSegment(), DNSP));
            sp.addContent(p);
            work.put(a, sp);
        }
        actions = actionAggregation.keySet().iterator();
        while (actions.hasNext()) {
            ActionNode a = (ActionNode)actions.next();
            Iterator aggregates = ((Set)actionAggregation.get(a)).iterator();
            while (aggregates.hasNext()) {
                ActionNode c = (ActionNode)aggregates.next();
                ((Element)work.get(a)).addContent((Element)work.get(c));
                rootSet.remove(c);
            }
        }
        Element rootSp = new Element(E_SUPPORTED_PRIVILEGE, DNSP);
View Full Code Here


            String actionsPath = config.getActionsPath();
            Uri actionsPathUri = nsaToken.getUri(sToken, actionsPath);
            ObjectNode actionsPathNode = actionsPathUri.getStore().retrieveObject(actionsPathUri);
            Enumeration actions = actionsPathNode.enumerateChildren();
            while (actions.hasMoreElements()) {
                ActionNode aNode = ActionNode.getActionNode((String)actions.nextElement());
                if (security.hasPermission(sToken, object, aNode)) {
                    xmlValue.add(createPrivilege(aNode.getPath().lastSegment()));
                }
            }
        }
        catch (ServiceAccessException e) {
            throw e;
View Full Code Here

        SubjectNode matchSubject = SubjectNode.getSubjectNode(matchToken.getSubjectUri());
        boolean condition2 =
            securityHelper.matchPrincipal(slideToken, checkSubject, matchSubject);
       
        // lock-types-are-equal OR lock-type-of-matchToken-is-parent
        ActionNode checkAction = ActionNode.getActionNode(checkToken.getTypeUri());
        ActionNode matchAction = ActionNode.getActionNode(matchToken.getTypeUri());
        boolean condition3 =
            securityHelper.matchAction(slideToken, checkAction, matchAction);
       
        // checkToken-is-exclusive
        boolean condition4 = checkToken.isExclusive();
View Full Code Here

            String actionsPath = namespaceConfig.getActionsPath();
            Uri actionsPathUri = namespace.getUri(actionsPath);
            ObjectNode actionsPathNode = actionsPathUri.getStore().retrieveObject(actionsPathUri);
            Enumeration actions = actionsPathNode.enumerateChildren();
            while (actions.hasMoreElements()) {
                ActionNode aNode = ActionNode.getActionNode((String)actions.nextElement());
                Set directAggregates = getActionAggregates(aNode);
                actionAggregation.put(aNode, directAggregates);
                Set aClosure = new HashSet();
                aClosure.add(aNode);
                aClosure.addAll(directAggregates);
                actionAggregationClosure.put(aNode, aClosure);
            }
            Iterator keys = actionAggregationClosure.keySet().iterator();
            while (keys.hasNext()) {
                ActionNode aNode = (ActionNode)keys.next();
                Set aClosure = (Set)actionAggregationClosure.get(aNode);
                actionAggregationClosure.put(aNode, buildClosure(aClosure));
            }
            // log success
            if (logger.isEnabled(LOG_CHANNEL, Logger.INFO)) {
View Full Code Here

        this.content = nsaToken.getContentHelper();
        this.structure = nsaToken.getStructureHelper();
        this.macro = nsaToken.getMacroHelper();
        this.lock = nsaToken.getLockHelper();
        this.pHelp = PropertyHelper.getPropertyHelper( sToken, nsaToken, sConf );
        ActionNode actionNode = nsaToken.getNamespaceConfig().getModifyRevisionMetadataAction();
        if (actionNode != null) {
            modifyMetadataUri = actionNode.getUri();
        }
        else {
            modifyMetadataUri = "";
        }
        actionNode = nsaToken.getNamespaceConfig().getModifyRevisionContentAction();
        if (actionNode != null) {
            modifyContentUri = actionNode.getUri();
        }
        else {
            modifyContentUri = "";
        }
        serverURL = "http://" + req.getServerName()+ ":" + req.getServerPort();
View Full Code Here

                (namespace, e.getMessage());
        }
    }
   
    private ActionNode getConfiguredNode(Namespace namespace, Configuration config, String nodeName) throws SlideException {
        ActionNode result = null;
        try {
            result = getActionNode(namespace, config.getConfiguration( nodeName).getValue());
        } catch (ConfigurationException e) {
            result = getDefaultAction();
        }
View Full Code Here

     * @param actionPath Path of the action
     */
    protected ActionNode getActionNode(Namespace namespace, String actionPath)
        throws InvalidNamespaceConfigurationException, SlideException {
       
        ActionNode result = null;
       
        if (actionPath != null) {
            Uri actionUri = namespace.getUri(actionPath);
            result = (ActionNode) actionUri.getStore()
                .retrieveObject(actionUri);
View Full Code Here

        this.pHelp = PropertyHelper.getPropertyHelper( sToken, nsaToken, sConf );
        this.slideContextPath = req.getContextPath();
        if (!sConf.isDefaultServlet()) {
            this.slideContextPath += req.getServletPath();
        }
        ActionNode actionNode = nsaToken.getNamespaceConfig().getModifyRevisionMetadataAction();
        if (actionNode != null) {
            modifyMetadataUri = actionNode.getUri();
        }
        else {
            modifyMetadataUri = "";
        }
        actionNode = nsaToken.getNamespaceConfig().getModifyRevisionContentAction();
        if (actionNode != null) {
            modifyContentUri = actionNode.getUri();
        }
        else {
            modifyContentUri = "";
        }
        //serverURL = "http://" + req.getServerName()+ ":" + req.getServerPort();
View Full Code Here

                (namespace, e.getMessage());
        }
    }
   
    private ActionNode getConfiguredNode(Namespace namespace, Configuration config, String nodeName) throws SlideException {
        ActionNode result = null;
        try {
            result = getActionNode(namespace, config.getConfiguration( nodeName).getValue());
        } catch (ConfigurationException e) {
            result = getDefaultAction();
        }
View Full Code Here

     * @param actionPath Path of the action
     */
    protected ActionNode getActionNode(Namespace namespace, String actionPath)
        throws InvalidNamespaceConfigurationException, SlideException {
       
        ActionNode result = null;
       
        if (actionPath != null) {
            Uri actionUri = namespace.getUri(actionPath);
            result = (ActionNode) actionUri.getStore()
                .retrieveObject(actionUri);
View Full Code Here

TOP

Related Classes of org.apache.slide.structure.ActionNode

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.