Package com.agiletec.plugins.jacms.aps.system.services.content.model

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.ContentRecordVO


   * Restituisce il contenuto vo in base all'identificativo.
   * @param contentId L'identificativo del contenuto.
   * @return Il contenuto vo cercato.
   */
  public ContentRecordVO getContentVo(String contentId) {
    ContentRecordVO contentVo = null;
    try {
      contentVo = this.getContentManager().loadContentVO(contentId);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getContentVo");
      throw new RuntimeException("Errore in caricamento contenuto vo", t);
View Full Code Here


 
  @Override
  public void saveContentVersion(String contentId) throws ApsSystemException {
    try {
      if (contentId != null) {
        ContentRecordVO record = this.getContentManager().loadContentVO(contentId);
        if (record != null) {
          ContentVersion versionRecord = this.createContentVersion(record);
          //CANCELLAZIONE VERSIONE WORK OBSOLETE
          if (versionRecord.isApproved()) {
            int onlineVersionsToDelete = versionRecord.getOnlineVersion()-1;
View Full Code Here

   * contenuti singoli ed in lista.
   * @param contentId L'identificativo del contenuto.
   * @return Il contenuto vo cercato.
   */
  public ContentRecordVO getContentVo(String contentId) {
    ContentRecordVO contentVo = null;
    try {
      contentVo = this.getContentManager().loadContentVO(contentId);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getContentVo");
      throw new RuntimeException("Errore in caricamento contenuto vo", t);
View Full Code Here

      Map<String, SmallContentType> contentTypes = this.getContentManager().getSmallContentTypesMap();
      while (res.next()) {
        ContentStatistic statistic = new ContentStatistic();
        String id = res.getString(1);
        statistic.setId(id);
        ContentRecordVO content = this.getContentManager().loadContentVO(id);
        if (content == null) {
          statistic.setDescr(id);
        } else {
          SmallContentType contentType = contentTypes.get(content.getTypeCode());
          statistic.setDescr(content.getDescr());
          statistic.setType(contentType.getDescr());
        }
        statistic.setVisits(new Integer(res.getInt(2)));
        visitsStats.add(statistic);
      }
View Full Code Here

      stat.setString(2,  endString);
      res = stat.executeQuery();
      while (res.next()) {
        String contentId = res.getString("content");
        String contentDescr = null;
        ContentRecordVO content = contentManager.loadContentVO(contentId);
        if (null == content) {
          contentDescr = "[DELETED]";
        } else {
          contentDescr = content.getDescr();
        }
        int count = res.getInt("hits");
        topContents.put(contentDescr, new Integer(count));
      }
    } catch (Throwable t) {
View Full Code Here

  private List<SyndEntry> getEntries(List<String> contentsId, String lang, String feedLink, HttpServletRequest req,  HttpServletResponse resp) throws ApsSystemException {
    List<SyndEntry> entries = new ArrayList<SyndEntry>();
    Iterator<String> idIterator = contentsId.iterator();
    while (idIterator.hasNext()) {
      String id = (String) idIterator.next();
      ContentRecordVO currentContent = this.getContentManager().loadContentVO(id);
      RssContentMapping mapping = (RssContentMapping) this.getContentMapping().get(currentContent.getTypeCode());
      if (null == mapping) {
        ApsSystemUtils.getLogger().error("Null content mapping by existed channel for content type " + currentContent.getTypeCode());
        continue;
      }
      entries.add(this.createEntry(currentContent, lang, feedLink, req, resp));
    }
    return entries;
View Full Code Here

    this._contentManager = (IContentManager) context.getBean(JacmsSystemConstants.CONTENT_MANAGER);
  }
 
  public void initContentVersions() throws ApsSystemException {
    this.cleanContentVersions();
    ContentRecordVO record = this._contentManager.loadContentVO("ART1");
    ContentVersion version1 = this.createContentVersion(1, record.getId(), record.getTypeCode(),
        "Articolo", Content.STATUS_DRAFT, record.getXmlWork(), DateConverter.parseDate("2005-02-13", "yyyy-MM-dd"),
        "0.0", 0, true, "admin");
    this.addContentVersion(version1);
    ContentVersion version2 = this.createContentVersion(2, record.getId(), record.getTypeCode(),
        "Articolo 2", Content.STATUS_DRAFT, record.getXmlWork(), DateConverter.parseDate("2005-02-14", "yyyy-MM-dd"),
        "0.1", 0, false, "mainEditor");
    this.addContentVersion(version2);
    ContentVersion version3 = this.createContentVersion(3, record.getId(), record.getTypeCode(),
        "Articolo 3", Content.STATUS_READY, record.getXmlWork(), DateConverter.parseDate("2005-02-15", "yyyy-MM-dd"),
        "1.0", 1, true, "mainEditor");
    this.addContentVersion(version3);
  }
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jacms.aps.system.services.content.model.ContentRecordVO

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.