Package de.innovationgate.webgate.api

Examples of de.innovationgate.webgate.api.WGIllegalArgumentException


    @CodeCompletion
    public void unregisterportletforname(String name) throws WGAPIException {
       
        String key = getPortletKeyForName(name);
        if (key == null) {
            throw new WGIllegalArgumentException("No portlet of name '" + name + "' exists in the current portlet scope");
        }
        unregisterportlet(key);
        removeitem(PORTLETNAME_ITEM_PREFIX + name);
        save();
       
View Full Code Here


          }
          else if (relType.equalsIgnoreCase("protected")) {
              relData = new WGRelationData(parentContent.getContentKey(), relName, relationContext.content().getStructKey(), relationContext.content().getLanguage().getName(), WGContent.RELATIONTYPE_PROTECTED, null);
          }
          else {
            throw new WGIllegalArgumentException("Unknown relationtype '" + relType + "'.");
          }
        }
        else {
          throw new WGIllegalArgumentException("Relation context lookup failed for: field '" + relName + "' relationdata '" + relationStr + "'.");
        }
        return relData;
   
View Full Code Here

   
   
    private WGCSSJSModule retrieveModule(WGHierarchicalDatabaseEvent event) throws WGAPIException {
        WGCSSJSModule module = event.getDb().getWrappedDB().getScriptModule(_moduleName, WGScriptModule.CODETYPE_TMLSCRIPT);
        if (module == null) {
            throw new WGIllegalArgumentException("Cannot find listener module '" + _moduleName + "'.");
        } else {
            return module;
        }
    }
View Full Code Here

          }
         
          context.setvar("event", event);
          return context;
        } else {
          throw new WGIllegalArgumentException("Unable to retrieve event context.");
        }       
    }
View Full Code Here

     */
    public void performCustomDBIndexDeletions(WGDatabase db) throws IOException, WGIllegalArgumentException, InterruptedException {
        // check if db is not a full contentstore
        // this method is only supported for none fullcontentstores
        if (db.hasFeature(WGDatabase.FEATURE_FULLCONTENTFEATURES)) {
            throw new WGIllegalArgumentException("Method performCustomDBIndexDeletions() is unsupported for full featured contentstores.");
        }
       
        // check if db is already indexed
        if (!_indexedDbs.containsKey(db.getDbReference())) {
            throw new WGIllegalArgumentException("Cannot perform deletions on database '" + db.getDbReference() + "'. Database is not yet indexed. Ensure performCustomDBIndexUpdates() has been called first.");
        }
       
        // collect currently indexed document keys for this db
        Set currentlyIndexedDocuments = new HashSet();
        BooleanQuery query = new BooleanQuery();
View Full Code Here

                   
                    synchronized (LuceneManager.this) {
                      // revision of this indexer run --> result in the lastmodified revision of index config
                        WGDatabase db = _core.openContentDB(dbKey, null, true);
                        if (db == null) {
                            throw new WGIllegalArgumentException("Cannot perform index update on database '" + dbKey + "' because it is not connected");
                        }
                       
                       
                      revisionOfThisUpdate = db.getRevision();
                     
View Full Code Here

                  // B000047B2
                    field = new Field(name, NUMBERFORMAT_KEYWORD.format(value), Field.Store.YES, Field.Index.NOT_ANALYZED);                   
                } else if (value instanceof Boolean) {
                    field = new Field(name, String.valueOf(value), Field.Store.YES, Field.Index.NOT_ANALYZED);
                } else {
                    throw new WGIllegalArgumentException("Unsupported value '" + value.getClass().getName() + "' for keyword '" + name + "'.");
                }
                field.setBoost(boost);
                doc.add(field);
            }
        }
View Full Code Here

                    } else {
                        field = new Field(fieldName, String.valueOf(false), Field.Store.YES, Field.Index.NOT_ANALYZED);
                    }
                } else {
                    if (value != null) {
                        throw new WGIllegalArgumentException("Unsupported value '" + value.getClass().getName() + "' for sortfield '" + fieldName + "'.");
                    } else {
                        // sort field must exist
                        field = new Field(fieldName, "", Field.Store.YES, Field.Index.NOT_ANALYZED);
                    }
                }
View Full Code Here

            if ( (name != null) && (value != null) ) {
                Field field;
                if (value instanceof String) {
                    field = new Field(name, (String)value, Field.Store.NO, Field.Index.ANALYZED);
                } else {
                    throw new WGIllegalArgumentException("Unsupported value '" + value.getClass().getName() + "' for unstored field '" + name + "'.");
                }
                field.setBoost(boost);
                doc.add(field);
            }
        }
View Full Code Here

TOP

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

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.