• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CSObjectNotFoundException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中gov.nih.nci.security.exceptions.CSObjectNotFoundException的典型用法代码示例。如果您正苦于以下问题:Java CSObjectNotFoundException类的具体用法?Java CSObjectNotFoundException怎么用?Java CSObjectNotFoundException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CSObjectNotFoundException类属于gov.nih.nci.security.exceptions包,在下文中一共展示了CSObjectNotFoundException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: AuthorizationManagerImpl

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
public AuthorizationManagerImpl(String applicationContextName, String userOrGroupName, boolean isUserName, URL url) throws CSConfigurationException{
	/**
	 *  Ultimately we have to use ApplicationSessionFactory class
	 *  to get appropriate sessionFcatory for a application.
	 */
	//SessionFactory sf = AuthorizationDAOSessionFactory.getHibernateSessionFactory(applicationContextName);
	SessionFactory sf = ApplicationSessionFactory.getSessionFactory(applicationContextName, url);
	ConfigurationHelper.getInstance(applicationContextName);
	AuthorizationDAOImpl adi = new AuthorizationDAOImpl(sf,applicationContextName, userOrGroupName, isUserName);
	authorizationDAO = (AuthorizationDAO)(adi);
	try
	{
		this.applicationContext = (ApplicationContext)authorizationDAO.getApplication(applicationContextName);
	}
	catch (CSObjectNotFoundException e)
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:21,代码来源:AuthorizationManagerImpl.java


示例2: xtestModifyProtectionGroup

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的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


示例3: xtestModifyPrivilege

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void xtestModifyPrivilege() throws CSObjectNotFoundException, CSTransactionException 
{
	Privilege tempPrivilege = new Privilege();
	java.util.Date CurrentTime = new java.util.Date();
	
	tempPrivilege = userProvisioningManager.getPrivilegeById("11");
	
	tempPrivilege.setName(PrivilegeStringArray[3][0] + "Modified");
	tempPrivilege.setDesc(PrivilegeStringArray[3][1] + "Modified");
	tempPrivilege.setUpdateDate(CurrentTime);
	
	userProvisioningManager.modifyPrivilege(tempPrivilege);

	tempPrivilege = userProvisioningManager.getPrivilegeById("11");
	
	assertEquals("\nmodifyPrivilege did not modify the Name\n", PrivilegeStringArray[3][0] + "Modified", tempPrivilege.getName());
	assertEquals("\nmodifyPrivilege did not modify the Description\n", PrivilegeStringArray[3][1] + "Modified", tempPrivilege.getDesc());
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:19,代码来源:UserProvisioningManagerTest.java


示例4: handleNewSample

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private static void handleNewSample(Sample s, Project p) throws CSTransactionException, CSObjectNotFoundException {
    final ProtectionGroup pg = getProtectionGroup(s);
    final User csmUser = CaArrayUsernameHolder.getCsmUser();

    for (final User u : p.getOwners()) {
        if (!u.equals(csmUser)) {
            addOwner(pg, u);
        }
    }

    final Role readRole = getRoleByName(READ_ROLE);
    final Role writeRole = getRoleByName(WRITE_ROLE);
    for (final AccessProfile ap : p.getAllAccessProfiles()) {
        final Group targetGroup = getTargetGroup(ap);
        if (targetGroup == null) {
            continue;
        }
        final SampleSecurityLevel sampleSecLevel = getSampleSecurityLevel(ap, s);
        handleSampleSecurity(targetGroup, pg, sampleSecLevel, readRole, writeRole);
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:22,代码来源:SecurityUtils.java


示例5: testModifyProtectionGroup

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testModifyProtectionGroup() 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,项目名称:cagrid-general,代码行数:22,代码来源:UserProvisioningManagerTest.java


示例6: testGetProtectionElementById

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testGetProtectionElementById() throws CSObjectNotFoundException
{
	try
	{
		for (int x = 0; x < NumberOfProtectionElementsToTest; x++)
		{
			ProtectionElement obj = new ProtectionElement();
			obj.setProtectionElementName(ProtectionElementStringArray[x][0]);
			SearchCriteria sc = new ProtectionElementSearchCriteria(obj);
			List appList = userProvisioningManager.getObjects(sc);
			ProtectionElement tempProtectionElement = userProvisioningManager.getProtectionElementById(((ProtectionElement) appList.get(0)).getProtectionElementId().toString());
			AssertEqualsForProtectionElements(x, tempProtectionElement);
		}
		assertTrue(true);
	}
	catch (Exception e)
	{
		assertTrue(false);
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:21,代码来源:RegressionTest.java


示例7: createProtectionGroup

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
@SuppressWarnings("PMD.ExcessiveMethodLength")
private static ProtectionGroup createProtectionGroup(Protectable p, User csmUser) throws CSObjectNotFoundException,
        CSTransactionException {

    final ProtectionElement pe = new ProtectionElement();
    final Application application = getApplication();
    pe.setApplication(application);
    pe.setObjectId(p.getClass().getName());
    pe.setAttribute("id");
    pe.setValue(p.getId().toString());
    pe.setUpdateDate(new Date());
    authMgr.createProtectionElement(pe);

    final ProtectionGroup pg = new ProtectionGroup();
    pg.setApplication(application);
    pg.setProtectionElements(Collections.singleton(pe));
    pg.setProtectionGroupName("PE(" + pe.getProtectionElementId() + ") group");
    pg.setUpdateDate(new Date());
    authMgr.createProtectionGroup(pg);

    addOwner(pg, csmUser);
    assignSystemAdministratorAccess(pg);
    return pg;
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:25,代码来源:SecurityUtils.java


示例8: testModifyPrivilege

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testModifyPrivilege() throws CSObjectNotFoundException, CSTransactionException 
{
	Privilege tempPrivilege = new Privilege();
	java.util.Date CurrentTime = new java.util.Date();
	
	tempPrivilege = userProvisioningManager.getPrivilegeById("11");
	
	tempPrivilege.setName(PrivilegeStringArray[3][0] + "Modified");
	tempPrivilege.setDesc(PrivilegeStringArray[3][1] + "Modified");
	tempPrivilege.setUpdateDate(CurrentTime);
	
	userProvisioningManager.modifyPrivilege(tempPrivilege);

	tempPrivilege = userProvisioningManager.getPrivilegeById("11");
	
	assertEquals("\nmodifyPrivilege did not modify the Name\n", PrivilegeStringArray[3][0] + "Modified", tempPrivilege.getName());
	assertEquals("\nmodifyPrivilege did not modify the Description\n", PrivilegeStringArray[3][1] + "Modified", tempPrivilege.getDesc());
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:19,代码来源:UserProvisioningManagerTest.java


示例9: testRemoveUserFromGroup

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testRemoveUserFromGroup() throws CSTransactionException, CSObjectNotFoundException 
{
	int y = 0;
	String tempStringGroupID = "";
	String tempStringUserID = "";
	
	for (int x=0; x<NumberOfUsersToTest; x++)
	{
		if (y == NumberOfGroupsToTest) y = 0;			
		tempStringGroupID = Integer.toString(y + 1);
		tempStringUserID = Integer.toString(x + 2);		
		userProvisioningManager.removeUserFromGroup(tempStringGroupID, tempStringUserID);
		y++;
	}
	
	//Confirm that all associations are removed
	String tempString = "";

	for (int x=0; x<NumberOfUsersToTest; x++)
	{
		tempString = Integer.toString(x+1);
		Set SetOfGroups = userProvisioningManager.getGroups(tempString);

		assertTrue("Group was not cleared from User" + x, SetOfGroups.isEmpty());
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:27,代码来源:UserProvisioningManagerTest.java


示例10: getCollectionForPublicRole

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
public static List<String> getCollectionForPublicRole()
		throws CSObjectNotFoundException {
	List<String> publicProtectionElemLst = new ArrayList<String>();
	String csmContextName = NCIAConfig.getCsmApplicationName()+".";
	NCIASecurityManager mgr = (NCIASecurityManager) SpringApplicationContext
			.getBean("nciaSecurityManager");
	Set<TableProtectionElement> publicPEs = mgr
			.getSecurityMapForPublicRole();
	for (TableProtectionElement tPE : publicPEs) {
		String protectionElementName = tPE.getAttributeValue();
		if (protectionElementName.indexOf("//") != -1) {
			protectionElementName = protectionElementName.replaceFirst(
					csmContextName, "'");
			protectionElementName = protectionElementName.concat("'");
			publicProtectionElemLst .add(protectionElementName);
			System.out.println("!!!public protection group="
					+ protectionElementName);
		}
	}
	return publicProtectionElemLst;
}
 
开发者ID:NCIP,项目名称:national-biomedical-image-archive,代码行数:22,代码来源:AuthorizationService.java


示例11: testGetPrivilegeById

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testGetPrivilegeById() throws CSObjectNotFoundException
{
	try
	{

		for (int x = 0; x < NumberOfPrivilegesToTest; x++)
		{
			Privilege obj = new Privilege();
			obj.setName(PrivilegeStringArray[x][0]);
			SearchCriteria sc = new PrivilegeSearchCriteria(obj);
			List appList = userProvisioningManager.getObjects(sc);
			Privilege tempPrivilege = userProvisioningManager.getPrivilegeById(((Privilege) appList.get(0)).getId().toString());
			assertEquals("\nIncorrect Privilege Name\n", PrivilegeStringArray[x][0], tempPrivilege.getName());
			assertEquals("\nIncorrect Privilege Desc\n", PrivilegeStringArray[x][1], tempPrivilege.getDesc());
		}
		assertTrue(true);
	}
	catch (Exception e)
	{
		assertTrue(false);
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:23,代码来源:RegressionTest.java


示例12: testRemoveUsers

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
@Test
public void testRemoveUsers() throws CSTransactionException, CSObjectNotFoundException {
    User owner = new User();
    Group group = new Group();
    CollaboratorGroup cg = new CollaboratorGroup(group, owner);
    List<Long> toAdd = new ArrayList<Long>();
    toAdd.add(1L);

    action.setTargetGroup(cg);
    action.setUsers(toAdd);
    action.removeUsers();

    List<Long> stubRemove = pstub.getRemovedUsers();
    CollaboratorGroup stubGroup = pstub.getCurrentGroup();
    assertEquals(toAdd.size(), stubRemove.size());
    assertEquals(cg, stubGroup);
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:18,代码来源:CollaboratorsActionTest.java


示例13: testGetGroupById

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testGetGroupById() throws CSObjectNotFoundException 
{
	Group tempGroup;
	String tempString = "";
	
	for (int x=0; x<NumberOfGroupsToTest; x++)  //NumberOfUsersToTest; x++)
	{
		tempString = Integer.toString(x+1);
		
		//Retrieve the User based off the login ID (see setup() for initialization of UserStringArray)
		tempGroup = userProvisioningManager.getGroupById(tempString);
		
		assertEquals("\nIncorrect Group Name\n", GroupStringArray[x][0], tempGroup.getGroupName() );
		assertEquals("\nIncorrect Group Desc\n", GroupStringArray[x][1], tempGroup.getGroupDesc() );
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:17,代码来源:UserProvisioningManagerTest.java


示例14: testModifyApplication

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testModifyApplication() throws CSObjectNotFoundException, CSTransactionException 
{
	Application tempApplication = new Application();
	byte tempFlag = 0;
	java.util.Date midnight_jan2_1970 = new java.util.Date(0);
	
	tempApplication = userProvisioningManager.getApplicationById("3");
	
	tempApplication.setApplicationName(ApplicationStringArray[2][0] + "Modified");
	tempApplication.setApplicationDescription(ApplicationStringArray[2][1] + "Modified");
	tempApplication.setUpdateDate(midnight_jan2_1970);  //TODO: I have no way of testing this without a BIG long wait
	tempApplication.setActiveFlag(tempFlag);
	
	userProvisioningManager.modifyApplication(tempApplication);
	
	tempApplication = userProvisioningManager.getApplicationById("3");
	
	assertEquals("\nmodifyApplication did not modify Application name\n", ApplicationStringArray[2][0] + "Modified", tempApplication.getApplicationName());
	assertEquals("\nmodifyApplication did not modify Application Description\n", ApplicationStringArray[2][1] + "Modified", tempApplication.getApplicationDescription());
	assertEquals("\nmodifyApplication did not modify Application Active Flag\n", tempFlag, tempApplication.getActiveFlag());
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:22,代码来源:UserProvisioningManagerTest.java


示例15: xtestGetProtectionGroupById

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void xtestGetProtectionGroupById() throws CSObjectNotFoundException 
{
	ProtectionGroup tempProtectionGroup;
	String tempString = "";
	byte tempFlag = 0;
	
	for(int x=0; x<NumberOfProtectionGroupsToxtest; x++)
	{
		//java.util.Date CurrentTime = new java.util.Date();
		tempString = Integer.toString(x+1);
		tempProtectionGroup = userProvisioningManager.getProtectionGroupById(tempString);
		
		assertEquals("\nIncorrect Protection Group Name\n", ProtectionGroupStringArray[x][0], tempProtectionGroup.getProtectionGroupName() );
		assertEquals("\nIncorrect Protection Group Desc\n", ProtectionGroupStringArray[x][1], tempProtectionGroup.getProtectionGroupDescription() );
		//assertEquals("\nIncorrect Update Date\n", CurrentTime, tempRole.getUpdateDate() );
		assertEquals("\nIncorrect LargeElementCountFlag\n", tempFlag, tempProtectionGroup.getLargeElementCountFlag() );
		if (tempFlag == 1)
			tempFlag = 0;
		else
			tempFlag = 1;
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:23,代码来源:UserProvisioningManagerTest.java


示例16: testGetApplicationById

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
private void testGetApplicationById() throws CSObjectNotFoundException 
{
	String tempString = "";
	Application tempApplication;
	byte tempFlag = 0;
	
	for (int x=0; x<NumberOfApplicationsToTest; x++)
	{
		tempString = Integer.toString(x+3);  //Loading script loads an app in the database, so 2 is my first id I've created
		tempApplication = userProvisioningManager.getApplicationById(tempString);
		
		assertEquals("\nIncorrect Application Name\n", ApplicationStringArray[x][0], tempApplication.getApplicationName() );
		assertEquals("\nIncorrect Application Description\n", ApplicationStringArray[x][1], tempApplication.getApplicationDescription() );
		assertEquals("\nIncorrect ActiveFlag\n", tempFlag, tempApplication.getActiveFlag() );
		if (tempFlag == 1)
			tempFlag = 0;
		else
			tempFlag = 1;
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:21,代码来源:UserProvisioningManagerTest.java


示例17: AuthorizationManagerImpl

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
/**
 * Constructor for UserProvisioningManagerImpl.
 * @param applicationContextName String
 * @param userOrGroupName 
 * @param isUserName 
 * @throws CSConfigurationException
 */
public AuthorizationManagerImpl(String applicationContextName, String userOrGroupName, boolean isUserName) throws CSConfigurationException{
	/**
	 *  Ultimately we have to use ApplicationSessionFactory class
	 *  to get appropriate sessionFcatory for a application.
	 */
	//SessionFactory sf = AuthorizationDAOSessionFactory.getHibernateSessionFactory(applicationContextName);
	SessionFactory sf = ApplicationSessionFactory.getSessionFactory(applicationContextName);
	AuthorizationDAOImpl adi = new AuthorizationDAOImpl(sf,applicationContextName, userOrGroupName, isUserName);	
	authorizationDAO = (AuthorizationDAO)(adi);
	try
	{
		this.applicationContext = (ApplicationContext)authorizationDAO.getApplication(applicationContextName);
	}
	catch (CSObjectNotFoundException e)
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:27,代码来源:AuthorizationManagerImpl.java


示例18: testAddAndRemoveUsers

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
@Test
public void testAddAndRemoveUsers() throws CSTransactionException, CSObjectNotFoundException {
    final CollaboratorGroup created = this.permissionsManagementService.create(TEST);
    final List<Long> toAdd = new ArrayList<Long>();
    final Long anonId = SecurityUtils.getAnonymousUser().getUserId();
    toAdd.add(anonId);
    toAdd.add(3L);
    toAdd.add(4L);
    this.permissionsManagementService.addUsers(created, toAdd);
    hibernateHelper.getCurrentSession().flush();

    final Group g = (Group) hibernateHelper.getCurrentSession().load(Group.class, created.getGroup().getGroupId());
    final User anonUser = (User) hibernateHelper.getCurrentSession().load(User.class, anonId);
    final User user3 = (User) hibernateHelper.getCurrentSession().load(User.class, 3L);
    final User user4 = (User) hibernateHelper.getCurrentSession().load(User.class, 4L);
    Hibernate.initialize(anonUser.getGroups());
    assertFalse(anonUser.getGroups().contains(g));
    assertTrue(user3.getGroups().contains(g));
    assertTrue(user4.getGroups().contains(g));

    final List<Long> toRemove = new ArrayList<Long>();
    toRemove.add(3L);
    this.permissionsManagementService.removeUsers(created, toRemove);
    hibernateHelper.getCurrentSession().flush();

    hibernateHelper.getCurrentSession().refresh(anonUser);
    hibernateHelper.getCurrentSession().refresh(user3);
    hibernateHelper.getCurrentSession().refresh(user4);
    hibernateHelper.getCurrentSession().refresh(g);
    assertFalse(anonUser.getGroups().contains(g));
    assertFalse(user3.getGroups().contains(g));
    assertTrue(user4.getGroups().contains(g));
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:34,代码来源:PermissionsManagementServiceTest.java


示例19: testGetProtectionGroupById

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的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,项目名称:common-security-module,代码行数:14,代码来源:RegressionTest.java


示例20: AuthorizationDAOImpl

import gov.nih.nci.security.exceptions.CSObjectNotFoundException; //导入依赖的package包/类
public AuthorizationDAOImpl(SessionFactory sf, String applicationContextName) throws CSConfigurationException {
	setHibernateSessionFactory(sf);
	Application app;
	try
	{
		app = this.getApplicationByName(applicationContextName);
	}
	catch (CSObjectNotFoundException e)
	{
		if (log.isDebugEnabled())
			log
					.debug("Authorization|"
							+ applicationContextName
							+ "||AuthorizationDAOImpl|Failure|No Application found for the Context Name|");
		throw new CSConfigurationException(
				"No Application found for the Context Name. "+e.getMessage());
	}
	if (app == null) {
		if (log.isDebugEnabled())
			log
					.debug("Authorization|"
							+ applicationContextName
							+ "||AuthorizationDAOImpl|Failure|No Application found for the Context Name|");
		throw new CSConfigurationException(
				"Unable to retrieve Application with this Context Name");
	}
	this.setApplication(app);
	if (log.isDebugEnabled())
		log
				.debug("Authorization|"
						+ applicationContextName
						+ "||AuthorizationDAOImpl|Success|Instantiated AuthorizationDAOImpl|");

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ClientCertRequest类代码示例发布时间:2022-05-23
下一篇:
Java MDCUtil类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap