Examples of PrincipalRule


Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                                String locatorName = ((PrincipalRule) ruleMap
                                        .get("rule")).getLocatorName();
                                for (Iterator ruleIter = rules.iterator(); ruleIter
                                        .hasNext();)
                                {
                                    PrincipalRule rule = (PrincipalRule) ruleIter
                                            .next();
                                    if (rule.getLocatorName().equals(
                                            locatorName))
                                    {
                                        getServiceLocator().getProfiler()
                                                .deletePrincipalRule(rule);
                                        getServiceLocator()
                                                .getAuditActivity()
                                                .logAdminAuthorizationActivity(
                                                        getPortletRequest()
                                                                .getUserPrincipal()
                                                                .getName(),
                                                        getIPAddress(),
                                                        getSelectedPrincipal(),
                                                        AuditActivity.USER_DELETE_PROFILE,
                                                        rule.getProfilingRule()
                                                                .getId()
                                                                + "-"
                                                                + rule
                                                                        .getLocatorName(),
                                                        AdminPortletWebPage.USER_ADMINISTRATION);
                                    }
                                }
                            }
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                {
                    for (Iterator it = getServiceLocator().getProfiler()
                            .getRulesForPrincipal(getPrincipal()).iterator(); it
                            .hasNext();)
                    {
                        PrincipalRule rule = (PrincipalRule) it.next();
                        Map ruleMap = new HashMap();
                        ruleMap.put("rule", rule);
                        ruleMap.put("checked", Boolean.FALSE);
                        this.userRules.add(ruleMap);
                    }
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                    try
                    {
                        Iterator it = rules.iterator();
                        while (it.hasNext())
                        {
                            PrincipalRule rule = (PrincipalRule)it.next();
                            if (rule.getLocatorName().equals(locatorNames[ix]))
                            {
                                profiler.deletePrincipalRule(rule);
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                    try
                    {
                        Iterator it = rules.iterator();
                        while (it.hasNext())
                        {
                            PrincipalRule rule = (PrincipalRule)it.next();
                            if (rule.getLocatorName().equals(locatorNames[ix]))
                            {
                                profiler.deletePrincipalRule(rule);
                                audit.logAdminAuthorizationActivity(actionRequest.getUserPrincipal().getName(), getIPAddress(actionRequest), userName, AuditActivity.USER_DELETE_PROFILE, rule.getProfilingRule().getId() + "-" + rule.getLocatorName(), USER_ADMINISTRATION);                                                                                                                                                       
                            }
                        }
                    }
                    catch (Exception e)
                    {
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                    JSPrincipalRule pr = (JSPrincipalRule) _itRoles.next();
                    ProfilingRule pRule = pm.getRule(pr.getRule());
                   
                    try
                    {
                      PrincipalRule p1 = pm.createPrincipalRule();
                      p1.setLocatorName(pr.getLocator());
                      p1.setProfilingRule(pRule);
                      p1.setPrincipalName(principal.getName());
                      pm.storePrincipalRule(p1);
                    }
                    catch (Exception eRole)
                    {
                      eRole.printStackTrace();
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

            {
                Collection col = pm.getRulesForPrincipal(principal);
                Iterator _itCol = col.iterator();
                while (_itCol.hasNext())
                {
                    PrincipalRule p1 = (PrincipalRule) _itCol.next();
                    JSPrincipalRule pr = new JSPrincipalRule(p1
                            .getLocatorName(), p1.getProfilingRule().getId());
                    _user.getRules().add(pr);
                }
            }
        }
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                    try
                    {
                        Iterator it = rules.iterator();
                        while (it.hasNext())
                        {
                            PrincipalRule rule = (PrincipalRule)it.next();
                            if (rule.getLocatorName().equals(locatorNames[ix]))
                            {
                                profiler.deletePrincipalRule(rule);
                                audit.logAdminAuthorizationActivity(actionRequest.getUserPrincipal().getName(), getIPAddress(actionRequest), userName, AuditActivity.USER_DELETE_PROFILE, rule.getProfilingRule().getId() + "-" + rule.getLocatorName(), USER_ADMINISTRATION);                                                                                                                                                       
                            }
                        }
                    }
                    catch (Exception e)
                    {
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

                    try
                    {
                        Iterator it = rules.iterator();
                        while (it.hasNext())
                        {
                            PrincipalRule rule = (PrincipalRule)it.next();
                            if (rule.getLocatorName().equals(locatorNames[ix]))
                            {
                                profiler.deletePrincipalRule(rule);
                                audit.logAdminAuthorizationActivity(actionRequest.getUserPrincipal().getName(), getIPAddress(actionRequest), userName, AuditActivity.USER_DELETE_PROFILE, rule.getProfilingRule().getId() + "-" + rule.getLocatorName(), USER_ADMINISTRATION);                                                                                                                                                       
                            }
                        }
                    }
                    catch (Exception e)
                    {
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

    public ProfilingRule getRuleForPrincipal(Principal principal,
            String locatorName)
    {
        ProfilingRule rule = null;
        // lookup the rule for the given principal in our user/rule table
        PrincipalRule pr = lookupPrincipalRule(principal.getName(), locatorName);

        // if not found, fallback to the locator named rule or system wide rule
        if (pr == null)
        {
            // find rule on locator name
            rule = getRule(locatorName);

            if (rule == null)
            {
                // if not found, fallback to the system wide rule
                rule = getDefaultRule();
            }
            pr = new PrincipalRuleImpl();
            pr.setLocatorName(locatorName);
            pr.setPrincipalName(principal.getName());
            pr.setProfilingRule(rule);
            principalRules.put(makePrincipalRuleKey(principal.getName(),
                    locatorName), pr);
            // track cached principal rules
            trackCachedPrincipalRulesPut(principal.getName(), pr);
        } else
        {
            // Get the associated rule
            rule = pr.getProfilingRule();
        }

        return rule;
    }
View Full Code Here

Examples of org.apache.jetspeed.profiler.rules.PrincipalRule

    {
        if (this.prRuleClass == null)
        {
            try
            {
                PrincipalRule tempRule = createPrincipalRule();
                this.prRuleClass = tempRule.getClass();
            } catch (Exception e)
            {
                e.printStackTrace();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.