當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfigAttributeDefinition類代碼示例

本文整理匯總了Java中net.sf.acegisecurity.ConfigAttributeDefinition的典型用法代碼示例。如果您正苦於以下問題:Java ConfigAttributeDefinition類的具體用法?Java ConfigAttributeDefinition怎麽用?Java ConfigAttributeDefinition使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ConfigAttributeDefinition類屬於net.sf.acegisecurity包,在下文中一共展示了ConfigAttributeDefinition類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: decide

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
@Override
public Object decide(
        Authentication authentication,
        Object object,
        ConfigAttributeDefinition config,
        Object returnedObject) throws AccessDeniedException
{
    // If this object has already been marked, then leave it
    if (returnedObject == null)
    {
        return null;
    }
    else if (returnedObject instanceof PermissionCheckedValue)
    {
        return returnedObject;
    }
    else if (object instanceof Collection<?>)
    {
        // Mark it
        return PermissionCheckedValueMixin.create(returnedObject);
    }
    else
    {
        return returnedObject;
    }
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:27,代碼來源:MarkingAfterInvocationProvider.java

示例2: extractSupportedDefinitions

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
private List<ConfigAttributeDefintion> extractSupportedDefinitions(ConfigAttributeDefinition config)
{
    List<ConfigAttributeDefintion> definitions = new ArrayList<ConfigAttributeDefintion>();
    Iterator iter = config.getConfigAttributes();

    while (iter.hasNext())
    {
        ConfigAttribute attr = (ConfigAttribute) iter.next();

        if (this.supports(attr))
        {
            definitions.add(new ConfigAttributeDefintion(attr));
        }

    }
    return definitions;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:19,代碼來源:ACLEntryAfterInvocationProvider.java

示例3: decide

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
private QueryEngineResults decide(Authentication authentication, Object object, ConfigAttributeDefinition config, QueryEngineResults returnedObject)
        throws AccessDeniedException

{
    Map<Set<String>, ResultSet> map = returnedObject.getResults();
    Map<Set<String>, ResultSet> answer = new HashMap<Set<String>, ResultSet>(map.size(), 1.0f);

    for (Set<String> group : map.keySet())
    {
        ResultSet raw = map.get(group);
        ResultSet permed;
        if (PagingLuceneResultSet.class.isAssignableFrom(raw.getClass()))
        {
            permed = decide(authentication, object, config, (PagingLuceneResultSet)raw);
        }
        else
        {
            permed = decide(authentication, object, config, raw);
        }
        answer.put(group, permed);
    }
    return new QueryEngineResults(answer);
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:24,代碼來源:ACLEntryAfterInvocationProvider.java

示例4: extractSupportedDefinitions

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
private List<ConfigAttributeDefintion> extractSupportedDefinitions(ConfigAttributeDefinition config)
{
    List<ConfigAttributeDefintion> definitions = new ArrayList<ConfigAttributeDefintion>(2);
    Iterator iter = config.getConfigAttributes();

    while (iter.hasNext())
    {
        ConfigAttribute attr = (ConfigAttribute) iter.next();

        if (this.supports(attr))
        {
            definitions.add(new ConfigAttributeDefintion(attr));
        }

    }
    return definitions;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:18,代碼來源:ACLEntryVoter.java

示例5: decide

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
private NodeRef decide(Authentication authentication, Object object, ConfigAttributeDefinition config, NodeRef returnedObject)
{
    if (returnedObject == null)
    {
        return null;
    }

    if (isUnfiltered(returnedObject))
    {
        return returnedObject;
    }

    List<ConfigAttributeDefintion> supportedDefinitions = extractSupportedDefinitions(config);
    if (supportedDefinitions.size() == 0)
    {
        return returnedObject;
    }

    int parentResult = checkRead(nodeService.getPrimaryParent(returnedObject).getParentRef());
    int childResult = checkRead(returnedObject);
    checkSupportedDefinitions(supportedDefinitions, parentResult, childResult);

    return returnedObject;
}
 
開發者ID:Alfresco,項目名稱:records-management-old,代碼行數:25,代碼來源:RMAfterInvocationProvider.java

示例6: extractSupportedDefinitions

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
private List<ConfigAttributeDefintion> extractSupportedDefinitions(ConfigAttributeDefinition config)
{
    List<ConfigAttributeDefintion> definitions = new ArrayList<>();
    Iterator iter = config.getConfigAttributes();

    while (iter.hasNext())
    {
        ConfigAttribute attr = (ConfigAttribute) iter.next();

        if (this.supports(attr))
        {
            definitions.add(new ConfigAttributeDefintion(attr));
        }

    }
    return definitions;
}
 
開發者ID:Alfresco,項目名稱:records-management-old,代碼行數:19,代碼來源:RMAfterInvocationProvider.java

示例7: pre

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
public AccessStatus pre(Object object)
{
    ConfigAttributeDefinition attr = this.obtainObjectDefinitionSource().getAttributes(object);
    if (this.getAccessDecisionManager() instanceof AffirmativeBasedAccessDecisionManger)
    {
        return ((AffirmativeBasedAccessDecisionManger)getAccessDecisionManager()).pre(object, attr); 
    }
    else
    {
        return AccessStatus.ALLOWED;
    }
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:13,代碼來源:MethodSecurityInterceptor.java

示例8: pre

import net.sf.acegisecurity.ConfigAttributeDefinition; //導入依賴的package包/類
public AccessStatus pre(Object object, ConfigAttributeDefinition attr)
{
    Iterator iter = this.getDecisionVoters().iterator();
    int deny = 0;

    while (iter.hasNext())
    {
        AccessDecisionVoter voter = (AccessDecisionVoter) iter.next();
        int result = voter.vote(AuthenticationUtil.getFullAuthentication(), object, attr);

        switch (result)
        {
        case AccessDecisionVoter.ACCESS_GRANTED:
            return AccessStatus.ALLOWED;

        case AccessDecisionVoter.ACCESS_DENIED:
            deny++;

            break;

        default:
            break;
        }
    }

    if (deny > 0)
    {
        return AccessStatus.DENIED;
    }

    // To get this far, every AccessDecisionVoter abstained
    if (this.isAllowIfAllAbstainDecisions())
    {
        return AccessStatus.ALLOWED;
    }
    else
    {
        return AccessStatus.DENIED;
    }

}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:42,代碼來源:AffirmativeBasedAccessDecisionManger.java


注:本文中的net.sf.acegisecurity.ConfigAttributeDefinition類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。