KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > web > bean > wizard > InviteSpaceUsersWizard


1 package org.alfresco.web.bean.wizard;
2
3 import java.util.Set JavaDoc;
4
5 import javax.faces.context.FacesContext;
6
7 import org.alfresco.model.ContentModel;
8 import org.alfresco.web.app.Application;
9 import org.alfresco.web.bean.repository.Node;
10
11 /**
12  * Concrete implementation providing the ability to invite users to a space.
13  *
14  * @author gavinc
15  */

16 public class InviteSpaceUsersWizard extends InviteUsersWizard
17 {
18    private static final String JavaDoc WIZARD_TITLE_ID = "invite_title";
19    private static final String JavaDoc WIZARD_DESC_ID = "invite_desc";
20    private static final String JavaDoc STEP1_DESCRIPTION_ID = "invite_step1_desc";
21    
22    /** Cache of available folder permissions */
23    Set JavaDoc<String JavaDoc> folderPermissions = null;
24    
25    /**
26     * @see org.alfresco.web.bean.wizard.AbstractWizardBean#getWizardDescription()
27     */

28    public String JavaDoc getWizardDescription()
29    {
30       return Application.getMessage(FacesContext.getCurrentInstance(), WIZARD_DESC_ID);
31    }
32
33    /**
34     * @see org.alfresco.web.bean.wizard.AbstractWizardBean#getWizardTitle()
35     */

36    public String JavaDoc getWizardTitle()
37    {
38       return Application.getMessage(FacesContext.getCurrentInstance(), WIZARD_TITLE_ID);
39    }
40
41    @Override JavaDoc
42    protected String JavaDoc getStep1DescriptionText()
43    {
44       return STEP1_DESCRIPTION_ID;
45    }
46    
47    @Override JavaDoc
48    protected Set JavaDoc<String JavaDoc> getPermissionsForType()
49    {
50       if (this.folderPermissions == null)
51       {
52          this.folderPermissions = this.permissionService.getSettablePermissions(ContentModel.TYPE_FOLDER);
53       }
54        
55       return this.folderPermissions;
56    }
57
58    @Override JavaDoc
59    protected Node getNode()
60    {
61       return this.browseBean.getActionSpace();
62    }
63 }
64
Popular Tags