Package org.apache.roller.weblogger.webservices.adminprotocol.sdk

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.WeblogEntry


       
        return uesUpdated;
    }
   
    protected static WeblogEntrySet updateSampleWeblogEntrySet(WeblogEntrySet wes) {
        WeblogEntry we = (WeblogEntry)wes.getEntries()[0];
        WeblogEntry weUpdated = updateSampleWeblogEntry(we);
        WeblogEntrySet wesUpdated = new WeblogEntrySet(getEndpointUrl());
        wesUpdated.setEntries(new WeblogEntry[] { weUpdated });
       
        return wesUpdated;
    }
View Full Code Here


       
        return mesUpdated;
    }
   
    protected static WeblogEntry getSampleWeblogEntry() {
        WeblogEntry we = new WeblogEntry("fooblog", getEndpointUrl());
        we.setEmailAddress("foo@bar.org");
        we.setCreatingUser("foo");
        we.setDescription("Foo Weblog Description");
        we.setLocale(Locale.getDefault());
        we.setTimezone(TimeZone.getDefault());
        we.setName("Foo Weblog Name");
        we.setEnabled(Boolean.TRUE);
       
        return we;
    }
View Full Code Here

       
        return ues;
    }
   
    protected static WeblogEntrySet getSampleWeblogEntrySet() {
        WeblogEntry we = getSampleWeblogEntry();
        WeblogEntrySet wes = new WeblogEntrySet(getEndpointUrl());
        wes.setEntries(new WeblogEntry[] { we });
       
        return wes;
    }
View Full Code Here

        }
        if (c.getEntries().length > 1) {
            throw new BadRequestException("ERROR: Cannot put >1 entries per request");
        }
       
        WeblogEntry entry = (WeblogEntry)c.getEntries()[0];
        if (entry.getHandle() != null && !entry.getHandle().equals(getUri().getEntryId())) {
            throw new BadRequestException("ERROR: Content handle does not match URI handle");
        }
        entry.setHandle(getUri().getEntryId());
        c = updateWeblogs((WeblogEntrySet)c);
       
        return c;
    }
View Full Code Here

            UserManager mgr = getRoller().getUserManager();
            HashMap pages = null; //getRollerContext().readThemeMacros(form.getTheme());
           
            List websiteDatas = new ArrayList();
            for (int i = 0; i < c.getEntries().length; i++) {
                WeblogEntry entry = (WeblogEntry)c.getEntries()[i];
                User user = mgr.getUserByUserName(entry.getCreatingUser());
                Weblog wd = new Weblog(
                        entry.getHandle(),
                        user.getUserName(),
                        entry.getName(),
                        entry.getDescription(),
                        entry.getEmailAddress(),
                        entry.getEmailAddress(),
                        DEFAULT_THEME,
                        entry.getLocale().toString(),
                        entry.getTimezone().getID());
               
                Date dateCreated  = entry.getDateCreated();
                if (dateCreated == null) {
                    dateCreated = new Date();
                }
                wd.setDateCreated(dateCreated);
               
                Boolean enabled = entry.getEnabled();
                if (enabled != null) {
                    wd.setEnabled(enabled);
                }
               
                try {
View Full Code Here

       
        HashMap pages = null;
       
        List websiteDatas = new ArrayList();
        for (int i = 0; i < c.getEntries().length; i++) {
            WeblogEntry entry = (WeblogEntry)c.getEntries()[i];
            Weblog wd = getWebsiteData(entry.getHandle());
            updateWebsiteData(wd, entry);
            websiteDatas.add(wd);
        }
        return toWeblogEntrySet((Weblog[])websiteDatas.toArray(new Weblog[0]));
    }
View Full Code Here

   
    private WeblogEntry toWeblogEntry(Weblog wd) throws HandlerException {
        if (wd == null) {
            throw new NullPointerException("ERROR: Null website data not allowed");
        }
        WeblogEntry we = new WeblogEntry(wd.getHandle(), getUrlPrefix());
        we.setName(wd.getName());
        we.setDescription(wd.getDescription());
        we.setLocale(wd.getLocale());
        we.setTimezone(wd.getTimeZone());
        we.setCreatingUser(wd.getCreator().getUserName());
        we.setEmailAddress(wd.getEmailAddress());
        we.setDateCreated(wd.getDateCreated());
        we.setEnabled(wd.getEnabled());
       
        try {
            AppUrl appUrl = new AppUrl(WebloggerRuntimeConfig.getAbsoluteContextURL(), wd.getHandle());
            we.setAppEntriesUrl(appUrl.getEntryUrl().toString());
            we.setAppResourcesUrl(appUrl.getResourceUrl().toString());
        } catch (MalformedURLException mfue) {
            throw new InternalException("ERROR: Could not get APP URLs", mfue);
        }
       
        return we;
View Full Code Here

            for (int i = 0; i < uds.length; i++) {
                User ud = uds[i];
                List<WeblogPermission> perms = umgr.getWeblogPermissions(ud);
                for (WeblogPermission perm : perms) {
                    Weblog wd = perm.getWeblog();
                    WeblogEntry we = toWeblogEntry(wd);
                    entries.add(we);
                }
            }
            wes.setEntries((Entry[])entries.toArray(new Entry[0]));
            return wes;
View Full Code Here

        }
       
        WeblogEntrySet wes = new WeblogEntrySet(getUrlPrefix());
        List entries = new ArrayList();
        for (int i = 0; i < wds.length; i++) {
            WeblogEntry we = toWeblogEntry(wds[i]);
            entries.add(we);
        }
        wes.setEntries((Entry[])entries.toArray(new Entry[0]));
       
        return wes;
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.webservices.adminprotocol.sdk.WeblogEntry

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.