]>
git.argeo.org Git - gpl/argeo-slc.git/blob - ChangeRightsWizard.java
99dd8e1438908bab779c41d2225ade963d0e76af
2 * Copyright (C) 2007-2012 Argeo GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.slc
.client
.ui
.dist
.wizards
;
18 import javax
.jcr
.RepositoryException
;
19 import javax
.jcr
.Session
;
21 import org
.argeo
.ArgeoException
;
22 import org
.argeo
.jcr
.JcrUtils
;
23 import org
.eclipse
.jface
.wizard
.Wizard
;
26 * Small wizard to manage authorizations on the root node of the current
29 public class ChangeRightsWizard
extends Wizard
{
31 private Session currentSession
;
34 private ChooseRightsPage page
;
36 public ChangeRightsWizard(Session currentSession
) {
38 this.currentSession
= currentSession
;
42 public void addPages() {
44 page
= new ChooseRightsPage();
46 } catch (Exception e
) {
47 throw new ArgeoException("Cannot add page to wizard ", e
);
52 public boolean performFinish() {
56 JcrUtils
.addPrivilege(currentSession
, "/", page
.getGroupName(),
57 page
.getAuthTypeStr());
58 } catch (RepositoryException re
) {
59 throw new ArgeoException(
60 "Unexpected error while setting privileges", re
);