本文整理汇总了Java中gov.nih.nci.security.authorization.domainobjects.ProtectionElement.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java ProtectionElement.setValue方法的具体用法?Java ProtectionElement.setValue怎么用?Java ProtectionElement.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nih.nci.security.authorization.domainobjects.ProtectionElement
的用法示例。
在下文中一共展示了ProtectionElement.setValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: searchObjects
import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的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: createProtectionGroup
import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的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;
}
示例3: createProtectionElementInstance
import gov.nih.nci.security.authorization.domainobjects.ProtectionElement; //导入方法依赖的package包/类
private ProtectionElement createProtectionElementInstance(StudyConfiguration studyConfiguration) {
ProtectionElement element = new ProtectionElement();
element.setAttribute(STUDY_ATTRIBUTE);
element.setObjectId(STUDY_OBJECT);
element.setValue(String.valueOf(studyConfiguration.getStudy().getId()));
return element;
}