Package org.internna.iwebmvc.model.core

Examples of org.internna.iwebmvc.model.core.Video


    }

    @Override
    @SuppressWarnings("unchecked")
    public void setAsText(String text) throws IllegalArgumentException {
        Video doc = (Video) getValue();
        Properties properties = new Properties();
        try {
            properties.load(IOUtils.toInputStream(text));
            String uri = properties.getProperty("uri");
            Assert.isEncrypted(decipherer, uri);
            if (doc == null) doc = new Video();
            doc.setUri(decipherer.decrypt(uri));
            doc.setMimeType(properties.getProperty("mimeType"));
            doc.setIdentifier(properties.getProperty("identifier"));
            doc.setCreated(dateFormat.parse(properties.getProperty("created")));
            doc.setSizeInBytes(Long.parseLong(properties.getProperty("sizeInBytes")));
            doc.setWidth(Integer.parseInt(properties.getProperty("width")));
            doc.setHeight(Integer.parseInt(properties.getProperty("height")));
            doc.setDuration(Integer.parseInt(properties.getProperty("duration")));
        } catch (Exception ex) {
            if (log.isDebugEnabled()) log.debug("Could not completely bind [" + text + "] as a Video: " + ex.getMessage());
        }
        setValue(doc);
    }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.model.core.Video

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.