Examples of DocumentManager


Examples of ketUI.DocumentManager

  public void openDocument(String filename) {
    if ( ! getDocument().getFrameManager().isStandAlone() ) {
      Ket.out.println("[Can't open "+filename+"]");
      return;
    }
    DocumentManager documentManager = getDocument().getDocumentManager();
    Document document = new Document(documentManager, null, filename);
    document.getKetPanel().toggleGridDisplay();
    if (documentManager!=null) {
      documentManager.addDocument(document);
    }
  }
View Full Code Here

Examples of ketUI.DocumentManager

    }
    if (branch==null || branch.getFunction()!=Function.LINK) {
      Ket.out.println(" !!! Open link reqiures the current or parent branch to be a link !!! ");
      return false;
    }
    DocumentManager documentManager = getDocumentManager();
    if (documentManager==null) {
      Ket.out.println(" !!! Can't follow links from within another GUI !!! ");
      return false;
    }
    switch (branch.size()) {
View Full Code Here

Examples of ketUI.DocumentManager

  class WindowOpener implements Runnable {
    public WindowOpener() {

    }
    public void run() {
      DocumentManager documentManager = getDocumentManager();
      Document d = new Document(documentManager, null, null);
      documentManager.addDocument(d);
    }
View Full Code Here

Examples of net.alteiar.newversion.client.DocumentManager

  protected CampaignClient(String ipServer, int port, String specificDic,
      String globalPath, MyKryoInit kryoInit) {

    try {
      this.manager = new DocumentManager(ipServer, port, specificDic,
          globalPath, kryoInit);
    } catch (IOException e) {
      Logger.getLogger(getClass()).error("Impossible de se connecter", e);
      throw new ExceptionInInitializerError(e);
    }
View Full Code Here

Examples of org.apache.lenya.cms.publication.DocumentManager

    }

    protected void prepareUsecase() throws Exception {
        super.prepareUsecase();

  DocumentManager docMgr = null;
  try {
      docMgr = (DocumentManager) getManager().lookup(DocumentManager.ROLE);

      Publication pub = getPublication("test");
      Area area = pub.getArea(Publication.AUTHORING_AREA);
      Area trashArea = pub.getArea("trash");
      SiteStructure site = area.getSite();
      SiteNode node = site.getNode(PATH);
      Document doc_en = node.getLink("en").getDocument();
      Document doc_de = node.getLink("de").getDocument();

      DocumentLocator loc = DocumentLocator.getLocator(pub.getId(), "trash", PATH, doc_en.getLanguage());

      docMgr.copyAll(area, PATH, trashArea, PATH);

      SiteStructure trashSite = trashArea.getSite();
      assertTrue(trashSite.contains(PATH));
  } finally {
      if (docMgr != null) {
View Full Code Here

Examples of org.apache.lenya.cms.publication.DocumentManager

    protected void publish(Document authoringDocument) throws DocumentException, SiteException,
            PublicationException {

        createAncestorNodes(authoringDocument);

        DocumentManager documentManager = null;

        try {
            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
            documentManager.copyToArea(authoringDocument, Publication.LIVE_AREA);

            boolean notify = Boolean.valueOf(getBooleanCheckboxParameter(PARAM_SEND_NOTIFICATION))
                    .booleanValue();
            if (notify) {
                sendNotification(authoringDocument);
View Full Code Here

Examples of org.apache.lenya.cms.publication.DocumentManager

    }

    protected void checkPublication(Session session, DocumentFactory factory, Publication pub)
            throws ServiceException, SiteException, DocumentBuildException, PublicationException,
            RepositoryException {
        DocumentManager docManager = null;
        ServiceSelector selector = null;
        SiteManager siteManager = null;
        ServiceSelector resourceTypeSelector = null;

        try {
            selector = (ServiceSelector) getManager().lookup(SiteManager.ROLE + "Selector");
            siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
            SiteStructure structure = siteManager.getSiteStructure(factory, pub,
                    Publication.AUTHORING_AREA);

            docManager = (DocumentManager) getManager().lookup(DocumentManager.ROLE);

            resourceTypeSelector = (ServiceSelector) getManager().lookup(
                    ResourceType.ROLE + "Selector");
            ResourceType type = (ResourceType) resourceTypeSelector.select("entry");
            String contentSourceUri = "context://sitemap.xmap";

            Document doc = docManager.add(factory, type, contentSourceUri, pub,
                    Publication.AUTHORING_AREA, "en", "xml");

            structure.add(PATH, doc);
            assertTrue(structure.contains(PATH));
            Document linkDoc = structure.getNode(PATH).getLink("en").getDocument();
View Full Code Here

Examples of org.apache.lenya.cms.publication.DocumentManager

    private void migrateDocument(Document doc) throws Exception {

        getLogger().info("Migrating document [" + doc + "]");

        DocumentManager docManager = null;
        SiteManager siteManager = null;
        ServiceSelector selector = null;
        SourceResolver resolver = null;
        try {
            docManager = (DocumentManager) getManager().lookup(DocumentManager.ROLE);
View Full Code Here

Examples of org.apache.lenya.cms.publication.DocumentManager

    protected void publish(Document authoringDocument) throws DocumentException, SiteException,
            PublicationException {

        createAncestorNodes(authoringDocument);

        DocumentManager documentManager = null;

        try {
            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
            documentManager.copyToArea(authoringDocument, Publication.LIVE_AREA);

            boolean notify = Boolean.valueOf(getBooleanCheckboxParameter(SEND_NOTIFICATION))
                    .booleanValue();
            if (notify) {
                sendNotification(authoringDocument);
View Full Code Here

Examples of org.apache.lenya.cms.publication.DocumentManager

     */
    protected void deactivate(Document authoringDocument) {

        boolean success = false;

        DocumentManager documentManager = null;
        try {
            Document liveDocument = authoringDocument.getAreaVersion(Publication.LIVE_AREA);

            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
            documentManager.delete(liveDocument);

            success = true;
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
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.