Package de.innovationgate.webgate.api

Examples of de.innovationgate.webgate.api.WGIllegalArgumentException


    private WGAPlugin createPlugin(String path) throws WGIllegalArgumentException, IOException, InvalidPluginException {
       
        File file = _core.getWGAFile(path);
        if (!file.exists()) {
            throw new WGIllegalArgumentException("File '" + file.getPath() + " does not exist or is no regular data file");
        }
       
        WGAPlugin plugin = new WGAPlugin(this, path);
        return plugin;
    }
View Full Code Here


        public URLID(String id, WGDatabase contentDb) throws WGAPIException {

            _db = contentDb;

            if (id == null || id.trim().equals("")) {
                throw new WGIllegalArgumentException("The given id is empty or null");
            }

            List tokens = WGUtils.deserializeCollection(id, WGContentKey.TOKEN_DIVIDER);
            Collections.reverse(tokens);
            if (tokens.size() < 3) {
View Full Code Here

                else {
                    return null;
                }
            }
            else {
                throw new WGIllegalArgumentException("Parameter key must be an instance of String.");
            }
        }
    }
View Full Code Here

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

    @Override
    public void removePortlet(WGPortlet portlet) throws WGAPIException {
       
        if (portlet.isRoot()) {
            throw new WGIllegalArgumentException("Cannot remove the root portlet");   
        }
       
        // First unregister child portlets
        Iterator<WGPortlet> children = getChildPortlets(portlet).iterator();
        while (children.hasNext()) {
View Full Code Here

        else {
            return new KeyMap(this, key, folder);
        }
    }
    catch (ParseException e) {
      throw new WGIllegalArgumentException("Unparsable: key '" + key + "' folder '" + folder + "'.", e);
    }
  }
View Full Code Here

     */
    @CodeCompletion
    public List bestfragments(String itemname, int fragmentSize, int maxFragments, String prefix, String suffix, String encode) throws WGAPIException {
        // check preconditions for highlighting
        if (itemname == null) {
            throw new WGIllegalArgumentException("Unable to retrieve best fragments for item 'null'.");
        }       
        if (!getwgacore().isLuceneEnabled()) {
            addwarning("Unable to highlight item '" + itemname + "' bc. lucene is not enabled.");
            return Collections.EMPTY_LIST;
        }
View Full Code Here

    public boolean unregisterportlet(String portletKey) throws WGAPIException {

    TMLPortlet portlet = getportlet(portletKey);

    if (portlet == null) {
            throw new WGIllegalArgumentException("Unable to unregister portlet with key '" + portletKey + "' - no portlet with this key registered.");
        }
     
    portlet.unregister();
        return true;
  }
View Full Code Here

      TMLPortlet portlet = getportlet(portletKey);
      if (portlet != null) {
          portlet.cleanup();
      }
      else {
          throw new WGIllegalArgumentException("Unable to cleanup portlet with key '" + portletKey + "' - no portlet with this key registered.");
  }
 
  }
View Full Code Here

  @CodeCompletion
    public String registerportletforname(String name, String moduleDb, String module, boolean overwrite) throws WGAPIException {
       
        // Verify portlet name rules
        if (!PORTLETNAME_PATTERN.matcher(name).matches()) {
            throw new WGIllegalArgumentException("The portletname may only consist of characters A-Z, a-z, 0-9, _, ., - and :");
        }
       
        // Verify portlet name not already used
        TMLPortlet portlet = getportletforname(name);
        if (portlet != null) {
            if (overwrite) {
                unregisterportletforname(name);
            }
            else {
                throw new WGIllegalArgumentException("Portlet name '" + name + "' already registered.");
            }
        }
       
        String pkey = registerportlet(moduleDb, module, name);
        setitem(PORTLETNAME_ITEM_PREFIX + name, pkey);
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.