本文整理汇总了Java中gov.nih.nci.security.authorization.domainobjects.Group.setGroupDesc方法的典型用法代码示例。如果您正苦于以下问题:Java Group.setGroupDesc方法的具体用法?Java Group.setGroupDesc怎么用?Java Group.setGroupDesc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nih.nci.security.authorization.domainobjects.Group
的用法示例。
在下文中一共展示了Group.setGroupDesc方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public CollaboratorGroup create(String name) throws CSTransactionException, CSObjectNotFoundException {
LogUtil.logSubsystemEntry(LOG, name);
final Group group = new Group();
group.setGroupName(name);
group.setGroupDesc("Collaborator Group");
SecurityUtils.createGroup(group);
final User user = CaArrayUsernameHolder.getCsmUser();
final CollaboratorGroup cg = new CollaboratorGroup(group, user);
this.collaboratorGroupDao.save(cg);
LogUtil.logSubsystemExit(LOG);
return cg;
}
示例2: testGroupCreate
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
public void testGroupCreate(){
//UserProvisioningManager upm = SecurityServiceProvider.getUserProvisioningManger("Security");
try{
for(int i=1;i<101;i++){
Group grp = new Group();
grp.setGroupName("Group_Name_"+i);
grp.setGroupDesc("Group_Desc_"+i);
upm.createGroup(grp);
}
}catch(Exception ex){
ex.printStackTrace();
}
}
示例3: edit
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
/**
* Tests editing of an authorized user group.
*/
@SuppressWarnings("unchecked")
@Test
public void edit() {
Group group = new Group();
group.setGroupName("Test Group");
group.setGroupDesc("Description");
group.setUsers(new HashSet<User>());
group.getUsers().add(new User());
AuthorizedStudyElementsGroup authorizedGroup = new AuthorizedStudyElementsGroup();
authorizedGroup.setAuthorizedGroup(group);
action.setAuthorizedGroup(authorizedGroup);
action.setSelectedGroupId(1L);
action.setGroupMembers(new ArrayList<User>());
assertEquals(Action.SUCCESS, action.edit());
assertNotNull(action.getTrees());
}
示例4: xtestModifyGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private void xtestModifyGroup() throws CSTransactionException, CSObjectNotFoundException
{
Group tempGroup = new Group();
java.util.Date CurrentTime = new java.util.Date();
tempGroup = userProvisioningManager.getGroupById("4");
tempGroup.setGroupName(GroupStringArray[3][0] + "Modified");
tempGroup.setGroupDesc(GroupStringArray[3][1] + "Modified");
tempGroup.setUpdateDate(CurrentTime);
userProvisioningManager.modifyGroup(tempGroup);
tempGroup = userProvisioningManager.getGroupById("4");
assertEquals("\nmodifyGroup did not modify Group Name\n", GroupStringArray[3][0] + "Modified", tempGroup.getGroupName());
assertEquals("\nmodifyGroup did not modify Group Description\n", GroupStringArray[3][1] + "Modified", tempGroup.getGroupDesc());
}
示例5: testGroupCreate
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
public void testGroupCreate(){
//UserProvisioningManager upm = SecurityServiceProvider.getUserProvisioningManger("Security");
try{
for(int i=1;i<101;i++){
Group grp = new Group();
grp.setGroupName("Group_Name_"+i);
grp.setGroupDesc("Group_Desc_"+i);
upm.createGroup(grp);
}
}catch(Exception ex){
ex.printStackTrace();
}
}
示例6: setUp
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
securityManager = new SecurityManagerImpl();
securityManager.setAuthorizationManagerFactory(authManagerFactory);
authorizedStudyElementsGroup = new AuthorizedStudyElementsGroup();
authorizedStudyElementsGroup.setId(Long.valueOf(1));
authorizedStudyElementsGroup.setAuthorizedGroup(new Group());
studyConfiguration = new StudyConfiguration();
UserWorkspace workspace = new UserWorkspace();
studyConfiguration.setUserWorkspace(workspace);
workspace.setUsername("user");
Group group = new Group();
group.setGroupName("Authorized Group");;
group.setGroupDesc("This is an Authorized Group");
AuthorizedStudyElementsGroup authorizedGroup = new AuthorizedStudyElementsGroup();
authorizedGroup.setAuthorizedGroup(group);
studyConfiguration.getAuthorizedStudyElementsGroups().add(authorizedGroup);
}
示例7: testAssignUsersToGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void testAssignUsersToGroup() throws Exception {
final Group group = new Group();
group.setGroupName("testGroup");
group.setGroupDesc("some desc");
SecurityUtils.createGroup(group);
this.garbage.add(group);
final User u = new User();
u.setLastName("ll");
u.setFirstName("ff");
u.setLoginName("lll");
SecurityUtils.getAuthorizationManager().createUser(u);
this.garbage.add(u);
final Long groupId = group.getGroupId();
final Set<Long> userIds = Collections.singleton(u.getUserId());
SecurityUtils.assignUsersToGroup(groupId, userIds);
this.tx.commit();
final Set<User> members = SecurityUtils.getAuthorizationManager().getUsers(group.getGroupId().toString());
assertEquals(1L, members.size());
assertEquals(u.getUserId(), members.iterator().next().getUserId());
}
示例8: setupGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private AccessProfile setupGroup() throws Exception {
final AuthorizationManager am = SecurityUtils.getAuthorizationManager();
Group group = new Group();
group.setGroupName("Foo");
group.setGroupDesc("Collaborator Group");
group.setApplication(SecurityUtils.getApplication());
am.createGroup(group);
final String[] groupMembers = { am.getUser(CAARRAY_USER).getUserId().toString() };
am.assignUsersToGroup(group.getGroupId().toString(), groupMembers);
CollaboratorGroup cg = new CollaboratorGroup(group, CaArrayUsernameHolder.getCsmUser());
collabDao.save(cg);
Project p = searchDao.retrieve(Project.class, DUMMY_PROJECT_1.getId());
return p.addGroupProfile(cg);
}
示例9: prepareTest
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
/**
* Sets up the tests.
*/
@Before
public void prepareTest() throws Exception {
super.setUp();
action = new EditAuthorizedGroupAction();
action.setWorkspaceService(workspaceService);
Group group = new Group();
group.setGroupName("Test Group");
group.setGroupDesc("Description");
authorizationManager = mock(AuthorizationManager.class);
securityManager = mock(SecurityManager.class);
when(securityManager.getUnauthorizedGroups(any(StudyConfiguration.class))).thenReturn(Arrays.asList(group));
when(securityManager.getAuthorizationManager()).thenReturn(authorizationManager);
action.setSecurityManager(securityManager);
studyManagementService = mock(StudyManagementService.class);
when(studyManagementService.getRefreshedEntity(any(AbstractCaIntegrator2Object.class))).thenAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
Object arg = invocation.getArguments()[0];
if (arg instanceof AnnotationFieldDescriptor) {
AnnotationFieldDescriptor descriptor = (AnnotationFieldDescriptor) arg;
AnnotationDefinition definition = new AnnotationDefinition();
definition.setDataType(AnnotationTypeEnum.STRING);
descriptor.setDefinition(definition);
arg = descriptor;
}
return arg;
}
});
action.setStudyManagementService(studyManagementService);
action.clearErrorsAndMessages();
}
示例10: testCreateGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private void testCreateGroup() throws CSTransactionException
{
for (int x = 0; x < NumberOfGroupsToTest; x++)
{
Group tempGroup = new Group();
java.util.Date CurrentTime = new java.util.Date();
tempGroup.setGroupName(GroupStringArray[x][0]);
tempGroup.setGroupDesc(GroupStringArray[x][1]);
tempGroup.setUpdateDate(CurrentTime);
userProvisioningManager.createGroup(tempGroup);
}
}
示例11: testCreateGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private void testCreateGroup() throws CSTransactionException
{
for (int x=0; x<NumberOfGroupsToTest; x++)
{
Group tempGroup = new Group();
java.util.Date CurrentTime = new java.util.Date();
tempGroup.setGroupName(GroupStringArray[x][0]);
tempGroup.setGroupDesc(GroupStringArray[x][1]);
tempGroup.setUpdateDate(CurrentTime);
userProvisioningManager.createGroup(tempGroup);
}
}
示例12: testFindGroupByName
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
/**
* Test of findGroupByName method, of class SecurityUtils.
*/
@Test
public void testFindGroupByName() throws Exception {
final Group group = new Group();
group.setGroupName("testGroup");
group.setGroupDesc("some desc");
SecurityUtils.getAuthorizationManager().createGroup(group);
this.garbage.add(group);
final Group g = SecurityUtils.findGroupByName(group.getGroupName());
assertEquals(group.getGroupId(), g.getGroupId());
}
示例13: testCreateGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private static void testCreateGroup() throws CSTransactionException
{
for (int x=0; x<NumberOfGroupsToTest; x++)
{
Group tempGroup = new Group();
java.util.Date CurrentTime = new java.util.Date();
tempGroup.setGroupName(GroupStringArray[x][0]);
tempGroup.setGroupDesc(GroupStringArray[x][1]);
tempGroup.setUpdateDate(CurrentTime);
userProvisioningManager.createGroup(tempGroup);
}
}
示例14: xtestCreateGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private void xtestCreateGroup() throws CSTransactionException
{
for (int x=0; x<NumberOfGroupsToxtest; x++)
{
Group tempGroup = new Group();
java.util.Date CurrentTime = new java.util.Date();
tempGroup.setGroupName(GroupStringArray[x][0]);
tempGroup.setGroupDesc(GroupStringArray[x][1]);
tempGroup.setUpdateDate(CurrentTime);
userProvisioningManager.createGroup(tempGroup);
}
}
示例15: testCreateGroup
import gov.nih.nci.security.authorization.domainobjects.Group; //导入方法依赖的package包/类
private static void testCreateGroup() throws CSTransactionException
{
for (int x=0; x<NumberOfGroupsToTest; x++)
{
Group tempGroup = new Group();
java.util.Date CurrentTime = new java.util.Date();
tempGroup.setGroupName(GroupStringArray[x][0]);
tempGroup.setGroupDesc(GroupStringArray[x][1]);
tempGroup.setUpdateDate(CurrentTime);
userProvisioningManager.createGroup(tempGroup);
}
}