Package org.jboss.seam.wiki.core.action.prefs

Examples of org.jboss.seam.wiki.core.action.prefs.WikiPreferences


            protected void beforeRequest() {
                setParameter("documentId", "6");
            }

            protected void renderResponse() throws Exception {
                WikiPreferences wikiPrefs = Preferences.instance().get(WikiPreferences.class);
                assert wikiPrefs.getShowDocumentCreatorHistory();
                assert wikiPrefs.getShowTags();
                assert wikiPrefs.getDefaultDocumentId().equals(6l);
                assert wikiPrefs.getMemberArea().equals("Members");
            }

        }.run();
    }
View Full Code Here


                                   Integer currentAccessLevel,
                                   String tag,
                                   Comments comments,
                                   String aggregateParam) {

        WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);

        // Create feed
        SyndFeed syndFeed = new SyndFeedImpl();
        String feedUri =
                feed.getId() != null
                    ? "?feedId="+feed.getId()
                    : "?aggregate="+WikiUtil.encodeURL(aggregateParam);
        syndFeed.setUri(baseURI + feedUri);
        syndFeed.setFeedType(syndFeedType.feedType);
        syndFeed.setTitle(prefs.getFeedTitlePrefix() + feed.getTitle());
        if (tag != null) {
            syndFeed.setTitle(
                syndFeed.getTitle() + " - " + Messages.instance().get("lacewiki.label.tagDisplay.Tag") + " '" + tag + "'"
            );
        }
View Full Code Here

            protected void beforeRequest() {
                setParameter("documentId", "6");
            }

            protected void renderResponse() throws Exception {
                WikiPreferences wikiPrefs = Preferences.instance().get(WikiPreferences.class);
                assert wikiPrefs.getPermlinkSuffix().equals(".newsuffix");
            }

        }.run();
    }
View Full Code Here

     * Calculate an RFC 2822 compliant message identifier from a numeric + string identifier. Given
     * the same numeric and string identifier, the same message id will be generated.
     */
    public static String calculateMessageId(Long id, String s) {

        WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);
        Hash hash = (Hash)Component.getInstance(Hash.class);
        String domain;
        try {
            URI uri = new URI(prefs.getBaseUrl());
            domain = uri.getHost();
        } catch (Exception ex) {
            throw new RuntimeException("Could not parse preferences value baseUrl into a host name", ex);
        }
        StringBuilder msgId = new StringBuilder();
View Full Code Here

        tree = null;
    }

    private void refreshTree() {
        log.debug("Loading menu items tree");
        WikiPreferences wikiPreferences = Preferences.instance().get(WikiPreferences.class);
        tree = WikiNodeDAO.instance().findMenuItemTree(
                (WikiDirectory)Component.getInstance("wikiRoot"),
                wikiPreferences.getMainMenuDepth(),
                wikiPreferences.getMainMenuLevels(),
                wikiPreferences.isMainMenuShowAdminOnly()
        );
    }
View Full Code Here

        this.editor = true;

        if (visibleWorkspace) {
            // Set workspace description of the current conversation
            String desc = getEditorWorkspaceDescription(getNodeId() == null);
            WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);
            if (desc != null && desc.length() > prefs.getWorkspaceSwitcherDescriptionLength()) {
                desc = desc.substring(0, prefs.getWorkspaceSwitcherDescriptionLength().intValue()) + "...";
            }
            Conversation.instance().setDescription(desc);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.action.prefs.WikiPreferences

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.