本文整理汇总了Java中gov.nih.nci.security.dao.ProtectionElementSearchCriteria类的典型用法代码示例。如果您正苦于以下问题:Java ProtectionElementSearchCriteria类的具体用法?Java ProtectionElementSearchCriteria怎么用?Java ProtectionElementSearchCriteria使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProtectionElementSearchCriteria类属于gov.nih.nci.security.dao包,在下文中一共展示了ProtectionElementSearchCriteria类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: searchObjects
import gov.nih.nci.security.dao.ProtectionElementSearchCriteria; //导入依赖的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;
}
示例2: searchObjects
import gov.nih.nci.security.dao.ProtectionElementSearchCriteria; //导入依赖的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;
}
示例3: deleteProtectionElement
import gov.nih.nci.security.dao.ProtectionElementSearchCriteria; //导入依赖的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);
}
}
示例4: buildAssociationObject
import gov.nih.nci.security.dao.ProtectionElementSearchCriteria; //导入依赖的package包/类
public void buildAssociationObject(UserProvisioningManager userProvisioningManager) throws Exception
{
Collection associatedProtectionElements = (Collection)userProvisioningManager.getProtectionElements(this.protectionGroupId);
ProtectionElement protectionElement = new ProtectionElement();
SearchCriteria searchCriteria = new ProtectionElementSearchCriteria(protectionElement);
Collection totalProtectionElements = (Collection)userProvisioningManager.getObjects(searchCriteria);
Collection availableProtectionElements = ObjectSetUtil.minus(totalProtectionElements,associatedProtectionElements);
request.setAttribute(DisplayConstants.ASSIGNED_SET, associatedProtectionElements);
request.setAttribute(DisplayConstants.AVAILABLE_SET, availableProtectionElements);
}