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

Java SearchCriteria类代码示例

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

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



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

示例1: searchObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public SearchResult searchObjects(UserProvisioningManager userProvisioningManager) throws Exception 
{
	ProtectionElement protectionElement = new ProtectionElement();
	
	if (this.protectionElementName != null && !(this.protectionElementName.trim().equalsIgnoreCase("")))
		protectionElement.setProtectionElementName(this.protectionElementName);
	if (this.protectionElementType != null && !(this.protectionElementType.trim().equalsIgnoreCase("")))
		protectionElement.setProtectionElementType(this.protectionElementType);
	if (this.protectionElementObjectId != null && !(this.protectionElementObjectId.trim().equalsIgnoreCase("")))
		protectionElement.setObjectId(this.protectionElementObjectId);
	if (this.protectionElementAttribute != null && !(this.protectionElementAttribute.trim().equalsIgnoreCase("")))
		protectionElement.setAttribute(this.protectionElementAttribute);
	if (this.protectionElementValue != null && !(this.protectionElementValue.trim().equalsIgnoreCase("")))
		protectionElement.setValue(this.protectionElementValue);
	
	SearchCriteria searchCriteria = new ProtectionElementSearchCriteria(protectionElement);
	List list = userProvisioningManager.getObjects(searchCriteria);
	SearchResult searchResult = new SearchResult();
	searchResult.setSearchResultMessage(searchCriteria.getMessage());
	searchResult.setSearchResultObjects(list);
	return searchResult;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:23,代码来源:ProtectionElementForm.java


示例2: searchObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public SearchResult searchObjects(UserProvisioningManager userProvisioningManager) throws Exception 
{
	ProtectionElement protectionElement = new ProtectionElement();
	
	if (this.protectionElementName != null && !(this.protectionElementName.trim().equalsIgnoreCase("")))
		protectionElement.setProtectionElementName(this.protectionElementName);
	if (this.protectionElementType != null && !(this.protectionElementType.trim().equalsIgnoreCase("")))
		protectionElement.setProtectionElementType(this.protectionElementType);
	if (this.protectionElementObjectId != null && !(this.protectionElementObjectId.trim().equalsIgnoreCase("")))
		protectionElement.setObjectId(this.protectionElementObjectId);
	if (this.protectionElementAttribute != null && !(this.protectionElementAttribute.trim().equalsIgnoreCase("")))
		protectionElement.setAttribute(this.protectionElementAttribute);
	
	SearchCriteria searchCriteria = new ProtectionElementSearchCriteria(protectionElement);
	List list = userProvisioningManager.getObjects(searchCriteria);
	SearchResult searchResult = new SearchResult();
	searchResult.setSearchResultMessage(searchCriteria.getMessage());
	searchResult.setSearchResultObjects(list);
	return searchResult;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:21,代码来源:SearchProtectionElementForm.java


示例3: searchObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public SearchResult searchObjects(UserProvisioningManager userProvisioningManager) throws Exception {
	User user = new User();
	
	if (this.userLoginName != null && !(this.userLoginName.trim().equalsIgnoreCase("")))
		user.setLoginName(this.userLoginName);
	if (this.userFirstName != null && !(this.userFirstName.trim().equalsIgnoreCase("")))
		user.setFirstName(this.userFirstName);
	if (this.userLastName != null && !(this.userLastName.trim().equalsIgnoreCase("")))
		user.setLastName(this.userLastName);
	if (this.userOrganization != null && !(this.userOrganization.trim().equalsIgnoreCase("")))
		user.setOrganization(this.userOrganization);
	if (this.userDepartment != null && !(this.userDepartment.trim().equalsIgnoreCase("")))
		user.setDepartment(this.userDepartment);
	if (this.userEmailId != null && !(this.userEmailId.trim().equalsIgnoreCase("")))
		user.setEmailId(this.userEmailId);
	
	SearchCriteria searchCriteria = new UserSearchCriteria(user);
	List list = userProvisioningManager.getObjects(searchCriteria);
	SearchResult searchResult = new SearchResult();
	searchResult.setSearchResultMessage(searchCriteria.getMessage());
	searchResult.setSearchResultObjects(list);
	return searchResult;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:24,代码来源:SearchUserForm.java


示例4: buildDisplayForm

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public void buildDisplayForm(UserProvisioningManager userProvisioningManager) throws Exception
{
	ConfigurationProperties configurationProperties = new ConfigurationProperties();
	SearchCriteria searchCriteria = new SystemConfigurationSearchCriteria(configurationProperties);
		ArrayList formElements = new ArrayList();
	List configList = userProvisioningManager.getObjects(searchCriteria);

	if (configList != null && !(configList.size() == 0))
	{
		Iterator iterator = configList.iterator();
		while (iterator.hasNext())
		{
			ConfigurationProperties configProperties = (ConfigurationProperties) iterator.next();
			formElements.add(new FormElement(configProperties.getPropertyKey(),configProperties.getPropertyKey(),StringUtils.initString(configProperties.getPropertyValue()),DisplayConstants.INPUT_BOX, DisplayConstants.REQUIRED, DisplayConstants.NOT_DISABLED));
		}
	}
	setFormElementList(formElements);
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:19,代码来源:SystemConfigurationForm.java


示例5: deleteProtectionElement

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
@SuppressWarnings(UNCHECKED) // CSM API is untyped
public void deleteProtectionElement(StudyConfiguration studyConfiguration) throws CSException {
    ProtectionElement element = createProtectionElementInstance(studyConfiguration);
    SearchCriteria elementCriteria = new ProtectionElementSearchCriteria(element);
    List<ProtectionElement> retrievedElements = getAuthorizationManager().getObjects(elementCriteria);
    for (ProtectionElement pe : retrievedElements) {
        getAuthorizationManager().removeProtectionElement(String.valueOf(pe.getProtectionElementId()));
    }
    List<AuthorizedStudyElementsGroup> authStudyElementsGroups =
                                            studyConfiguration.getAuthorizedStudyElementsGroups();
    for (AuthorizedStudyElementsGroup aseg : authStudyElementsGroups) {
        deleteProtectionElement(aseg);
    }
}
 
开发者ID:NCIP,项目名称:caintegrator,代码行数:19,代码来源:SecurityManagerImpl.java


示例6: getUnauthorizedGroups

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
@SuppressWarnings(UNCHECKED)
public Collection<Group> getUnauthorizedGroups(StudyConfiguration studyConfiguration) throws CSException {
    SearchCriteria criteria = new GroupSearchCriteria(new Group());
    List<Group> groups = getAuthorizationManager().getObjects(criteria);
    List<AuthorizedStudyElementsGroup> authorizedGroups = studyConfiguration.getAuthorizedStudyElementsGroups();
    final List<String> authorizedGroupNames = Lists.newArrayList();
    for (AuthorizedStudyElementsGroup aseg : authorizedGroups) {
        authorizedGroupNames.add(aseg.getAuthorizedGroup().getGroupName());
    }
    Collection<Group> results = Collections2.filter(groups, new Predicate<Group>() {
        @Override
        public boolean apply(Group group) {
            return !authorizedGroupNames.contains(group.getGroupName());
        }
    });
    return results;
}
 
开发者ID:NCIP,项目名称:caintegrator,代码行数:22,代码来源:SecurityManagerImpl.java


示例7: testKunalCode

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public void testKunalCode(){
	try{
		Collection associatedGroups = (Collection)upm.getGroups("5020");
           Group group = new Group();
           group.setGroupName("Group_Name%");
           SearchCriteria searchCriteria = new GroupSearchCriteria(group);
           Collection totalGroups = (Collection)upm.getObjects(searchCriteria);
           Collection availableGroups = ObjectSetUtil.minus(totalGroups,associatedGroups);
	}catch(Exception ex){
		ex.printStackTrace();
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:13,代码来源:TestClient.java


示例8: getObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public void getObjects(){
	try{
		//Role role = new Role();
		//role.setName("role_name_1");
		//Group grp = new Group();
		User user = new User();
		//user.setLoginName("login_name_1");
		//user.setFirstName("%");
		//user.setDepartment("security");
		//ProtectionElement pe = new ProtectionElement();
		//pe.setObjectId("%");
		//pe.setProtectionElementName("PE_name_3");
		//grp.setGroupName("g%");
		//SearchCriteria sc = new RoleSearchCriteria(role);
		//SearchCriteria sc = new ProtectionElementSearchCriteria(pe);
		SearchCriteria sc = new UserSearchCriteria(user);
		System.out.print(new java.util.Date());
		List result = upm.getObjects(sc);
		System.out.println(result.size());
		System.out.print(new java.util.Date());
		   Iterator it = result.iterator();
		   //while(it.hasNext()){
		   //	Role p = (Role)it.next();
		   	//User usr = (User)it.next();
		   	//System.out.println(usr.getFirstName()+":"+usr.getLastName());
		   //}
	}catch(Exception ex){
		ex.printStackTrace();
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:31,代码来源:TestClient.java


示例9: addFiltersForGroups

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * It then retrieves the Persistent Class from the passed Configuration Object using the class name for which the filter is defined.
 * It then adds the filter to the persistent class by setting the filtering query.
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param configuration The Hibernate Configuration initialized for this application
 * 
 */
public static void addFiltersForGroups(AuthorizationManager authorizationManager,Configuration configuration)
{
	boolean needsOptimisation = false;
	Properties props = configuration.getProperties();
	
	if(!isExistActiveMappingElement(authorizationManager))
		needsOptimisation = isMySQLDatabase(props,true);
	
	FilterClause searchFilterClause = new FilterClause();
	searchFilterClause.setClassName("*");
	SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
	List list = authorizationManager.getObjects(searchCriteria);
	Iterator iterator = list.iterator();
	while (iterator.hasNext())
	{
		HashMap parameters = new HashMap();
		parameters.put("GROUP_NAMES", new StringType());
		parameters.put("APPLICATION_ID", new LongType());

		FilterClause filterClause = (FilterClause)iterator.next();
		FilterDefinition filterDefinition = new FilterDefinition (
				filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(), "", parameters);
		configuration.addFilterDefinition(filterDefinition);
		PersistentClass persistentClass = configuration.getClassMapping(filterClause.getClassName());
		persistentClass.addFilter(
				filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId()
				, optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForGroup()));
	}
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:39,代码来源:InstanceLevelSecurityHelper.java


示例10: getFiltersForGroups

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * 
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param List<FilterDefinition> The Hibernate FilterDefinition List.
 */
public static List<FilterDefinition> getFiltersForGroups(AuthorizationManager authorizationManager) throws CSException
{
	Properties props = new Properties();
	ApplicationContext ac = authorizationManager.getApplicationContext();
	props.setProperty("hibernate.connection.url", ac.getDatabaseURL());
	props.setProperty("hibernate.connection.username", ac.getDatabaseUserName());
	props.setProperty("hibernate.connection.password", ac.getDatabasePassword());
	props.setProperty("hibernate.connection.driver", ac.getDatabaseDriver());
	props.setProperty("hibernate.dialect", ac.getDatabaseDialect());
	

	boolean needsOptimisation = false;
	if(!isExistActiveMappingElement(authorizationManager))
		needsOptimisation = isMySQLDatabase(props,false);
	

	List<FilterDefinition> filterDefinitionList = new ArrayList<FilterDefinition>();
	FilterClause searchFilterClause = new FilterClause();
	searchFilterClause.setClassName("*");
	SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
	List list = authorizationManager.getObjects(searchCriteria);
	Iterator iterator = list.iterator();
	while (iterator.hasNext())
	{
		HashMap parameters = new HashMap();
		parameters.put("GROUP_NAMES", new StringType());
		parameters.put("APPLICATION_ID", new LongType());

		FilterClause filterClause = (FilterClause)iterator.next();
		FilterDefinition filterDefinition = new FilterDefinition (
				filterClause.getClassName().substring(
						filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(),
						optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForGroup()), 
						parameters);
		if(filterDefinition!=null) filterDefinitionList.add(filterDefinition);
	}
	return filterDefinitionList;
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:46,代码来源:InstanceLevelSecurityHelper.java


示例11: addFilters

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * It then retrieves the Persistent Class from the passed Configuration Object using the class name for which the filter is defined.
 * It then adds the filter to the persistent class by setting the filtering query.
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param configuration The Hibernate Configuration initialized for this application
 */
public static void addFilters(AuthorizationManager authorizationManager,Configuration configuration)
{
	boolean needsOptimisation = false;
	Properties props = configuration.getProperties();
	
	if(!isExistActiveMappingElement(authorizationManager))
		needsOptimisation = isMySQLDatabase(props,true);
	
	
	FilterClause searchFilterClause = new FilterClause();
	searchFilterClause.setClassName("*");
	SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
	List list = authorizationManager.getObjects(searchCriteria);
	Iterator iterator = list.iterator();
	while (iterator.hasNext())
	{
		HashMap parameters = new HashMap();
		parameters.put("USER_NAME", new StringType());
		parameters.put("APPLICATION_ID", new LongType());

		FilterClause filterClause = (FilterClause)iterator.next();
		FilterDefinition filterDefinition = new FilterDefinition (filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(), "", parameters);
		configuration.addFilterDefinition(filterDefinition);
		PersistentClass persistentClass = configuration.getClassMapping(filterClause.getClassName());
		persistentClass.addFilter(
				filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId()
				,optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForUser()));
	}
	
	
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:40,代码来源:InstanceLevelSecurityHelper.java


示例12: getFiltersForUser

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * This method injects the security filters which are created for this application. It retrieves a list of all the filters which have 
 * been defined for this application from the CSM Database. Now for each filter in the list, it creates a new FilterDefinition object.
 * 
 * 
 * @param authorizationManager The CSM AuthorizationManager instance for this application
 * @param List<FilterDefinition> The Hibernate FilterDefinition List.
 */
public static List<FilterDefinition> getFiltersForUser(AuthorizationManager authorizationManager) throws CSException
{
	Properties props = new Properties();
	ApplicationContext ac = authorizationManager.getApplicationContext();
	props.setProperty("hibernate.connection.url", ac.getDatabaseURL());
	props.setProperty("hibernate.connection.username", ac.getDatabaseUserName());
	props.setProperty("hibernate.connection.password", ac.getDatabasePassword());
	props.setProperty("hibernate.connection.driver", ac.getDatabaseDriver());
	props.setProperty("hibernate.dialect", ac.getDatabaseDialect());
	

	boolean needsOptimisation = false;
	if(!isExistActiveMappingElement(authorizationManager))		
		needsOptimisation = isMySQLDatabase(props,false);
	
	List<FilterDefinition> filterDefinitionList = new ArrayList<FilterDefinition>();
	
	FilterClause searchFilterClause = new FilterClause();
	searchFilterClause.setClassName("*");
	SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
	List list = authorizationManager.getObjects(searchCriteria);
	Iterator iterator = list.iterator();
	while (iterator.hasNext())
	{
		HashMap parameters = new HashMap();
		parameters.put("USER_NAME", new StringType());
		parameters.put("APPLICATION_ID", new LongType());

		FilterClause filterClause = (FilterClause)iterator.next();
		FilterDefinition filterDefinition = new FilterDefinition (
				filterClause.getClassName().substring(filterClause.getClassName().lastIndexOf('.') + 1) + filterClause.getId(),  
				optimiseFilterQuery(needsOptimisation,filterClause.getGeneratedSQLForUser()),
				parameters);
		if(filterDefinition!=null) filterDefinitionList.add(filterDefinition);
	}
	return filterDefinitionList;
	
	
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:48,代码来源:InstanceLevelSecurityHelper.java


示例13: FilterClause

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
/**
 * Retrieve all CSM FilterClause from DB
 * @param authorizationManager
 * @return FilterClauses found
 */
@SuppressWarnings("unchecked")
private static List<FilterClause>retriveAllCsmFilterClause (AuthorizationManager authorizationManager )
{
	List<FilterClause> rtnList=null;
	// Inject CSM defined Filters
	FilterClause searchFilterClause = new FilterClause();
	searchFilterClause.setClassName("*");
	SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchFilterClause);
	rtnList = (List<FilterClause>)authorizationManager.getObjects(searchCriteria);
	return rtnList;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:17,代码来源:InstanceLevelSecurityHelper.java


示例14: testGetObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
private void testGetObjects() throws Exception {
	FilterClause searchClause = new FilterClause();	
	SearchCriteria searchCriteria = new FilterClauseSearchCriteria(searchClause);
	List list = authorizationManager.getObjects(searchCriteria);
	System.out.println("InstanceLevelSecurityTest.testGetObjects()...result size:"+list.size());
	for(Object obj : list)
	{
		try {
			printObject(obj, false);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:15,代码来源:InstanceLevelSecurityTest.java


示例15: searchObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public SearchResult searchObjects(UserProvisioningManager userProvisioningManager) throws Exception {
	//UserProvisioningManager userProvisioningManager = (UserProvisioningManager)(request.getSession()).getAttribute(DisplayConstants.USER_PROVISIONING_MANAGER);
	Application application = new Application();
	if (this.applicationName != null && !(this.applicationName.trim().equalsIgnoreCase("")))
		application.setApplicationName(this.applicationName);
	
	SearchCriteria searchCriteria = new ApplicationSearchCriteria(application);
	List list = userProvisioningManager.getObjects(searchCriteria);
	SearchResult searchResult = new SearchResult();
	searchResult.setSearchResultMessage(searchCriteria.getMessage());
	searchResult.setSearchResultObjects(list);
	return searchResult;
	
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:15,代码来源:ApplicationForm.java


示例16: buildAssociationObject

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public void buildAssociationObject(UserProvisioningManager userProvisioningManager) throws Exception {
	Collection associatedUsers = (Collection)userProvisioningManager.getOwners(this.associatedProtectionElementId.toString());
	
	User user = new User();
	SearchCriteria searchCriteria = new UserSearchCriteria(user);
	Collection totalUsers = (Collection)userProvisioningManager.getObjects(searchCriteria);
	Collection availableUsers = ObjectSetUtil.minus(totalUsers,associatedUsers);
	request.setAttribute(DisplayConstants.ASSIGNED_SET, associatedUsers);
	request.setAttribute(DisplayConstants.AVAILABLE_SET, availableUsers);
	
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:12,代码来源:ApplicationForm.java


示例17: searchObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public SearchResult searchObjects(UserProvisioningManager userProvisioningManager) throws Exception 
{
	Role role = new Role();
	if (this.roleName != null && !(this.roleName.trim().equalsIgnoreCase("")))
		role.setName(this.roleName);
	
	SearchCriteria searchCriteria = new RoleSearchCriteria(role);
	List list = userProvisioningManager.getObjects(searchCriteria);
	SearchResult searchResult = new SearchResult();
	searchResult.setSearchResultMessage(searchCriteria.getMessage());
	searchResult.setSearchResultObjects(list);
	return searchResult;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:14,代码来源:RoleForm.java


示例18: buildAssociationObject

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public void buildAssociationObject(UserProvisioningManager userProvisioningManager) throws Exception 
{
	Collection associatedPrivileges = (Collection)userProvisioningManager.getPrivileges(this.roleId);
	
	Privilege privilege = new Privilege();
	SearchCriteria searchCriteria = new PrivilegeSearchCriteria(privilege);
	Collection totalPrivileges = (Collection)userProvisioningManager.getObjects(searchCriteria);

	Collection availablePrivileges = ObjectSetUtil.minus(totalPrivileges,associatedPrivileges);
	
	request.setAttribute(DisplayConstants.ASSIGNED_SET, associatedPrivileges);
	request.setAttribute(DisplayConstants.AVAILABLE_SET, availablePrivileges);
	
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:15,代码来源:RoleForm.java


示例19: buildAssociationObject

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public void buildAssociationObject(UserProvisioningManager userProvisioningManager) throws Exception 
{
	Collection associatedProtectionGroups = userProvisioningManager.getProtectionGroups(this.protectionElementId);
	
	ProtectionGroup protectionGroup = new ProtectionGroup();
	SearchCriteria searchCriteria = new ProtectionGroupSearchCriteria(protectionGroup);
	Collection totalProtectionGroups = (Collection)userProvisioningManager.getObjects(searchCriteria);

	Collection availableProtectionGroups = ObjectSetUtil.minus(totalProtectionGroups,associatedProtectionGroups);
	
	request.setAttribute(DisplayConstants.ASSIGNED_SET, associatedProtectionGroups);
	request.setAttribute(DisplayConstants.AVAILABLE_SET, availableProtectionGroups);
	
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:15,代码来源:ProtectionElementForm.java


示例20: searchObjects

import gov.nih.nci.security.dao.SearchCriteria; //导入依赖的package包/类
public SearchResult searchObjects(UserProvisioningManager userProvisioningManager) throws Exception {
	Privilege privilege = new Privilege();
	
	if (this.privilegeName != null && !(this.privilegeName.trim().equalsIgnoreCase("")))
		privilege.setName(this.privilegeName);

	SearchCriteria searchCriteria = new PrivilegeSearchCriteria(privilege);
	List list = userProvisioningManager.getObjects(searchCriteria);
	SearchResult searchResult = new SearchResult();
	searchResult.setSearchResultMessage(searchCriteria.getMessage());
	searchResult.setSearchResultObjects(list);
	return searchResult;
}
 
开发者ID:NCIP,项目名称:common-security-module,代码行数:14,代码来源:PrivilegeForm.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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