Examples of Planet


Examples of org.apache.roller.planet.pojos.Planet

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        log.debug("Entering");

        Planet planet = null;
        PlanetGroup group = null;

        PlanetGroupFeedRequest feedRequest = null;
        try {
            // parse the incoming request and extract the relevant data
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        log.debug("Entering");
       
        Planet planet = null;
        PlanetGroup group = null;

        PlanetGroupOpmlRequest opmlRequest = null;
        try {
            // parse the incoming request and extract the relevant data
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        log.debug("Entering");
       
        Planet planet = null;
        PlanetGroup group = null;

        PlanetGroupPageRequest pageRequest = null;
        try {
            // parse the incoming request and extract the relevant data
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

            // delete a planet
            log.debug("Deleting Planet ... "+getPlanetid());
           
            try {
                PlanetManager pMgr = PlanetFactory.getPlanet().getPlanetManager();
                Planet planet = pMgr.getPlanetById(getPlanetid());
                if(planet != null) {
                    pMgr.deletePlanet(planet);
                    PlanetFactory.getPlanet().flush();
                }
               
                // delete succeeded, handle rest of request as usual
                setSuccess("PlanetsList.message.planetDeleteSucceeded", planet.getHandle());
                return execute();
            } catch(Exception e) {
                log.error("Error deleting planet", e);
                setError("PlanetsList.error.planetDeleteFailed", getPlanetid());
                return LIST;
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

            log.debug("Loading Planet ... "+getPlanetid());
            this.planet = pMgr.getPlanetById(getPlanetid());
        } else {
            // new planet
            log.debug("No planet specified, constructing new one");
            this.planet = new Planet();
        }
    }
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

    /**
     * Convenience method that creates a planet and stores it.
     */
    public static Planet setupPlanet(String handle) throws Exception {
       
        Planet testPlanet = new Planet(handle, handle, handle);
       
        // store
        PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
        mgr.savePlanet(testPlanet);
       
        // flush
        PlanetFactory.getPlanet().flush();
       
        // query to make sure we return the persisted object
        Planet planet = mgr.getPlanet(handle);
       
        if(planet == null)
            throw new PlanetException("error inserting new planet");
       
        return planet;
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

     */
    public static void teardownPlanet(String id) throws Exception {
       
        // lookup
        PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
        Planet planet = mgr.getPlanetById(id);
       
        // remove
        mgr.deletePlanet(planet);
       
        // flush
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

            throws Exception {
       
        PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
       
        // make sure we are using a persistent object
        Planet testPlanet = mgr.getPlanetById(planet.getId());
       
        // store
        PlanetGroup testGroup = new PlanetGroup(testPlanet, handle, handle, handle);
        testPlanet.getGroups().add(testGroup);
        mgr.saveGroup(testGroup);
       
        // flush
        PlanetFactory.getPlanet().flush();
       
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

            log.debug("Loading Planet Group ...");
           
            group = pMgr.getGroupById(getGroupid());
        } else {
            // new group, must have a planet to add it to
            Planet planet = pMgr.getPlanetById(getPlanetid());
            if(planet != null) {
                group = new PlanetGroup();
                group.setPlanet(planet);
            } else {
                throw new PlanetException("could not determine planet "+getPlanetid());
View Full Code Here

Examples of org.apache.roller.planet.pojos.Planet

     */
    public void testPlanetLookups() throws Exception {
       
        PlanetManager mgr = PlanetFactory.getPlanet().getPlanetManager();
       
        Planet planet = null;
       
        // by id
        planet = mgr.getPlanetById(testPlanet.getId());
        assertNotNull(planet);
        assertEquals("planetFuncTest", planet.getHandle());
       
        // by handle
        planet = null;
        planet = mgr.getPlanet("planetFuncTest");
        assertNotNull(planet);
        assertEquals("planetFuncTest", planet.getHandle());
       
        // all planets
        List planets = mgr.getPlanets();
        assertNotNull(planets);
        assertEquals(1, planets.size());
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.