Examples of PlanetManager


Examples of org.apache.roller.planet.business.PlanetManager

     */
    public String delete() {
       
        if(getSubUrl() != null) try {
           
            PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
           
            // remove subscription
            Subscription sub = pmgr.getSubscription(getSubUrl());
            getGroup().getSubscriptions().remove(sub);
            sub.getGroups().remove(getGroup());
            pmgr.saveGroup(getGroup());
            PlanetFactory.getPlanet().flush();
           
            // clear field after success
            setSubUrl(null);
           
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

   
    @Override
    public void myPrepare() {
       
        if(getPlanet() != null && getBean().getId() != null) try {
            PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
            setGroup(pmgr.getGroupById(getBean().getId()));
        } catch(Exception ex) {
            log.error("Error looking up planet group - "+getBean().getId(), ex);
        }
    }
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

           
            // copy in submitted data
            getBean().copyTo(group);
           
            // save and flush
            PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
            pmgr.saveGroup(group);
            PlanetFactory.getPlanet().flush();
           
            addMessage("planetGroups.success.saved");
           
        } catch(Exception ex) {
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

     */
    public String delete() {
       
        if(getGroup() != null) {
            try {
                PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
                pmgr.deleteGroup(getGroup());
                PlanetFactory.getPlanet().flush();
               
                addMessage("planetSubscription.success.deleted");
            } catch(Exception ex) {
                log.error("Error deleting planet group - "+getBean().getId());
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

    public Planet getPlanet() {
       
        if(planet == null && planetHandle != null) {
            try {
                PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
                planet = mgr.getPlanet(planetHandle);
            } catch (PlanetException ex) {
                log.error("Error looking up planet "+planetHandle, ex);
            }
        }
       
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

        log.debug("checking planet handle "+planetHandle);
       
        boolean isPlanet = false;
       
        try {
            PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
            Planet planet = mgr.getPlanet(planetHandle);
           
            if(planet != null) {
                isPlanet = true;
            }
        } catch(Exception ex) {
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

    public PlanetGroup getGroup() {
       
        if(group == null && groupHandle != null) {
            try {
                PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
                group = mgr.getGroup(getPlanet(), groupHandle);
            } catch (PlanetException ex) {
                log.error("Error looking up group "+groupHandle, ex);
            }
        }
       
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

            return null;
        }
       
        StringBuffer url = new StringBuffer();
       
        PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
       
        url.append(PlanetRuntimeConfig.getProperty("site.absoluteurl"));
        url.append("/").append(planet).append("/");
       
        return url.toString();
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

        // update subscription entries
        int entries = 0;
        Set<SubscriptionEntry> newEntries = updatedSub.getEntries();
        log.debug("newEntries.size() = " + newEntries.size());
        if (newEntries.size() > 0) try {
            PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
           
            // clear out old entries
            pmgr.deleteEntries(sub);
           
            // add fresh entries
            sub.getEntries().clear();
            sub.addEntries(newEntries);
           
            // save and flush
            pmgr.saveSubscription(sub);
            PlanetFactory.getPlanet().flush();

            log.debug("Added entries");
            entries += newEntries.size();           
View Full Code Here

Examples of org.apache.roller.planet.business.PlanetManager

       
        long startTime = System.currentTimeMillis();
       
        try {
            // update all subscriptions in the system
            PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
            updateSubscriptions(pmgr.getSubscriptions());
        } catch (PlanetException ex) {
            throw new UpdaterException("Error getting subscriptions list", ex);
        }
       
        long endTime = System.currentTimeMillis();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.