本文整理汇总了Java中gov.nih.nci.security.UserProvisioningManager类的典型用法代码示例。如果您正苦于以下问题:Java UserProvisioningManager类的具体用法?Java UserProvisioningManager怎么用?Java UserProvisioningManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserProvisioningManager类属于gov.nih.nci.security包,在下文中一共展示了UserProvisioningManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: cceateDefaultProtectionElementsForProvisioningOperation
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
private String[] cceateDefaultProtectionElementsForProvisioningOperation(UserProvisioningManager upManager, String uptOperationName, Application application) throws CSTransactionException
{
String[] rtnIds=new String[3];
String objectId= Constants.CSM_ACCESS_PRIVILEGE +"_"+uptOperationName;
ProtectionElement accessPe=createUptOperationProtectionElement(upManager, objectId, application);
objectId= Constants.CSM_CREATE_PRIVILEGE +"_"+uptOperationName;
ProtectionElement createPe=createUptOperationProtectionElement(upManager, objectId, application);
rtnIds[0]=createPe.getProtectionElementId().toString();
objectId= Constants.CSM_DELETE_PRIVILEGE +"_"+uptOperationName;
ProtectionElement deletePe=createUptOperationProtectionElement(upManager, objectId, application);
rtnIds[1]=deletePe.getProtectionElementId().toString();
objectId= Constants.CSM_UPDATE_PRIVILEGE +"_"+uptOperationName;
ProtectionElement updatePe=createUptOperationProtectionElement(upManager, objectId, application);
rtnIds[2]=updatePe.getProtectionElementId().toString();
return rtnIds;
}
开发者ID:NCIP,项目名称:common-security-module,代码行数:21,代码来源:ApplicationForm.java
示例2: createUptOperationProtectionElement
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
示例3: buildDisplayForm
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
public void buildDisplayForm(UserProvisioningManager userProvisioningManager) throws Exception
{
User user = userProvisioningManager.getUserById(getUserId());
setUserId(getUserId());
setUserLoginName(user.getLoginName());
setUserFirstName(user.getFirstName());
setUserLastName(user.getLastName());
setUserOrganization(user.getOrganization());
setUserDepartment(user.getDepartment());
setUserTitle(user.getTitle());
setUserPhoneNumber(user.getPhoneNumber());
setUserPassword(user.getPassword());
setUserPasswordConfirm(user.getPassword());
setUserEmailId(user.getEmailId());
}
开发者ID:NCIP,项目名称:common-security-module,代码行数:17,代码来源:AppUserForm.java
示例4: searchObjects
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
示例5: searchObjects
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
示例6: assignProtectionElementToGroup
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
/**
* @param protectionElement
* @param userProvisioningManager
* @param dynamicGroups
* @param i
* @throws CSException
*/
private void assignProtectionElementToGroup(
ProtectionElement protectionElement, String GroupsName)
{
try {
UserProvisioningManager userProvisioningManager = getUserProvisioningManager();
userProvisioningManager.assignProtectionElement(GroupsName,
protectionElement.getObjectId());
Logger.out.debug("Associated protection group: " + GroupsName
+ " to protectionElement"
+ protectionElement.getProtectionElementName());
}
catch (CSException e) {
Logger.out
.error(
"The Security Service encountered an error while associating protection group: "
+ GroupsName
+ " to protectionElement"
+ protectionElement
.getProtectionElementName());
}
}
开发者ID:NCIP,项目名称:wustl-common-package,代码行数:31,代码来源:SecurityManager.java
示例7: getRoles
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
/**
* This method returns Vactor of all the role objects defined for the
* application from the database
*
* @return @throws
* SMException
*/
public Vector getRoles() throws SMException {
Vector roles = new Vector();
UserProvisioningManager userProvisioningManager = null;
try {
userProvisioningManager = getUserProvisioningManager();
roles.add(userProvisioningManager.getRoleById(ADMINISTRATOR_ROLE));
roles.add(userProvisioningManager.getRoleById(SUPERVISOR_ROLE));
roles.add(userProvisioningManager.getRoleById(TECHNICIAN_ROLE));
roles.add(userProvisioningManager.getRoleById(PUBLIC_ROLE));
} catch (CSException e) {
Logger.out.debug("Unable to get roles: Exception: "
+ e.getMessage());
throw new SMException(e.getMessage(), e);
}
return roles;
}
开发者ID:NCIP,项目名称:wustl-common-package,代码行数:24,代码来源:SecurityManager.java
示例8: searchObjects
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
示例9: setOwnershipAssociation
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
public String setOwnershipAssociation() throws Exception
{
HttpServletRequest request = ServletActionContext.getRequest();
UserProvisioningManager userProvisioningManager = (UserProvisioningManager)(request.getSession()).getAttribute(DisplayConstants.USER_PROVISIONING_MANAGER);
UserInfoHelper.setUserInfo(((LoginForm)request.getSession().getAttribute(DisplayConstants.LOGIN_OBJECT)).getLoginId(), request.getSession().getId());
try
{
// TO-DO replace assignProtectionElements with setOwners or such method
userProvisioningManager.assignProtectionElements(protectionElementForm.getProtectionElementId(), protectionElementForm.getOwnershipAssociatedIds());
protectionElementForm.setRequest(request);
protectionElementForm.buildDisplayForm(userProvisioningManager);
addActionMessage("Association Update Successful");
}
catch (CSException cse)
{
addActionError(org.apache.commons.lang.StringEscapeUtils.escapeHtml(cse.getMessage()));
}
return ForwardConstants.SET_PARENT_ASSOCIATION_SUCCESS;
}
开发者ID:NCIP,项目名称:common-security-module,代码行数:21,代码来源:ProtectionElementAction.java
示例10: buildDisplayForm
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
示例11: create
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
protected Privilege create() throws Exception {
UserProvisioningManager upm = SecurityServiceProvider
.getUserProvisioningManager("Security");
Privilege p = new Privilege();
p.setName("ReadTest123");
p.setDesc("Reading test123");
upm.createPrivilege(p);
System.out.println("Created privilege with id: " + p.getId());
return p;
}
开发者ID:NCIP,项目名称:cagrid-general,代码行数:15,代码来源:PrivilegeTest.java
示例12: delete
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
private void delete(Privilege p) throws Exception {
UserProvisioningManager upm = SecurityServiceProvider
.getUserProvisioningManager("security");
upm.removePrivilege("" + p.getId());
System.out.println( "Deleted privilege: " + p.getId());
}
开发者ID:NCIP,项目名称:cagrid-general,代码行数:9,代码来源:PrivilegeTest.java
示例13: assignUserToGroup
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
public void assignUserToGroup(String userGroupname, String userId)throws SMException
{
Logger.out.debug(" userId: " + userId + " userGroupname:" + userGroupname);
if (userId == null || userGroupname == null)
{
Logger.out.debug(" Null or insufficient Parameters passed");
throw new SMException("Null or insufficient Parameters passed");
}
try
{
UserProvisioningManager userProvisioningManager = getUserProvisioningManager();
Group group = getUserGroup(userGroupname);
if (group != null)
{
String[] groupIds = {group.getGroupId().toString()};
assignAdditionalGroupsToUser(userId, groupIds);
}
else
{
Logger.out.debug("No user group with name "+userGroupname+" is present");
}
}
catch(CSException ex)
{
Logger.out.fatal("The Security Service encountered "
+ "a fatal exception.", ex);
throw new SMException(
"The Security Service encountered a fatal exception.", ex);
}
}
开发者ID:NCIP,项目名称:wustl-common-package,代码行数:35,代码来源:SecurityManager.java
示例14: deAssignProtectionElements
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
/**
* @param protectionGroupName
* @param objectType
* @param objectIds
* @throws SMException
*/
private void deAssignProtectionElements(String protectionGroupName,
Class objectType, Long[] objectIds) throws SMException {
try {
Logger.out.debug("Protection Group Name:" + protectionGroupName
+ " protectionElementIds:"
+ Utility.getArrayString(objectIds));
if (protectionGroupName == null || objectType == null
|| objectIds == null) {
Logger.out
.debug("Cannot disassign protection elements. One of the parameters is null.");
throw new SMException(
"Could not deassign Protection elements to protection group. One of the parameters is null.");
}
UserProvisioningManager userProvisioningManager = getUserProvisioningManager();
for (int i = 0; i < objectIds.length; i++) {
try {
Logger.out.debug(" protectionGroupName:"
+ protectionGroupName + " objectId:"
+ objectType.getName() + "_" + objectIds[i]);
userProvisioningManager.deAssignProtectionElements(
protectionGroupName, objectType.getName() + "_"
+ objectIds[i]);
} catch (CSTransactionException txex) //thrown when no
// association exists
{
Logger.out.debug("Exception:" + txex.getMessage(), txex);
}
}
} catch (CSException csex) {
Logger.out
.debug(
"Could not deassign Protection elements to protection group",
csex);
throw new SMException(
"Could not deassign Protection elements to protection group",
csex);
}
}
开发者ID:NCIP,项目名称:wustl-common-package,代码行数:45,代码来源:SecurityManager.java
示例15: createDefaultUptProtectionGroup
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
private ProtectionGroup createDefaultUptProtectionGroup(UserProvisioningManager upManager, String pgName, Application application) throws CSTransactionException
{
ProtectionGroup pg=new ProtectionGroup();
pg.setProtectionGroupName(pgName);
pg.setProtectionGroupDescription("Default protection group for \""+pgName +"\"; Do not chnage name.");
upManager.createProtectionGroup(pg);
// pg has been as to current application
//set it to target application
pg.setApplication(application);
upManager.modifyProtectionGroup(pg);
return pg;
}
开发者ID:NCIP,项目名称:common-security-module,代码行数:13,代码来源:ApplicationForm.java
示例16: getUserProvisioningManager
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
private static UserProvisioningManager getUserProvisioningManager() throws CSException{
if(userProvisioningManager==null) {
userProvisioningManager = SecurityServiceProvider.getUserProvisioningManager(application +
"");
}
return userProvisioningManager;
}
开发者ID:NCIP,项目名称:stats-application-commons,代码行数:8,代码来源:SecurityManager.java
示例17: searchObjects
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
示例18: processUptOperation
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
private void processUptOperation(UserProvisioningManager uptManager, String userId, String applicationName) throws CSTransactionException
{
checkPermissionForUptOperation(uptManager,Constants.UPT_USER_OPERATION, userId, applicationName);
checkPermissionForUptOperation(uptManager,Constants.UPT_PROTECTION_ELEMENT_OPERATION, userId, applicationName);
checkPermissionForUptOperation(uptManager,Constants.UPT_PRIVILEGE_OPERATION, userId, applicationName);
checkPermissionForUptOperation(uptManager,Constants.UPT_GROUP_OPERATION, userId, applicationName);
checkPermissionForUptOperation(uptManager,Constants.UPT_PROTECTION_GROUP_OPERATION, userId, applicationName);
checkPermissionForUptOperation(uptManager,Constants.UPT_ROLE_OPERATION, userId, applicationName);
checkPermissionForUptOperation(uptManager,Constants.UPT_INSTANCE_LEVEL_OPERATION, userId, applicationName);
}
开发者ID:NCIP,项目名称:common-security-module,代码行数:11,代码来源:LoginAction.java
示例19: getPGByPGName
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的package包/类
public ProtectionGroup getPGByPGName(String pgName) throws Exception {
UserProvisioningManager upm = getUpm();
ProtectionGroup pg = new ProtectionGroup();
pg.setProtectionGroupName(pgName);
SearchCriteria searchCriteria = new ProtectionGroupSearchCriteria(pg);
List<ProtectionGroup> list = upm.getObjects(searchCriteria);
return list.get(0);
}
开发者ID:NCIP,项目名称:national-biomedical-image-archive,代码行数:10,代码来源:getData.java
示例20: searchObjects
import gov.nih.nci.security.UserProvisioningManager; //导入依赖的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
注:本文中的gov.nih.nci.security.UserProvisioningManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论