资源简介
代码直接导入Myeclipse就能运行, 运行 TestPDP文件即可得到结果
代码片段和文件信息
/*
* @(#)LDAPPolicyFinderModule.java
*
* Copyright 2004 Sun Microsystems Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
*
* 2. Redistribution in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided “AS IS“ without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS REPRESENTATIONS AND WARRANTIES INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT ARE HEREBY EXCLUDED. SUN MICROSYSTEMS INC. (“SUN“)
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE PROFIT OR DATA OR FOR DIRECT INDIRECT SPECIAL CONSEQUENTIAL
* INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed or intended for use in
* the design construction operation or maintenance of any nuclear facility.
*/
import com.sun.xacml.AbstractPolicy;
import com.sun.xacml.EvaluationCtx;
import com.sun.xacml.ParsingException;
import com.sun.xacml.Policy;
import com.sun.xacml.PolicyReference;
import com.sun.xacml.PolicySet;
import com.sun.xacml.ctx.Status;
import com.sun.xacml.finder.PolicyFinder;
import com.sun.xacml.finder.PolicyFinderModule;
import com.sun.xacml.finder.PolicyFinderResult;
import java.net.URI;
import java.util.ArrayList;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchResult;
import org.w3c.dom.Node;
/**
* This is a template for managing policies provided by LDAP. It handles
* both policy retrieval based on request applicability and based on
* referencing. It is not usable as-is but has most of the plumbing
* fleshed out.
*
* For more information about how these modules work look at the proje
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-07-24 11:13 xacmltest\
文件 523 2014-05-22 17:11 xacmltest\.classpath
文件 385 2014-05-22 17:08 xacmltest\.project
目录 0 2014-07-24 11:13 xacmltest\.settings\
文件 629 2014-05-22 17:08 xacmltest\.settings\org.eclipse.jdt.core.prefs
目录 0 2014-07-24 11:13 xacmltest\bin\
文件 4524 2014-07-22 11:42 xacmltest\bin\LDAPPolicyFinderModule.class
文件 3556 2014-07-22 11:42 xacmltest\bin\SampleAttrFinderModule.class
文件 6967 2014-07-22 11:42 xacmltest\bin\SamplePolicyBuilder.class
文件 2356 2014-07-22 11:42 xacmltest\bin\SamplePolicyFinderModule.class
文件 2489 2014-07-22 11:42 xacmltest\bin\SampleRequestBuilder.class
文件 4233 2014-07-22 11:42 xacmltest\bin\SimplePDP.class
文件 2527 2014-07-22 11:42 xacmltest\bin\TimeInRangeFunction.class
目录 0 2014-07-24 11:13 xacmltest\config\
文件 6044 2004-07-11 12:00 xacmltest\config\config.xsd
文件 1113 2004-07-15 16:34 xacmltest\config\README.txt
文件 780 2004-07-13 21:04 xacmltest\config\sample1.xm
文件 1094 2004-07-14 13:03 xacmltest\config\sample2.xm
文件 6013 2004-07-14 13:18 xacmltest\config\standard.xm
目录 0 2014-07-24 11:13 xacmltest\lib\
文件 6805 2004-07-14 16:20 xacmltest\lib\samples.jar
文件 250603 2004-07-15 23:37 xacmltest\lib\sunxacml-debug.jar
文件 194789 2004-07-15 23:32 xacmltest\lib\sunxacml.jar
文件 15739 2004-07-11 12:21 xacmltest\lib\tests.jar
目录 0 2014-07-24 11:13 xacmltest\policy\
文件 2995 2004-07-13 22:05 xacmltest\policy\generated.xm
文件 3531 2004-07-13 22:07 xacmltest\policy\obligation.xm
文件 2355 2004-07-13 22:14 xacmltest\policy\selector.xm
文件 2986 2004-07-13 22:08 xacmltest\policy\time-range.xm
目录 0 2014-07-24 11:13 xacmltest\request\
文件 891 2004-07-13 22:16 xacmltest\request\door-access.xm
............此处省略12个文件信息
- 上一篇:倒车雷达超声波测距系统
- 下一篇:露天矿模型的论文与程序
评论
共有 条评论