Package com.volantis.mcs.xdime

Examples of com.volantis.mcs.xdime.XDIMEException


            }
            elementIndex--;
        }       
        if (null == widgetToDismiss) {
            // This can happen only in case of invalid markup
            throw new XDIMEException(EXCEPTION_LOCALIZER
                    .format("xdime-dismiss-not-in-dismissable"));
        }
    }   
View Full Code Here


                MemberName memberName;
               
                try {
                    memberName = MemberName.getMemberNameFor(component);
                } catch (IllegalArgumentException e) {
                    throw new XDIMEException("Undefined " + getMemberType().getName() + " reference: " + referenceString);
                }
               
                memberNames.add(memberName);
               
                lastMemberName = memberName;
            }
           
            // Store the position of last minus sign for next loop iteration.
            lastMinusIndex = minusIndex;
        } while (lastMinusIndex != -1);
       
        // Throw an exception, if reference is invalid.
        if (widgetId == null || memberNames == null) {
            throw new XDIMEException("Illegal " + getMemberType().getName() + " reference: " + referenceString);
        }
       
        // Check, that last member name is of correct type.
        if (lastMemberName.getMemberType() != getMemberType()) {
            throw new XDIMEException("Expected " + getMemberType().getName() +
                    ", found " + lastMemberName.getMemberType().getName() +
                    ": " + referenceString);
        }
       
        // After widget ID and member names are parsed, initalize
View Full Code Here

        int minZoom = getMinZoomAttributeValue(context, attributes);
        int maxZoom = getMaxZoomAttributeValue(context, attributes);

        if (maxZoom < minZoom) {
            throw new XDIMEException("Value of max-zoom attribute of "
                    + "map-location-marker element must not be lower than "
                    + "min-zoom attibute");           
        } else {
            ((MapLocationMarkerAttributes)protocolAttributes)
                    .setMinZoom(minZoom);
View Full Code Here

        String attrVal = attributes.getValue("", "latitude");
        if (attrVal != null) {
            try {
                latitude = Double.parseDouble(attrVal);
            } catch (NumberFormatException nfe) {
                throw new XDIMEException("\"latitude\" attribute of "
                        + "map-location-marker element must be double");
            }
        } else {
            throw new XDIMEException("\"latitude\" attribute of map-location-"
                    + "marker element must be specified.");
        }
        return latitude;
    }
View Full Code Here

        String attrVal = attributes.getValue("","longitude");
        if (attrVal != null) {
            try {
                longitude = Double.parseDouble(attrVal);
            } catch (NumberFormatException nfe) {
                throw new XDIMEException("\"longitude\" attribute of "
                        + "map-location-marker element must be double");
            }
        } else {
            throw new XDIMEException("\"longitude\" attribute of map-location-"
                    + "marker element must be specified.");
        }
        return longitude;
    }
View Full Code Here

        String src = attributes.getValue("","src");
        if (src != null) {
            src = rewriteURLWithPageURLRewriter(context, src, PageURLType.WIDGET);
        } else {
            throw new XDIMEException("\"src\" attribute of map-location-marker"
                    + " element must be specified.");

        }
        return src;
    }
View Full Code Here

        String attrVal = attributes.getValue("","min-zoom");
        if (attrVal != null) {
            try {
                minZoom = Integer.parseInt(attrVal);
            } catch (NumberFormatException nfe) {
                throw new XDIMEException("\"min-zoom\" attribute of "
                        + "map-location-marker element must be Integer");
            }
            if (minZoom < MIN_MARKER_ZOOM || minZoom > MAX_MARKER_ZOOM) {
                throw new XDIMEException("\"min-zoom\" attribute of "
                        + "map-location-marker element must belong to [" +
                        MIN_MARKER_ZOOM + "," +
                        MAX_MARKER_ZOOM +"]");
            }
        }
View Full Code Here

        String attrVal = attributes.getValue("","max-zoom");
        if (attrVal != null) {
            try {
                maxZoom = Integer.parseInt(attrVal);
            } catch (NumberFormatException nfe) {
                throw new XDIMEException("\"max-zoom\" attribute of "
                        + "map-location-marker element must be Integer");
            }
            if (maxZoom < MIN_MARKER_ZOOM
                    || maxZoom > MAX_MARKER_ZOOM) {
                throw new XDIMEException("\"max-zoom\" attribute of "
                        + "map-location-marker element must belong to [" +
                        MIN_MARKER_ZOOM + "," +
                        MAX_MARKER_ZOOM +"]");
            }
        }
View Full Code Here

                        (WidgetAttributes)protocolAttributes);            
            }
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);
   
            throw new XDIMEException(exceptionLocalizer.format(
                "rendering-error", getTagName()), e);
        }
        // Note: we return SKIP_ELEMENT_BODY which means call close on protocol is never called
        return XDIMEResult.SKIP_ELEMENT_BODY;      
    }
View Full Code Here

            openObjectCaption(context);

        } else {
            // This should never happen
            logger.error("internal-error-while-processing-element", getTagName());
            throw new XDIMEException(
                exceptionLocalizer.format(
                    "internal-error-while-processing-element", getTagName()));
        }
        return XDIMEResult.PROCESS_ELEMENT_BODY;
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xdime.XDIMEException

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.