Package com.agiletec.plugins.jpversioning.aps.system.services.versioning

Examples of com.agiletec.plugins.jpversioning.aps.system.services.versioning.ContentVersion


  public void testHistory() throws Throwable {
    String result = this.executeHistory("admin", "ART1");
    assertEquals(Action.SUCCESS, result);
    List<Long> versions = ((VersionAction) this.getAction()).getContentVersions();
    assertEquals(3, versions.size());
    ContentVersion version = ((VersionAction) this.getAction()).getContentVersion(1);
    assertEquals("Articolo", version.getDescr());
   
    result = this.executeHistory("admin", "ART2");
    assertEquals(Action.SUCCESS, result);
    versions = ((VersionAction) this.getAction()).getContentVersions();
    assertNull(versions);
View Full Code Here


  }
 
  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

  }
 
  public ContentVersion createContentVersion(long id, String contentId, String contentType,
      String descr, String status, String xml, Date versionDate, String version,
      int onlineVersion, boolean approved, String username) {
    ContentVersion contentVersion = new ContentVersion();
    contentVersion.setId(id);
    contentVersion.setContentId(contentId);
    contentVersion.setContentType(contentType);
    contentVersion.setDescr(descr);
    contentVersion.setStatus(status);
    contentVersion.setXml(xml);
    contentVersion.setVersionDate(versionDate);
    contentVersion.setVersion(version);
    contentVersion.setOnlineVersion(onlineVersion);
    contentVersion.setApproved(approved);
    contentVersion.setUsername(username);
    return contentVersion;
  }
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpversioning.aps.system.services.versioning.ContentVersion

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.