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


Java ProtectionGroup.setProtectionGroupName方法代码示例

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


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

示例1: testEquality

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
public void testEquality() {

		assertTrue(protectionGroup1.equals(protectionGroup1copy));
		assertFalse(protectionGroup1.equals(protectionGroup2));
		assertFalse(protectionGroup1.equals(protectionGroup3));
		ProtectionGroup protectionGroup1subtype = new ProtectionGroup() {
		};
		protectionGroup1subtype.setProtectionGroupId(new Long(4));
		protectionGroup1subtype.setProtectionGroupName("ProtectionGroup4");

		assertFalse(protectionGroup1.equals(protectionGroup1subtype));

		assertReflexivity();
		assertSymmetry();
		assertTransitivity();
		assertConsistency();
		assertNullComparison();
	}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:19,代码来源:ProtectionGroupTest.java

示例2: testProtectionGroupCreate

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
public void testProtectionGroupCreate(){
	//UserProvisioningManager upm = SecurityServiceProvider.getUserProvisioningManger("Security");
	
	try{
		for(int i=1;i<101;i++){
			ProtectionGroup pg = new ProtectionGroup();
			pg.setProtectionGroupName("protection_group_name_="+i);
			pg.setProtectionGroupDescription("PG_Desc_"+i);
			upm.createProtectionGroup(pg);
			System.out.println("The returned id is"+pg.getProtectionGroupId());
		}
		
		
	}catch(Exception ex){
		ex.printStackTrace();
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:18,代码来源:TestClient.java

示例3: testCreateProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private void testCreateProtectionGroup() throws CSTransactionException
{
	byte tempFlag = 0;
	for (int x = 0; x < NumberOfProtectionGroupsToTest; x++)
	{
		ProtectionGroup tempProtectionGroup = new ProtectionGroup();
		java.util.Date CurrentTime = new java.util.Date();

		tempProtectionGroup.setProtectionGroupName(ProtectionGroupStringArray[x][0]);
		tempProtectionGroup.setProtectionGroupDescription(ProtectionGroupStringArray[x][1]);
		tempProtectionGroup.setUpdateDate(CurrentTime);

		tempProtectionGroup.setLargeElementCountFlag(tempFlag);
		if (tempFlag == 1)
			tempFlag = 0;
		else
			tempFlag = 1;

		userProvisioningManager.createProtectionGroup(tempProtectionGroup);
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:22,代码来源:RegressionTest.java

示例4: testRemoveProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private void testRemoveProtectionGroup() throws CSTransactionException
{
	try
	{
		for (int x = 0; x < NumberOfProtectionGroupsToTest; x++)
		{
			ProtectionGroup obj = new ProtectionGroup();
			obj.setProtectionGroupName(ProtectionGroupStringArray[x][0]);
			SearchCriteria sc = new ProtectionGroupSearchCriteria(obj);
			List objList = userProvisioningManager.getObjects(sc);
			userProvisioningManager.removeProtectionGroup(((ProtectionGroup) objList.get(0)).getProtectionGroupId().toString());
		}
		assertTrue(true);
	}
	catch (Exception e)
	{
		assertTrue(false);
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:20,代码来源:RegressionTest.java

示例5: testCreateProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private void testCreateProtectionGroup() throws CSTransactionException 
{
	
	byte tempFlag = 0;
	for (int x=0; x<NumberOfProtectionGroupsToTest; x++)
	{
		ProtectionGroup tempProtectionGroup = new ProtectionGroup();
		java.util.Date CurrentTime = new java.util.Date();

		tempProtectionGroup.setProtectionGroupName(ProtectionGroupStringArray[x][0]);
		tempProtectionGroup.setProtectionGroupDescription(ProtectionGroupStringArray[x][1]);
		tempProtectionGroup.setUpdateDate(CurrentTime);
		
		tempProtectionGroup.setLargeElementCountFlag(tempFlag);
		if (tempFlag == 1)
			tempFlag = 0;
		else
			tempFlag = 1;
		
		userProvisioningManager.createProtectionGroup(tempProtectionGroup);
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:23,代码来源:UserProvisioningManagerTest.java

示例6: testCreateProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private static void testCreateProtectionGroup() throws CSTransactionException
{

	byte tempFlag = 0;
	for (int x=0; x<NumberOfProtectionGroupsToTest; x++)
	{
		ProtectionGroup tempProtectionGroup = new ProtectionGroup();
		java.util.Date CurrentTime = new java.util.Date();

		tempProtectionGroup.setProtectionGroupName(ProtectionGroupStringArray[x][0]);
		tempProtectionGroup.setProtectionGroupDescription(ProtectionGroupStringArray[x][1]);
		tempProtectionGroup.setUpdateDate(CurrentTime);

		tempProtectionGroup.setLargeElementCountFlag(tempFlag);
		if (tempFlag == 1)
			tempFlag = 0;
		else
			tempFlag = 1;

		userProvisioningManager.createProtectionGroup(tempProtectionGroup);
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:23,代码来源:PrimeCSMData.java

示例7: xtestModifyProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private void xtestModifyProtectionGroup() throws CSTransactionException, CSObjectNotFoundException 
{
	byte tempFlag = 0;
	ProtectionGroup tempProtectionGroup = new ProtectionGroup();
	java.util.Date tempDate = new java.util.Date();
	
	tempProtectionGroup = userProvisioningManager.getProtectionGroupById("4");
	
	tempProtectionGroup.setProtectionGroupName(ProtectionGroupStringArray[3][0] + "Modified");
	tempProtectionGroup.setProtectionGroupDescription(ProtectionGroupStringArray[3][1] + "Modified");
	tempProtectionGroup.setUpdateDate(tempDate);	
	tempProtectionGroup.setLargeElementCountFlag(tempFlag);
	
	userProvisioningManager.modifyProtectionGroup(tempProtectionGroup);
	
	tempProtectionGroup = userProvisioningManager.getProtectionGroupById("4");
	assertEquals("\nModifyProtectionGroup did not modify the Group Name\n", ProtectionGroupStringArray[3][0] + "Modified", tempProtectionGroup.getProtectionGroupName());
	assertEquals("\nModifyProtectionGroup did not modify the Group Description\n", ProtectionGroupStringArray[3][1] + "Modified", tempProtectionGroup.getProtectionGroupDescription());
	assertEquals("\nModifyProtectionGroup did not modify the Large Element Count Flag\n", tempFlag, tempProtectionGroup.getLargeElementCountFlag());
	//assertEquals("\nModifyProtectionGroup did not modify the UpdateDate\n", tempDate, tempProtectionGroup.getUpdateDate());
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:22,代码来源:UserProvisioningManagerTest.java

示例8: testCreateProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private static void testCreateProtectionGroup() throws CSTransactionException 
{
	
	byte tempFlag = 0;
	for (int x=0; x<NumberOfProtectionGroupsToTest; x++)
	{
		ProtectionGroup tempProtectionGroup = new ProtectionGroup();
		java.util.Date CurrentTime = new java.util.Date();

		tempProtectionGroup.setProtectionGroupName(ProtectionGroupStringArray[x][0]);
		tempProtectionGroup.setProtectionGroupDescription(ProtectionGroupStringArray[x][1]);
		tempProtectionGroup.setUpdateDate(CurrentTime);
		
		tempProtectionGroup.setLargeElementCountFlag(tempFlag);
		if (tempFlag == 1)
			tempFlag = 0;
		else
			tempFlag = 1;
		
		userProvisioningManager.createProtectionGroup(tempProtectionGroup);
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:23,代码来源:PrimeCSMData.java

示例9: createProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
/**
 * Test method: void createPrivilege(Privilege)
 */
protected ProtectionGroup createProtectionGroup()
		throws CSTransactionException {

	ProtectionGroup g = new ProtectionGroup();
	g.setProtectionGroupDescription("Test PG Desc");
	g.setProtectionGroupName("Test PG Name" + System.currentTimeMillis());
	upm.createProtectionGroup(g);
	System.out.println("Created Protection Group with ID: "
			+ g.getProtectionGroupId());
	return g;

}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:16,代码来源:AuthorizationDAOImplTest.java

示例10: testGetProtectionGroupById

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private void testGetProtectionGroupById() throws CSObjectNotFoundException
{
	ProtectionGroup tempProtectionGroup;
	for (int x = 0; x < NumberOfProtectionGroupsToTest; x++)
	{
		ProtectionGroup obj = new ProtectionGroup();
		obj.setProtectionGroupName(ProtectionGroupStringArray[x][0]);
		SearchCriteria sc = new ProtectionGroupSearchCriteria(obj);
		List objList = userProvisioningManager.getObjects(sc);
		tempProtectionGroup = userProvisioningManager.getProtectionGroupById(((ProtectionGroup) objList.get(0)).getProtectionGroupId().toString());
		AssertEqualsForTextInProtectionGroup(x,tempProtectionGroup);
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:14,代码来源:RegressionTest.java

示例11: createDefaultUptProtectionGroup

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
private ProtectionGroup createDefaultUptProtectionGroup(UserProvisioningManager upManager, String pgName, Application application) throws CSTransactionException
{
	ProtectionGroup pg=new ProtectionGroup();
	pg.setProtectionGroupName(pgName);
	pg.setProtectionGroupDescription("Default protection group for \""+pgName +"\"; Do not chnage name.");
	upManager.createProtectionGroup(pg);
	// pg has been as to current application
	//set it to target application
	pg.setApplication(application);
	upManager.modifyProtectionGroup(pg);
	return pg;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:13,代码来源:ApplicationForm.java

示例12: init

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
@Transactional(propagation=Propagation.REQUIRED)
 public void init() throws DataAccessException {
 	try {
      this.applicationName = NCIAConfig.getCsmApplicationName();
      logger.info("CSM application name is " + this.applicationName);
   upm = (UserProvisioningManager)SecurityServiceProvider.getAuthorizationManager(this.applicationName);

      am = SecurityServiceProvider.getAuthenticationManager(this.applicationName);
      //logger.info("UserProvisioningManager: " + upm + " AuthenticationManager is " + am);

      try {
          // Get ID for public protection group
          ProtectionGroup exampleProtGroup = new ProtectionGroup();
          exampleProtGroup.setProtectionGroupName(publicProtectionGroupName);
          ProtectionGroupSearchCriteria pgsc = new ProtectionGroupSearchCriteria(exampleProtGroup);

          List<ProtectionGroup> protGroupResult = upm.getObjects(pgsc);
          publicProtGroupId = ((ProtectionGroup) protGroupResult.get(0)).getProtectionGroupId();
      } catch (Exception e) {

          logger.error("A CSM protection group must be defined with the name " +
              publicProtectionGroupName + " " +e);
          throw new RuntimeException(e);
      }
 	}
     catch(Exception ex) {
ex.printStackTrace();
     	throw new RuntimeException(ex);
     }

 }
 
开发者ID:NCIP,项目名称:national-biomedical-image-archive,代码行数:32,代码来源:NCIASecurityManagerImpl.java

示例13: getProtectionGroups

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
public java.util.List getProtectionGroups(){
	ProtectionGroup pg = new ProtectionGroup();
	pg.setProtectionGroupName("%");
	SearchCriteria sc = new ProtectionGroupSearchCriteria(pg);
	return this.getObjects(sc);
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:7,代码来源:UserProvisioningManagerImpl.java

示例14: testEquality

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
public void testEquality() {
  

assertTrue(protectionGroupRoleContext1.equals(protectionGroupRoleContext1copy));

  assertFalse(protectionGroupRoleContext1.equals(protectionGroupRoleContext2));
  assertFalse(protectionGroupRoleContext1.equals(protectionGroupRoleContext3));
  ProtectionGroupRoleContext protectionGroupRoleContext1subtype = new ProtectionGroupRoleContext() {};
  ProtectionGroup pg4 = new ProtectionGroup();
  pg4.setProtectionGroupId(new Long(4));
  pg4.setProtectionGroupName("PG4");
  protectionGroupRoleContext1subtype.setProtectionGroup(pg4);
  
  
  assertFalse(protectionGroupRoleContext1.equals(protectionGroupRoleContext1subtype));

  assertReflexivity();
  assertSymmetry();
  assertTransitivity();
  assertConsistency();
  assertNullComparison();
  
  
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:25,代码来源:ProtectionGroupRoleContextTest.java

示例15: setUp

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
protected void setUp() {
  protectionGroupRoleContext1 = new ProtectionGroupRoleContext();
  ProtectionGroup pg1= new ProtectionGroup();
  pg1.setProtectionGroupId(new Long(1));
  pg1.setProtectionGroupName("PG1");
  protectionGroupRoleContext1.setProtectionGroup(pg1);
  
  
  protectionGroupRoleContext1copy = new ProtectionGroupRoleContext();
  ProtectionGroup pg2= new ProtectionGroup();
  pg2.setProtectionGroupId(new Long(1));
  pg2.setProtectionGroupName("PG1");
protectionGroupRoleContext1copy.setProtectionGroup(pg2);
 
  
  protectionGroupRoleContext1copy2 = new ProtectionGroupRoleContext();
  ProtectionGroup pg3= new ProtectionGroup();
  pg3.setProtectionGroupId(new Long(1));
  pg3.setProtectionGroupName("PG1");
  protectionGroupRoleContext1copy2.setProtectionGroup(pg3);


  
  protectionGroupRoleContext2 = new ProtectionGroupRoleContext();
  ProtectionGroup pg4= new ProtectionGroup();
  pg4.setProtectionGroupId(new Long(2));
  pg4.setProtectionGroupName("PG2");
  protectionGroupRoleContext2.setProtectionGroup(pg4);

  
  
  
  protectionGroupRoleContext3 = new ProtectionGroupRoleContext();
  ProtectionGroup pg5= new ProtectionGroup();
  pg5.setProtectionGroupId(new Long(3));
  pg5.setProtectionGroupName("PG3");
  protectionGroupRoleContext3.setProtectionGroup(pg5);

  
 }
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:41,代码来源:ProtectionGroupRoleContextTest.java


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