Package org.jboss.seam.wiki.core.exception

Examples of org.jboss.seam.wiki.core.exception.InvalidWikiRequestException


    }

    public void initEdit() {
        if (getUserId() == null) {
            throw new InvalidWikiRequestException("Missing userId request parameter");
        }
        init();
    }
View Full Code Here


        init();
    }

    public void initDisplay() {
        if (getUserId() == null && getRequestedUsername() == null) {
            throw new InvalidWikiRequestException("Missing userId or username request parameter");
        }
    }
View Full Code Here

    public void init() {
        if (!isInitialized) {

            if (getFileId() == null)
                throw new InvalidWikiRequestException("Missing filedId request parameter");

            log.debug("initializing document history with file id: " + getFileId());

            if (currentFile == null) {
                log.debug("loading current file: " + getFileId());
View Full Code Here

        return taggedFiles;
    }

    public void loadTaggedFiles() {
        if (tag == null) {
            throw new InvalidWikiRequestException("Missing tag parameter");
        }
        log.debug("loading wiki files tagged with: " + tag);
        taggedFiles = tagDAO.findWikFiles(wikiRoot, null, tag, WikiNode.SortableProperty.createdOn, false);
    }
View Full Code Here

                .execute();
    }

    private void prepareReply() {
        if (parentCommentId == null || parentCommentId.equals(0l))
            throw new InvalidWikiRequestException("Missing parentCommentId request parameter");

        getLog().debug("reply to comment id: " + parentCommentId);
        initEditor(false);
        showForm = true;
View Full Code Here

            WikiDocumentDefaults defaults;
            try {
                Class<?> tplClass = Class.forName(templateType);

                if (!TemplateRegistry.instance().getTemplateTypes().contains(tplClass)) {
                    throw new InvalidWikiRequestException("Invalid templateType: " + templateType);
                }

                if (tplClass.getAnnotation(WikiDocumentTemplate.class).requiresTemplateInstance()) {
                    getLog().debug("instantiating template " + tplClass.getName() + " with current document instance");
                    defaults = (WikiDocumentDefaults)tplClass.getConstructor(WikiDocument.class).newInstance(doc);
                } else {
                    getLog().debug("instantiating template " + tplClass.getName() + " with no-arg constructor");
                    defaults = (WikiDocumentDefaults)tplClass.newInstance();
                }

                if (WikiDocumentEditorDefaults.class.isAssignableFrom(tplClass)) {
                    getLog().debug("letting template set editor defaults");
                    ((WikiDocumentEditorDefaults)defaults).setEditorDefaults(this);
                }

            } catch (Exception ex) {
                throw new InvalidWikiRequestException("Invalid templateType: " + templateType);
            }
            doc.setDefaults(defaults);
        }

        return doc;
View Full Code Here

    /* -------------------------- Basic Subclass Callbacks ------------------------------ */

    public N afterNodeCreated(N node) {

        if (parentNodeId == null)
            throw new InvalidWikiRequestException("Missing parentNodeId parameter");

        outjectCurrentLocation(node);

        return node;
    }
View Full Code Here

    public N beforeNodeEditNew(N node) {

        getLog().debug("loading parent node with id: " + parentNodeId);
        parentNode = findParentNode(parentNodeId);
        if (parentNode == null)
            throw new InvalidWikiRequestException("Could not find parent node with id: " + parentNodeId);
        getLog().debug("initalized with parent node: " + parentNode);

        // Check write access level of the parent node, if the user wants to create a new node
        if (!isPersistAllowed(node, parentNode))
            throw new AuthorizationException("You don't have permission for this operation");
View Full Code Here

    }
    */

    public void findInstance() {
        if (getDirectoryId() == null)
            throw new InvalidWikiRequestException("Missing directoryId parameter");

        instance = wikiNodeDAO.findWikiDirectory(getDirectoryId());
        if (instance == null)
            throw new EntityNotFoundException(getDirectoryId(), WikiDirectory.class);

View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.exception.InvalidWikiRequestException

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.