Package org.apache.wiki

Examples of org.apache.wiki.ReferenceManager


                // filter on referring pages?
                Collection<String> referrers = null;

                if( refer != null )
                {
                    ReferenceManager refManager = engine.getReferenceManager();

                    Iterator iter = refManager.findCreated().iterator();

                    while ( iter != null && iter.hasNext() )
                    {

                        String name = (String) iter.next();
View Full Code Here


    public static final String PARAM_EXTRAS = "extras";

    public String execute(WikiContext context, Map<String, String> params) throws PluginException {
        ResourceBundle rb = Preferences.getBundle(context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE);

        ReferenceManager referenceManager = context.getEngine().getReferenceManager();

        int items = TextUtil.parseIntParameter(params.get(PARAM_MAX), ALL_ITEMS);
        String extras = params.get(PARAM_EXTRAS);
        if (extras == null) {
            extras = rb.getString("referringundefinedpagesplugin.more");
        }

        StringBuilder resultHTML = new StringBuilder();

        Collection<String> uncreatedPages = referenceManager.findUncreated();

        super.initialize(context, params);

        Collection<String> result = null;

        TreeMap sortedMap = new TreeMap();
        if (uncreatedPages != null) {
            for (String uncreatedPageName : uncreatedPages) {
                Collection<String> referrers = referenceManager.findReferrers(uncreatedPageName);
                if (referrers != null) {
                    for (String referringPage : referrers) {
                        sortedMap.put(referringPage, "");
                    }
                }
View Full Code Here

     {@inheritDoc}
     */
    public String execute( WikiContext context, Map<String, String> params )
        throws PluginException
    {
        ReferenceManager refmgr = context.getEngine().getReferenceManager();
        String pageName = params.get( PARAM_PAGE );
        ResourceBundle rb = Preferences.getBundle( context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE );
       
        StringBuffer result = new StringBuffer( 256 );
       
        if( pageName == null )
        {
            pageName = context.getPage().getName();
        }

        WikiPage page = context.getEngine().getPage( pageName );
       
        if( page != null )
        {
            Collection   links  = refmgr.findReferrers( page.getName() );
            String       wikitext = "";

            super.initialize( context, params );

            int items = TextUtil.parseIntParameter( params.get( PARAM_MAX ), ALL_ITEMS );
View Full Code Here

                // filter on referring pages?
                Collection<String> referrers = null;

                if( refer != null )
                {
                    ReferenceManager refManager = engine.getReferenceManager();

                    Iterator iter = refManager.findCreated().iterator();

                    while ( iter != null && iter.hasNext() )
                    {

                        String name = (String) iter.next();
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public String execute( WikiContext context, Map<String, String> params )
        throws PluginException
    {
        ReferenceManager refmgr = context.getEngine().getReferenceManager();
        Collection<String> links = refmgr.findUnreferenced();
        //
        // filter out attachments if "excludeattachments" was requested:
        //
        String prop = params.get( PARAM_EXCLUDEATTS );
        if( TextUtil.isPositive(prop) )
View Full Code Here

     {@inheritDoc}
     */
    public String execute( WikiContext context, Map<String, String> params )
        throws PluginException
    {
        ReferenceManager refmgr = context.getEngine().getReferenceManager();
        Collection links = refmgr.findUncreated();

        super.initialize( context, params );

        links = filterAndSortCollection( links );
       
View Full Code Here

    {
        if( depth >= m_depth ) return// end of recursion
        if( pagename == null ) return;
        if( !m_engine.pageExists(pagename) ) return;

        ReferenceManager mgr = m_engine.getReferenceManager();

        Collection<String> allPages = mgr.findRefersTo( pagename );

        handleLinks( context, allPages, ++depth, pagename );
    }
View Full Code Here

                // filter on referring pages?
                Collection<String> referrers = null;

                if( refer != null )
                {
                    ReferenceManager refManager = engine.getReferenceManager();

                    Iterator iter = refManager.findCreated().iterator();

                    while ( iter != null && iter.hasNext() )
                    {

                        String name = (String) iter.next();
View Full Code Here

                // filter on referring pages?
                Collection<String> referrers = null;

                if( refer != null )
                {
                    ReferenceManager refManager = engine.getReferenceManager();

                    Iterator< String > iter = refManager.findCreated().iterator();

                    while ( iter != null && iter.hasNext() )
                    {
                        String name = iter.next();
                        boolean use = false;
View Full Code Here

TOP

Related Classes of org.apache.wiki.ReferenceManager

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.