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


Java ProtectionElement.setProtectionElementDescription方法代码示例

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


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

示例1: testCreateProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private void testCreateProtectionElement() throws CSTransactionException 
{
	for (int x=0; x<NumberOfProtectionElementsToTest; x++)
	{
		ProtectionElement tempProtectionElement = new ProtectionElement();
		java.util.Date CurrentTime = new java.util.Date();
		tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[x][0]);
		tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[x][1]);
		tempProtectionElement.setObjectId(ProtectionElementStringArray[x][2]);
		tempProtectionElement.setAttribute(ProtectionElementStringArray[x][3]);
		tempProtectionElement.setUpdateDate(CurrentTime);
		
		userProvisioningManager.createProtectionElement(tempProtectionElement);
		
		tempProtectionElement = null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:18,代码来源:UserProvisioningManagerTest.java

示例2: testModifyProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private void testModifyProtectionElement() throws CSTransactionException, CSObjectNotFoundException 
{
	ProtectionElement tempProtectionElement = new ProtectionElement();
	java.util.Date midnight_jan2_1970 = new java.util.Date(24L*60L*60L*1000L);

	tempProtectionElement = userProvisioningManager.getProtectionElementById("4");
	
	tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[3][0] + "Modified");
	tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[3][1] + "Modified");
	tempProtectionElement.setObjectId(ProtectionElementStringArray[3][2] + "Modified");
	tempProtectionElement.setAttribute(ProtectionElementStringArray[3][3] + "Modified");
	tempProtectionElement.setUpdateDate(midnight_jan2_1970);	//TODO: Not updating the "Update Date"
	
	userProvisioningManager.modifyProtectionElement(tempProtectionElement); 
	
	tempProtectionElement = userProvisioningManager.getProtectionElementById("4");
	
	assertEquals("\nmodifyProtectionElement did not modify the Name\n", ProtectionElementStringArray[3][0] + "Modified", tempProtectionElement.getProtectionElementName());
	assertEquals("\nmodifyProtectionElement did not modify the Description\n", ProtectionElementStringArray[3][1] + "Modified", tempProtectionElement.getProtectionElementDescription());
	assertEquals("\nmodifyProtectionElement did not modify the Object ID\n", ProtectionElementStringArray[3][2] + "Modified", tempProtectionElement.getObjectId());
	assertEquals("\nmodifyProtectionElement did not modify the Attribute\n", ProtectionElementStringArray[3][3] + "Modified", tempProtectionElement.getAttribute());
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:23,代码来源:UserProvisioningManagerTest.java

示例3: testCreateProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private void testCreateProtectionElement() throws CSTransactionException
{
	for (int x = 0; x < NumberOfProtectionElementsToTest; x++)
	{
		ProtectionElement tempProtectionElement = new ProtectionElement();
		java.util.Date CurrentTime = new java.util.Date();
		tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[x][0]);
		tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[x][1]);
		tempProtectionElement.setObjectId(ProtectionElementStringArray[x][2]);
		tempProtectionElement.setAttribute(ProtectionElementStringArray[x][3]);
		tempProtectionElement.setUpdateDate(CurrentTime);

		userProvisioningManager.createProtectionElement(tempProtectionElement);

		tempProtectionElement = null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:18,代码来源:RegressionTest.java

示例4: testCreateProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private static void testCreateProtectionElement() throws CSTransactionException 
{
	for (int x=0; x<NumberOfProtectionElementsToTest; x++)
	{
		ProtectionElement tempProtectionElement = new ProtectionElement();
		java.util.Date CurrentTime = new java.util.Date();
		tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[x][0]);
		tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[x][1]);
		tempProtectionElement.setObjectId(ProtectionElementStringArray[x][2]);
		tempProtectionElement.setAttribute(ProtectionElementStringArray[x][3]);
		tempProtectionElement.setUpdateDate(CurrentTime);
		
		userProvisioningManager.createProtectionElement(tempProtectionElement);
		
		tempProtectionElement = null;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:18,代码来源:PrimeCSMData.java

示例5: xtestCreateProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private void xtestCreateProtectionElement() throws CSTransactionException 
{
	for (int x=0; x<NumberOfProtectionElementsToxtest; x++)
	{
		ProtectionElement tempProtectionElement = new ProtectionElement();
		java.util.Date CurrentTime = new java.util.Date();
		tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[x][0]);
		tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[x][1]);
		tempProtectionElement.setObjectId(ProtectionElementStringArray[x][2]);
		tempProtectionElement.setAttribute(ProtectionElementStringArray[x][3]);
		tempProtectionElement.setUpdateDate(CurrentTime);
		
		userProvisioningManager.createProtectionElement(tempProtectionElement);
		
		tempProtectionElement = null;
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:18,代码来源:UserProvisioningManagerTest.java

示例6: xtestModifyProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private void xtestModifyProtectionElement() throws CSTransactionException, CSObjectNotFoundException 
{
	ProtectionElement tempProtectionElement = new ProtectionElement();
	java.util.Date midnight_jan2_1970 = new java.util.Date(24L*60L*60L*1000L);

	tempProtectionElement = userProvisioningManager.getProtectionElementById("4");
	
	tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[3][0] + "Modified");
	tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[3][1] + "Modified");
	tempProtectionElement.setObjectId(ProtectionElementStringArray[3][2] + "Modified");
	tempProtectionElement.setAttribute(ProtectionElementStringArray[3][3] + "Modified");
	tempProtectionElement.setUpdateDate(midnight_jan2_1970);	//TODO: Not updating the "Update Date"
	
	userProvisioningManager.modifyProtectionElement(tempProtectionElement); 
	
	tempProtectionElement = userProvisioningManager.getProtectionElementById("4");
	
	assertEquals("\nmodifyProtectionElement did not modify the Name\n", ProtectionElementStringArray[3][0] + "Modified", tempProtectionElement.getProtectionElementName());
	assertEquals("\nmodifyProtectionElement did not modify the Description\n", ProtectionElementStringArray[3][1] + "Modified", tempProtectionElement.getProtectionElementDescription());
	assertEquals("\nmodifyProtectionElement did not modify the Object ID\n", ProtectionElementStringArray[3][2] + "Modified", tempProtectionElement.getObjectId());
	assertEquals("\nmodifyProtectionElement did not modify the Attribute\n", ProtectionElementStringArray[3][3] + "Modified", tempProtectionElement.getAttribute());
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:23,代码来源:UserProvisioningManagerTest.java

示例7: testCreateProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private static void testCreateProtectionElement() throws CSTransactionException
{
	for (int x=0; x<NumberOfProtectionElementsToTest; x++)
	{
		ProtectionElement tempProtectionElement = new ProtectionElement();
		java.util.Date CurrentTime = new java.util.Date();
		tempProtectionElement.setProtectionElementName(ProtectionElementStringArray[x][0]);
		tempProtectionElement.setProtectionElementDescription(ProtectionElementStringArray[x][1]);
		tempProtectionElement.setObjectId(ProtectionElementStringArray[x][2]);
		tempProtectionElement.setAttribute(ProtectionElementStringArray[x][3]);
		tempProtectionElement.setUpdateDate(CurrentTime);

		userProvisioningManager.createProtectionElement(tempProtectionElement);

		tempProtectionElement = null;
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:18,代码来源:PrimeCSMData.java

示例8: createUptOperationProtectionElement

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private ProtectionElement createUptOperationProtectionElement(UserProvisioningManager upManager, String objectId, Application application) throws CSTransactionException
{
	ProtectionElement pe = new ProtectionElement();
	String peName=Constants.UPT_OPERATION_DISABLE_FLAG+":"+objectId;
	pe.setProtectionElementName(peName);
	pe.setObjectId(objectId);
	
	String peDesc="System required protection element :"+objectId +"'\n Do not change its unique object ID.";
	pe.setProtectionElementDescription(peDesc);
	upManager.createProtectionElement(pe);
	// pe has been as to current application
	//set it to target application
	pe.setApplication(application);			
	upManager.modifyProtectionElement(pe);
	return pe;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:17,代码来源:ApplicationForm.java

示例9: createProtectionElement

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

	ProtectionElement pe = new ProtectionElement();
	pe.setObjectId( "" + System.currentTimeMillis() );
	pe.setProtectionElementDescription( "Test Desc");
	pe.setProtectionElementName( "Test PE Name" + System.currentTimeMillis());
		
	upm.createProtectionElement( pe );
	System.out.println("Created PE with ID: " + pe.getProtectionElementId() );
	return pe;

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

示例10: doAuthorization

import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
/**
 * Method performs the following authorization: Creates a protection element
 * that represents the employee record Creates the employee protection
 * element to protected the Employee's data Create a User in the security
 * schema for Authorization Assigns the employee to a business unit Assigns
 * the employee as the owner of their record Assigns full access to HR
 * Managers only
 * 
 * @param request
 * @param empl
 * @throws CSException
 */
private void doAuthorization(HttpServletRequest request, Employee empl)
		throws Exception {

	try {

		//Create a protection element that represents the employee record
		ProtectionElement pe = new ProtectionElement();
		pe.setObjectId(SecurityUtils.getEmployeeObjectId(empl));
		pe.setProtectionElementName("EMPLOYEE_RECORD_"
				+ empl.getEmployeeId());
		pe
				.setProtectionElementDescription("The gov.nih.nci.security.ri.valueObject.Employee Object");

		//create the employee protection element to protected the
		//employee's data
		getAuthorizationManager().createProtectionElement(pe);

		//Create the User for Authorization
		User user = createUser(empl);

		//Assign the User to the appropriate UserGroup
		getUserProvisioningManager().assignUserToGroup(user.getLoginName(),
				SecurityUtils.getEmployeeGroup(empl));

		//assign the employee as owner of record
		getAuthorizationManager().setOwnerForProtectionElement(
				user.getLoginName(), pe.getObjectId(), null);

		//assign the employee to his business unit
		getAuthorizationManager().assignProtectionElement(
				empl.getBusinessUnit(), pe.getObjectId());

		//If they are not part of HR division then add
		//employee record so that HR managers can view
		//all employee data
		if (!HR_DIVISION.equals(empl.getBusinessUnit())) {
			//assign access to the employee for HR Division
			getAuthorizationManager().assignProtectionElement(HR_DIVISION,
					pe.getObjectId());
		}

	} catch (CSException ex) {
		log
				.fatal(
						"The Security Service encountered a fatal exception.",
						ex);
		throw new Exception(
				"The Security Service encountered a fatal exception.", ex);
	}

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


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