Package com.volantis.mcs.xdime

Examples of com.volantis.mcs.xdime.XDIMEException


            result= new TimedRefreshInfo(contents);
        } catch (NumberFormatException e) {
            // If string didn't parse to long property, throw an exception
            // reusing existing localised message, saying that Period was
            // expected, but String was encountered.
            throw new XDIMEException(
                    LOCALIZER.format("invalid-meta-content-type", new Object[]{
                        TimedRefreshInfo.class.getName(),
                        String.class.getName()}), e);
        } catch (ProtocolException e) {
            throw new XDIMEException(
                    LOCALIZER.format("invalid-meta-content-type",new Object[]{
                        TimedRefreshInfo.class.getName(),
                        String.class.getName()}), e);
        }
        return result;
View Full Code Here


        try {
            protocol.writeOpenTableHeader((TableHeaderAttributes)protocolAttributes);
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);

            throw new XDIMEException(exceptionLocalizer.format(
                "rendering-error", getTagName()), e);
        }
        return XDIMEResult.PROCESS_ELEMENT_BODY;       
    }
View Full Code Here

    protected void initialiseElementSpecificAttributes(
            XDIMEContextInternal context, XDIMEAttributes attributes)
            throws XDIMEException {
      String type = getTypeAttributeValue(context, attributes);
      if (type == null) {
        throw new XDIMEException("\"type\" attribute of clock-content "
            + "element cannot be null");
      }
     
      String value = getValueAttributeValue(context, attributes);
      if (value == null) {
        throw new XDIMEException("\"value\" attribute of clock-content "
            + "element cannot be null");
      }
     
        ((ClockContentAttributes) protocolAttributes).setType(type);
        ((ClockContentAttributes) protocolAttributes).setValue(value);
View Full Code Here

        TimedRefreshInfo tri = (TimedRefreshInfo) content;
        if (null != tri) {
            try {
                ctx.getProtocol().writeTimedRefresh(tri);
            } catch (ProtocolException e) {
                throw new XDIMEException(e);
            }
        }
    }
View Full Code Here

                return;      
            }
        } catch (ProtocolException e) {
            logger.error("rendering-error", getTagName(), e);
   
            throw new XDIMEException(exceptionLocalizer.format(
                "rendering-error", getTagName()), e);
        }
        resolveFakeImageURL(context, (MapAttributes)protocolAttributes);
       
        super.callCloseOnProtocol(context);
View Full Code Here

            // transcode the image.
            try {
                url = ContextInternals.constructImageURL(
                           requestContext, url);
            } catch (RepositoryException e) {
                throw new XDIMEException(e);
            }
     
            createFakeAssetURLMapEntry(requestContext, url);
                   
            // Rewrite the URL with PageURLRewriter.
View Full Code Here

            x += 1;
            ((MapAttributes) protocolAttributes).setLongitude(longitude);
        }
       
        if (x == 1) {
            throw new XDIMEException(
                    "Both or none of longitude and latitude "
                            + "attributes must be specified");
        }
       
       
        String query = getQueryAttributeValue(context, attributes);
        if (query != null) {
            if (x > 0) {
                throw new XDIMEException("longitude and/or latitude "
                                + "attributes must not be specified while "
                                + "query attribute is specified");
            }
            x++;
            ((MapAttributes) protocolAttributes).setQuery(query);
           
        }
       
        int zoom = getZoomAttributeValue(context, attributes);
       
        if (zoom > -1) {
          if (zoom < MIN_ZOOM || zoom > MAX_ZOOM) {
                 throw new XDIMEException("\"zoom\" attribute of "
                        + "map element must belong to ["
                        + MIN_ZOOM + ","
                        + MAX_ZOOM + "]");
          } else if (x == 0) {
            throw new XDIMEException("zoom attribute can be specified "
                + "only when initial location is");
          }
          zoom = MAX_ZOOM - zoom;
            ((MapAttributes) protocolAttributes).setZoom(zoom);
        }
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 "
                        + "element must be double");
            }
        }
       
        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 "
                        + "element must be double");
            }
        }
        return longitude;
    }
View Full Code Here

        String attrVal = attributes.getValue("", "zoom");
        if (attrVal != null) {
            try {
                zoom = Integer.parseInt(attrVal);
            } catch (NumberFormatException nfe) {
                throw new XDIMEException("\"zoom\" attribute of map "
                        + "element must be integer");
            }
        }
       
        return zoom;
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.