当前位置: 首页>>代码示例>>Java>>正文


Java Policy.getName方法代码示例

本文整理汇总了Java中org.apache.neethi.Policy.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Policy.getName方法的具体用法?Java Policy.getName怎么用?Java Policy.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.neethi.Policy的用法示例。


在下文中一共展示了Policy.getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setPolicy

import org.apache.neethi.Policy; //导入方法依赖的package包/类
/**
* @param policy
* @see org.apache.axis2.description.PolicySubject#attachPolicy(Policy)
* @see org.apache.axis2.description.PolicySubject#clear()
* @deprecated As of 1.4 release, replaced by
*             {@link PolicySubject #attachPolicy(Policy)} Use
*             {@link PolicySubject #clear()} beforehand effective policy of
*             {@link AxisDescription} has to be set as the argument.
* 
*/
  public void setPolicy(Policy policy) {
      wrapperElements.clear();

      if (policy.getName() == null && policy.getId() == null) {
          policy.setId(UIDGenerator.generateUID());
      }

      Wrapper wrapper = new Wrapper(PolicyInclude.ANON_POLICY, policy);
      if (policy.getName() != null) {
          wrapperElements.put(policy.getName(), wrapper);
      } else {
          wrapperElements.put(policy.getId(), wrapper);
      }
      
      if (description != null) {
	description.getPolicySubject().clear();
	description.getPolicySubject().attachPolicy(policy);
}
  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:30,代码来源:PolicyInclude.java

示例2: updatePolicy

import org.apache.neethi.Policy; //导入方法依赖的package包/类
/**
* @deprecated As of 1.4 release, replaced by
*             {@link PolicySubject #updatePolicy(Policy)}.
*/
  public void updatePolicy(Policy policy) {
      String key;

      if ((key = policy.getName()) == null && (key = policy.getId()) == null) {
          // TODO throw more meaningful exception ..
          throw new RuntimeException("policy doesn't have a name or an id ");
      }

      Wrapper wrapper = (Wrapper) wrapperElements.get(key);
      wrapper.value = policy;
      
      if (description != null) {
	description.getPolicySubject().updatePolicy(policy);
}
  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:PolicyInclude.java

示例3: addPolicyElement

import org.apache.neethi.Policy; //导入方法依赖的package包/类
/**
* @deprecated As of 1.4 release, replaced by
*             {@link PolicySubject #attachPolicy(Policy)}
*/
  public void addPolicyElement(int type, Policy policy) {

      String key;

      if ((key = policy.getName()) == null && (key = policy.getId()) == null) {
          policy.setId(UIDGenerator.generateUID());
      }

      key = (policy.getName() != null) ? policy.getName() : policy.getId();

      Wrapper wrapper = new Wrapper(type, policy);
      wrapperElements.put(key, wrapper);
      reg.register(key, policy);
      
      if (description != null) {
	description.getPolicySubject().attachPolicy(policy);
}
  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:PolicyInclude.java

示例4: attachPolicy

import org.apache.neethi.Policy; //导入方法依赖的package包/类
public void attachPolicy(Policy policy) {
	String key = policy.getName();
	if (key == null) {
		key = policy.getId();
		if (key == null) {
			key = UIDGenerator.generateUID();
			policy.setId(key);
		}
	}
	attachPolicyComponent(key, policy);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:PolicySubject.java

示例5: updatePolicy

import org.apache.neethi.Policy; //导入方法依赖的package包/类
public void updatePolicy(Policy policy) {
	String key = (policy.getName() != null) ? policy.getName() : policy
			.getId();
	if (key == null) {
		throw new IllegalArgumentException(
				"policy doesn't have a name or an id ");
	}
	attachedPolicyComponents.put(key, policy);
	setLastUpdatedTime(new Date());
	
	if (!isUpdated()) {
		setUpdated(true);
	}
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:PolicySubject.java

示例6: createPolicyReference

import org.apache.neethi.Policy; //导入方法依赖的package包/类
public static PolicyReference createPolicyReference(Policy policy) {
	PolicyReference policyReference = new PolicyReference();
	String key = policy.getName();
	if (key == null) {
		key = policy.getId();
		if (key == null) {
			key = UIDGenerator.generateUID();
			policy.setId(key);
		}
		policyReference.setURI("#" + key);
	} else {
		policyReference.setURI(key);
	}
	return policyReference;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:PolicyUtil.java


注:本文中的org.apache.neethi.Policy.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。