Package jease.cms.domain

Examples of jease.cms.domain.Content$PathChangeProcessor


  public Control() {
    setWidth("300px");

    type.setItemRenderer(new ItemRenderer() {
      public String render(Object value) {
        Content content = (Content) value;
        if (value != null) {
          return I18N.get(content.getType()) + " ("
              + Revisions.getNumber(content.getClass()) + ")";
        } else {
          return "* (" + Revisions.getNumber(Content.class) + ")";
        }
      }
    });
View Full Code Here


    super.refresh();
  }

  protected void onSelect(Object obj) {
    final Linkcheck linkcheck = (Linkcheck) obj;
    final Content content = (Content) Nodes.getByPath(linkcheck.getPath());
    if (content != null) {
      NodeEditor editor = Registry.getEditor(content);
      editor.addChangeListener(new ActionListener() {
        public void actionPerformed(Event event) {
          Linkchecker.clear(linkcheck.getPath());
View Full Code Here

   */
  public static Property getByPath(String path) {
    int idx = path.lastIndexOf("/");
    String contentPath = path.substring(0, idx);
    String propertyPath = path.substring(idx + 1);
    Content content = (Content) Nodes.getByPath(contentPath);
    if (content != null) {
      return content.getProperty(propertyPath);
    }
    return null;
  }
View Full Code Here

    }
  }

  public static void fromInputStream(String filename,
      InputStream inputStream, Node parent, User editor) throws Exception {
    Content newContent = newContent(filename, inputStream, editor);
    newContent.setEditor(editor);
    Nodes.append(parent, Contents.customize(newContent));
  }
View Full Code Here

  /**
   * Checks if given content is default content of Folder or Reference.
   */
  private static boolean isDefault(Content content) {
    if (content.getParent() != null) {
      Content parent = (Content) content.getParent();
      if (isPublic(parent)
          && (((parent instanceof Folder) && ((Folder) parent)
              .getContent() == content) || (((parent instanceof Reference) && ((Reference) parent)
              .getContent() == content)))) {
        return true;
View Full Code Here

      for (Content content : (List<Content>) Database
          .query(fullTextIndex).search(query)) {
        // When content is child of a "paged container" (e.g.
        // Composite),
        // traverse upwards to the top-level container.
        Content target = content;
        while (target.getParent() != null
            && ((Content) target.getParent()).isPage()
            && ((Content) target.getParent()).isContainer()) {
          target = (Content) target.getParent();
        }
        if (!result.contains(target)
            && (context == null || target.isDescendant(context))) {
          result.add(target);
        }
      }
      return result;
    } catch (Exception e) {
View Full Code Here

   * not guarded.
   */
  public static Access getGuard(Content content) {
    Map<Content, Access> cache = Database.query(accessByContent);
    if (!cache.containsKey(content)) {
      Content guard = content.getGuard(Access.class);
      if (guard != null) {
        cache.put(content, content.getGuard(Access.class));
      } else {
        cache.put(content, NO_ACCESS_GUARD);
      }
View Full Code Here

TOP

Related Classes of jease.cms.domain.Content$PathChangeProcessor

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.