Examples of UUID


Examples of org.internna.iwebmvc.model.UUID

    public String objectToString(Object object) {
        return object != null ? object.toString() : null;
    }

    public Object stringToObject(String stringValue) {
        return new UUID(stringValue);
    }
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

    }

    @Override
    @Transactional
    public final void remove(Class<? extends DomainEntity> entityClass, String uuid) {
        remove(entityClass, new UUID(uuid));
    }
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

    @SuppressWarnings("unchecked")
    @RequestMapping(method = RequestMethod.GET)
    public String showForm(@RequestParam("className") String className, @RequestParam(value = "id", required = false) String id, @RequestParam(value = "redirect", required = false) String redirect, ModelMap model, HttpSession session) throws Exception {
        Class<? extends DomainEntity> clazz = ClassUtils.forName(className);
        Object entity = StringUtils.hasText(id) ? dao.find(clazz, new UUID(id)) : ClassUtils.instantiateClass(clazz);
        if (entity == null) return "crud/deleted";
        model.addAttribute("entity", entity);
        model.addAttribute("className", cipherer.encrypt(className));
        session.setAttribute(className, entity);
        if (StringUtils.hasText(redirect)) model.addAttribute("redirect", redirect);
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

    @RequestMapping(method = RequestMethod.GET)
    public void serve(@RequestParam("file") String file, @RequestParam(required = false, value = "width") String width, @RequestParam(required = false, value = "height") String height, @RequestParam(required = false, value = "escape") String escape, HttpServletRequest request, HttpServletResponse response) throws IOException {
        if (hasText(file)) {
            if (decipherer.isEncrypted(file)) {
                Document doc = dao.find(Document.class, new UUID(decipherer.decrypt(file)));
                response.setContentType(doc.getMimeType());
                if (logger.isDebugEnabled()) logger.debug("Setting MIME type [" + doc.getMimeType() + "] to document [" + doc.getId() + "]");
                if (doc.isText()) sendText(doc, escape, response);
                else send(new ByteArrayInputStream(doc.getContents()), doc.getMimeType(), response.getOutputStream(), width, height);
            } else {
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

                    old.removeAll();
                    getDao().remove(old);
                }
                return null;
            } else {
                UUID id = up.getId();
                if (id != null) {
                    MultiDocument old = getDao().find(MultiDocument.class, id);
                    old.removeAll();
                    for (Document doc : up.getDocuments()) {
                        Document parsed = documentParser.parse(doc);
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

        if (filters != null) {
            parameters = new HashMap<String, Object>(filters.size());
            for (Filter filter : filters) {
                if (hasText(filter.getPath()) && (!filter.isNullValue())) {
                    if (hasText(filter.getFrom())) {
                        if ("COLLECTION".equals(filter.getType())) parameters.put(filter.getSanitizedPath(), dao.getReference(ClassUtils.forName(decipherer.decrypt(filter.getEntityClass())), new UUID(decipherer.decrypt(filter.get("from").toString()))));
                        else if (("ENTITY".equals(filter.getType())) || ("SCRIPTABLE".equals(filter.getType()))) parameters.put(filter.getSanitizedPath(), new UUID(decipherer.decrypt(filter.get("from").toString())));
                        else parameters.put(filter.getSanitizedPath(), getEnum(clazz, filter, filter.get("from")));
                    }
                    if (hasText(filter.getTo())) parameters.put(filter.getSanitizedPath() + MAX, filter.get("to"));
                }
            }
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

        this.userManager = userManager;
    }

    @Override public Document parse(Document up) {
        if (up != null) {
            UUID id = up.getId();
            if (id != null) {
                Document doc = getDao().find(Document.class, id);
                doc.setTemporal(false);
                doc.setIdentifier(up.getIdentifier());
                if ((doc.getAuthor() == null) && (userManager != null)) {
View Full Code Here

Examples of org.internna.iwebmvc.model.UUID

  @Override public String objectToString(Object object) {
        return object != null ? object.toString() : null;
    }

    @Override public Object stringToObject(String stringValue) {
        return new UUID(stringValue);
    }
View Full Code Here

Examples of org.jgroups.util.UUID

            try {
                Map<String,Object> m=new HashMap<String,Object>();
                m.put("additional_data", new byte[] { 'b', 'e', 'l', 'a' });
                c.down(new Event(Event.CONFIG, m));
                c.connect("AddDataTest.testadditionalData()");
                UUID addr=(UUID)c.getAddress();
                System.out.println("address is " + addr);
                assert addr.getAdditionalData() != null;
                assert addr.getAdditionalData()[0] == 'b';
            }
            finally {
                c.close();
            }
        }
View Full Code Here

Examples of org.jgroups.util.UUID

            Util.sleep(500); // msgs are sent asynchronously, give ch2 some time to receive them
            List<Message> list=receiver.getMsgs();
            assert !list.isEmpty();
            Message msg=list.get(0);
            UUID src=(UUID)msg.getSrc();
            assert src != null;
            assert src.getAdditionalData() != null;
            assert src.getAdditionalData().length == 4;
        }
        finally {
            if(ch2 != null) ch2.close();
            if(ch1 != null) ch1.close();
        }
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.