Examples of PackageException


Examples of net.rim.tumbler.exception.PackageException

              _compiledJARDependencies.add(jarFile
                  .getAbsolutePath());
            }
          }
        } else {
          throw new PackageException(
              "EXCEPTION_NEED_FEATURE_FROM_UNIDENTIFIED_EXTENSION", featureId);
        }
      } else {
        // TODO temp workaround to not throw error when widgetcache
        // features cannot be found in repository
        if (!FRAMEWORK_FEATURES.contains(featureId)) {
          throw new PackageException("EXCEPTION_FEATURE_NOT_FOUND",
              featureId);
        }
      }
    }
   
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

           
            // Parse DOM
            return parseDocument(doc, archive);
           
        } catch (SAXException saxEx) {
            throw new PackageException("EXCEPTION_CONFIGXML_BADXML", saxEx);
        }
    }
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

        // Invalid Configurations...
       
        // If both source attributes are empty the developer did something wrong.
        if ((_widgetConfig.getForegroundSource() == null || _widgetConfig.getForegroundSource().isEmpty())
                && _widgetConfig.getBackgroundSource() == null) {
            throw new PackageException( "EXCEPTION_CONFIGXML_INVALID_CONTENT",
                    "Invalid source or the source is not specified." );
        }

        if (!_widgetConfig.isStartupEnabled()
                && !_widgetConfig.getForegroundSource().isEmpty()
                && _widgetConfig.getBackgroundSource() != null) {
            throw new PackageException( "EXCEPTION_CONFIGXML_INVALID_CONTENT",
                    "Invalid source or the source is not specified." );
        }
       
        return _widgetConfig;
    }
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

    private void processIconNode(Node iconNode) throws Exception {
        // get icon
        NamedNodeMap attrs = iconNode.getAttributes();
        Node src = attrs.getNamedItem("src");
        if (src == null) {
            throw new PackageException("EXCEPTION_CONFIGXML_INVALID_ICON");
        }
        String iconSrc = getURIValue(src);
       
        // check hover
        Node hoverAttr = attrs.getNamedItem("rim:hover");
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

    /*
     * Processes the loading screen node and sets Loading Screen configurations
     */
    private void processLoadingScreenNode(Node loadingScreenNode) throws Exception {
        if (loadingScreenNode.getNodeType() != Node.ELEMENT_NODE) {
            throw new PackageException("EXCEPTION_CONFIGXML_INVALID_LOADINGSCREEN_ELEMENT");
        }      
     
        NamedNodeMap attrs = loadingScreenNode.getAttributes();
        Node attr;
       
        attr = attrs.getNamedItem("backgroundColor");
        if (attr != null) {
            _widgetConfig.setLoadingScreenColour(getTextValue(attr));
        }

        attr = attrs.getNamedItem("backgroundImage");
        if (attr != null) {
            _widgetConfig.setBackgroundImage(getTextValue(attr).replace('\\', '/').trim());
        }
       
        attr = attrs.getNamedItem("foregroundImage");
        if (attr != null) {
            _widgetConfig.setForegroundImage(getTextValue(attr).replace('\\', '/').trim());
        }

        attr = attrs.getNamedItem("onFirstLaunch");
        if (attr != null && attr.getNodeValue().equalsIgnoreCase("true")) {
            _widgetConfig.setFirstPageLoad(true);
        }
   
        attr = attrs.getNamedItem("onRemotePageLoad");
        if (attr != null && attr.getNodeValue().equalsIgnoreCase("true")) {
            _widgetConfig.setRemotePageLoad(true);
        }

        attr = attrs.getNamedItem("onLocalPageLoad");
        if (attr != null && attr.getNodeValue().equalsIgnoreCase("true")) {
            _widgetConfig.setLocalPageLoad(true);
        }
       
        Element loadingScreenElement = (Element) loadingScreenNode;

        // Process nested <rim:transitionEffect> elements
        NodeList transitionEffectList = loadingScreenElement.getElementsByTagName("rim:transitionEffect");
        if (transitionEffectList.getLength() > 1) {
          throw new PackageException("EXCEPTION_CONFIGXML_INVALID_LOADINGSCREEN_ELEMENT");
        }

        if (transitionEffectList.getLength() > 0) {
          Node transitionEffectNode = transitionEffectList.item(0);
          processTransitionEffectNode(transitionEffectNode);
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

     */
    private void processConnectionNode(Node connectionNode) throws Exception {

        // This should be an element node
        if (connectionNode.getNodeType() != Node.ELEMENT_NODE) {
            throw new PackageException("EXCEPTION_CONFIGXML_INVALID_CONNECTION_ELEMENT");
        }
        Element connElement = (Element) connectionNode;

        // Process timeout attribute
        NamedNodeMap attrs = connElement.getAttributes();
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

                System.out.write(stdout.getStdout());
                System.out.flush();
            }
        } catch (IOException ioe) {
            ioe.printStackTrace();
            throw new PackageException("EXCEPTION_MXMLC");
        } catch (InterruptedException ie) {
            throw new PackageException("EXCEPTION_MXMLC");
        }
    }
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

                    barFullname,
                    "author"
                };
                execAndCheck(cmd2, barFile);
            } catch (InterruptedException ie) {
                throw new PackageException("EXCEPTION_SIGNING_FAILED");
            }
        }
    }
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

        //
        if (exitcode.getExitValue().intValue() != 0) {
            System.out.write(stderr.getStderr());
            System.out.write(stdout.getStdout());
            System.out.flush();
            throw new PackageException("EXCEPTION_SIGNING_FAILED");
        }

        //
        // Check for target modified
        //
        if (targetToCheck.lastModified() == lastModified) {
            throw new PackageException("EXCEPTION_SIGNING_FAILED");
        }
    }
View Full Code Here

Examples of net.rim.tumbler.exception.PackageException

           
            if (new File(lib).exists()) {
                result.add(lib);
            }
            else {
                throw new PackageException("EXCEPTION_LIBRARY_NOT_FOUND", lib);
            }
        }
        return result;
    }
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.