Examples of Design


Examples of com.day.cq.wcm.api.designer.Design

        Page page = pageManager.getContainingPage(resource);
        if (page == null) {
            return Collections.emptyList();
        }

        Design design = designer.getDesign(page);
        if (design == null) {
            return Collections.emptyList();
        }

        return Collections.singletonList(new Reference(TYPE_DESIGN_PAGE,
                String.format("%s (Design)", design.getId()),
                design.getContentResource(),
                getLastModified(design)));
    }
View Full Code Here

Examples of com.day.cq.wcm.api.designer.Design

                Object cachedResourceDesign = request.getAttribute(resourceDesignKey);

                if (cachedResourceDesign != null) {
                    return (Design) cachedResourceDesign;
                } else {
                    Design resourceDesign = designer.getDesign(resourcePage);
                    request.setAttribute(resourceDesignKey, resourceDesign);

                    return resourceDesign;
                }
            }
View Full Code Here

Examples of com.day.cq.wcm.api.designer.Design

     *
     * @param adaptable a SlingHttpServletRequest
     * @return the current Style if the adaptable was a SlingHttpServletRequest, null otherwise
     */
    private Style getCurrentStyle(Object adaptable) {
        Design currentDesign = getCurrentDesign(adaptable);
        ComponentContext componentContext = getComponentContext(adaptable);

        if (currentDesign != null && componentContext != null) {
            return currentDesign.getStyle(componentContext.getCell());
        }

        return null;
    }
View Full Code Here

Examples of com.day.cq.wcm.api.designer.Design

        if (designer == null) {
            return "";
        }

        final Design design = designer.getDesign(page);
        final Resource designResource = resourceResolver.getResource(design.getPath());

        if (design == null) {
            return "";
        }
View Full Code Here

Examples of com.day.cq.wcm.api.designer.Design

    protected static String searchUp(Resource resource, String pathPrefix, String path) {
        if (resource == null || StringUtils.equals(resource.getPath(), "/")) {
            return null;
        }

        final Design design = resource.adaptTo(Design.class);

        if (design != null) {
            String designResourcePath = makePath(resource, pathPrefix, path);

            Resource designResource = resource.getResourceResolver().getResource(designResourcePath);
View Full Code Here

Examples of de.innovationgate.wga.config.Design

  public Map<String, IContainer> getConnectedDesignContainers() throws IncompatibleWGAConfigVersion, IOException {
    Map<String, IContainer> contentDesign = new HashMap<String, IContainer>();
    Iterator<ContentStore> itCS = retrieveWGAConfig(false).getContentStores().iterator();
    while (itCS.hasNext()) {
      ContentStore currentContentStore = itCS.next();
      Design currentDesign = currentContentStore.getDesign();
      if (currentDesign != null && currentDesign.getSource() != null && currentContentStore.isEnabled() && currentDesign.getSource().equals(Constants.DESIGNCOL_FILESYSTEM)) {
        IFolder designFolder = getDesignRoot().getFolder(new Path(currentDesign.getName()));
        if (WGADesignStructureHelper.isDirlinkFolder(designFolder)) {
          contentDesign.put(currentContentStore.getKey(), (WGADesignStructureHelper.dirLinkFolderToContainer(designFolder)));
        } else {
          contentDesign.put(currentContentStore.getKey(), designFolder);
        }
View Full Code Here

Examples of de.innovationgate.wga.config.Design

     
      // iterate over contentstores and check design references
      Iterator<ContentStore> itCS = currentRuntime.retrieveWGAConfig(false).getContentStores().iterator();
      while (itCS.hasNext()) {
        ContentStore currentContentStore = itCS.next();
        Design currentDesign = currentContentStore.getDesign();

        if (currentDesign != null && currentDesign.getSource() != null && currentDesign.getSource().equals(Constants.DESIGNCOL_FILESYSTEM)) {
          //IPath designPath = currentRuntime.getDesignRoot().getFullPath().append(currentDesign.getName());       

          if (container.getParent() != null && container.getParent().equals(currentRuntime.getDesignRoot()) && container.getName().equals(currentDesign.getName())) {
            ContentStoreRefactoringInfo info = new ContentStoreRefactoringInfo(container, arguments);
            info.setRuntime(currentRuntime);
            info.setContentStoreUID(currentContentStore.getUid());
            links.add(info);
          }
View Full Code Here

Examples of de.innovationgate.wga.config.Design

    }
   
    public void applyDesign(WGDatabase db, ContentStore cs) {
       
        try {
            Design designConfig = cs.getDesign();
            DesignReference ref = new DesignReference(designConfig.getSource(), designConfig.getName());
            WGADesign design = resolveDesignReference(ref);
            if (design == null) {
                _core.getLog().error("Unknown design: " + new DesignReference(designConfig).toString());
                return;
            }
               
            // Look if we have an overlay: If so use special overlay design provider
            Design overlayConfig = cs.getOverlay();
            if (overlayConfig != null) {
                ref = new DesignReference(overlayConfig.getSource(), overlayConfig.getName());
                WGADesign overlay = resolveDesignReference(ref);
                if (overlay != null) {
                    OverlayDesignProvider.applyOverlayDesign(_core, db, design, designConfig.getOptions(), overlay, overlayConfig.getOptions());
                    return;
                }
                else {
                    _core.getLog().error("Cannot resolve design overlay: " + new DesignReference(overlayConfig).toString());
                }
View Full Code Here

Examples of de.innovationgate.wga.config.Design

        getSource().applyDesign(this, db, options);
    }
   
    public Design createDesignConfiguration() {
       
        Design design = new Design(getSource().getName(), getName());
        return design;
       
    }
View Full Code Here

Examples of de.innovationgate.wgpublisher.expressions.tmlscript.wgaglobal.Design

        return WGAGlobal.getLookupKeys(cx, thisObj, args, funObj);
    }

    public static WGDatabase localDB(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGException {
       
        Design design;
        if (args.length == 0) {
            design = Design.getCurrent();
        }
        else if (args[0] instanceof NativeObject) {
            design = new Design((NativeObject) args[0]);
        }
        else {
            throw new EvaluatorException("Global function localDB() needs either no or a custom TMLScript object as parameter");
        }
       
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.