KickJava   Java API By Example, From Geeks To Geeks.

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


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 content.
13  *
14  * @author gavinc
15  */

16 public class InviteContentUsersWizard extends InviteUsersWizard
17 {
18    private static final String JavaDoc WIZARD_TITLE_ID = "invite_content_title";
19    private static final String JavaDoc WIZARD_DESC_ID = "invite_content_desc";
20    private static final String JavaDoc STEP1_DESCRIPTION_ID = "invite_content_step1_desc";
21    
22    /** Cache of available content permissions */
23    Set JavaDoc<String JavaDoc> contentPermissions = 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.contentPermissions == null)
51       {
52          this.contentPermissions = this.permissionService.getSettablePermissions(ContentModel.TYPE_CONTENT);
53       }
54        
55       return this.contentPermissions;
56    }
57
58    @Override JavaDoc
59    protected Node getNode()
60    {
61       return this.browseBean.getDocument();
62    }
63 }
64
Popular Tags