Package de.innovationgate.webgate.api

Examples of de.innovationgate.webgate.api.WGDocumentCore


        }

        if (params.containsKey(WGDatabase.QUERYOPTION_EXCLUDEDOCUMENT)) {
            WGContent content = (WGContent) params.get(WGDatabase.QUERYOPTION_EXCLUDEDOCUMENT);
            if (content.getDatabase() == this._db) {
                WGDocumentCore contentCore = content.getCore();
                if (contentCore instanceof WGDocumentImpl) {
                    Content contentEntity = (Content) ((WGDocumentImpl) content.getCore()).getEntity();
                    builtQuery.append(" and not (content.cuid = '" + contentEntity.getCuid() + "')");
                }
            }
View Full Code Here


           
            // Filter the "current document"
            if (params.containsKey(WGDatabase.QUERYOPTION_EXCLUDEDOCUMENT)) {
                WGContent content = (WGContent) params.get(WGDatabase.QUERYOPTION_EXCLUDEDOCUMENT);
                if (content.getDatabase() == this._db) {
                    WGDocumentCore contentCore = content.getCore();
                    if (contentCore instanceof WGDocumentImpl) {
                        Content contentEntity = (Content) ((WGDocumentImpl) content.getCore()).getEntity();
                        if (_ddlVersion >= WGDatabase.CSVERSION_WGA5) {
                            fullQuery.add("not content.id = :wgaparamEntityId");
                            queryParams.put("wgaparamEntityId", contentEntity.getId());
View Full Code Here

    public WGDocumentCore getDesignObject(int type, String name, String strMediaKey) throws WGAPIException {

        // Ask the overlay if the prefix is on
        if (name.startsWith(OVERLAY_PREFIX)) {
            String overlayName = name.substring(OVERLAY_PREFIX.length());
            WGDocumentCore core = _overlay.getDesignObject(type, overlayName, strMediaKey);
            if (core != null) {
                return new DesignProviderCoreWrapper(core, this, false, true);
            }
        }
       
View Full Code Here

   
        List<WGDocumentCore> list = new ArrayList<WGDocumentCore>();
        Set<String> addedNames = new HashSet<String>();
        for (ModuleFile file : files) {
            try {
                WGDocumentCore core = wrapVariantCore(new DesignFileDocument(this, file));
               
                // Filter out base versions of variants
                if (_lookupVariants) {
                    String coreName = (String) core.getMetaData(WGDesignDocument.META_NAME);
                   
                    // If we try to add a doc that already has been added and is NO variant, we know that this is the base version which was
                    // overwritten by a variant. So we skip it.
                    if (addedNames.contains(coreName) && !Boolean.TRUE.equals(core.getMetaData(WGDesignDocument.META_VARIANT))) {
                        continue;
                    }
                    else {
                        addedNames.add(coreName);
                    }
View Full Code Here

        Set<String> addedNames = new HashSet<String>();
        List<WGDocumentCore> list = new ArrayList<WGDocumentCore>();
        while (it.hasNext()) {
            ModuleFile moduleFile = (ModuleFile) it.next();
            try {
                WGDocumentCore core = wrapVariantCore(new DesignFileDocument(this, moduleFile));
               
                // Filter out base versions of variants
                if (_lookupVariants) {
                    String coreName = (String) core.getMetaData(WGDesignDocument.META_NAME);
                   
                    // If we try to add a doc that already has been added and is NO variant, we know that this is the base version which was
                    // overwritten by a variant. So we skip it.
                    if (addedNames.contains(coreName) && !Boolean.TRUE.equals(core.getMetaData(WGDesignDocument.META_VARIANT))) {
                        continue;
                    }
                    else {
                        addedNames.add(coreName);
                    }
View Full Code Here

            return null;
        }
       
        Iterator designsIt = designObjects.iterator();
        Set<String> addedNames = new HashSet<String>();
        WGDocumentCore core;
        List<WGDocumentCore> newList = new ArrayList<WGDocumentCore>();
        while (designsIt.hasNext()) {
            core = wrapVariantCore((WGDocumentCore) designsIt.next());
           
            // Filter out base versions of variants
            if (_lookupVariants) {
                String coreName = (String) core.getMetaData(WGDesignDocument.META_NAME);
               
                // If we try to add a doc that already has been added and is NO variant, we know that this is the base version which was
                // overwritten by a variant. So we skip it.
                if (addedNames.contains(coreName) && !Boolean.TRUE.equals(core.getMetaData(WGDesignDocument.META_VARIANT))) {
                    continue;
                }
                else {
                    addedNames.add(coreName);
                }
View Full Code Here

    public WGDocumentCore getDesignObject(int type, String name, String mediaKey) {
        try {
            WGDatabase db = getDesignDB();
           
            if (_lookupVariants) {
                WGDocumentCore core = fetchDesignObject(db, type, name + "." + _slaveDB.getDbReference(), mediaKey);
                if (core != null) {
                    return wrapVariantCore(core);
                }
            }
           
View Full Code Here

        String failedKey = new WGDocumentKey(type, name, mediaKey).toString();
        if (_cacheFailedLookups && _failedLookups.contains(failedKey)) {
            return null;
        }
       
        WGDocumentCore core = null;
        if (db.getDesignProvider() != null && db.getDesignProvider().providesType(type)) {
            core = db.getDesignProvider().getDesignObject(type, name, mediaKey);
        }
        else {
            core = db.getCore().getDesignObject(type, name, mediaKey);
View Full Code Here

    List list = this.getDesignObjects(type);
    if (list == null || list.size() == 0) {
      return null;
    }
   
    WGDocumentCore doc = (WGDocumentCore) list.get(0);
    if (!WGDocument.getName(doc).equals(name)) {
      return null;
    }
   
    if (type == WGDocument.TYPE_TML && !strMediaKey.equals(doc.getMetaData(WGTMLModule.META_MEDIAKEY))) {
      return null;
    }
    else {
      return doc;
    }
View Full Code Here

TOP

Related Classes of de.innovationgate.webgate.api.WGDocumentCore

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.