Examples of UserList


Examples of org.fao.geonet.domain.responses.UserList

                if (!profileSet.contains(profile.name())) {
                    usersToRemove.add(user.getId());
                }
            }
        }
        UserList res = new UserList();

        for (User u : Collections.unmodifiableList(all)) {
            if (!usersToRemove.contains(u.getId())) {
                res.addUser(u);
            }
        }


        return res;
View Full Code Here

Examples of sample.servicelifecycle.bean.UserList

                         AxisService service) {
        try {
            BookList availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
            BookList allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
            BookList lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
            UserList userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMElement libElement = fac.createOMElement("library", null);
            Book[] bookList = allBookList.getBookList();
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.ALL_BOOK),
                    bookList, new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.AVAILABLE_BOOK),
                    availableBookList.getBookList(), new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.LEND_BOOK),
                    lendBookList.getBookList(), new QName("book"), false, null));

            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.USER_LIST),
                    userList.getUsers(), new QName("user"), false, null));

            String tempDir = System.getProperty("java.io.tmpdir");
            File tempFile = new File(tempDir);
            File libFile = new File(tempFile, "library.xml");
            OutputStream out = new FileOutputStream(libFile);
View Full Code Here

Examples of sample.servicelifecycle.bean.UserList

                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
                element.getFirstChildWithName(new QName(LibraryConstants.USER_LIST));
        if (usersEle != null) {
            Iterator usre_itr = usersEle.getChildren();
            while (usre_itr.hasNext()) {
                Object obj = usre_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    users.addUser((User) BeanUtil.deserialize(User.class, omElement,
                            new DefaultObjectSupplier(), "user"));
                }

            }
        }
View Full Code Here

Examples of sample.servicelifecycle.bean.UserList

                         AxisService service) {
        try {
            BookList availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
            BookList allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
            BookList lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
            UserList userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMElement libElement = fac.createOMElement("library", null);
            Book[] bookList = allBookList.getBookList();
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.ALL_BOOK),
                    bookList, new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.AVAILABLE_BOOK),
                    availableBookList.getBookList(), new QName("book"), false, null));
            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.LEND_BOOK),
                    lendBookList.getBookList(), new QName("book"), false, null));

            libElement.addChild(BeanUtil.getOMElement(
                    new QName(LibraryConstants.USER_LIST),
                    userList.getUsers(), new QName("user"), false, null));

            String tempDir = System.getProperty("java.io.tmpdir");
            File tempFile = new File(tempDir);
            File libFile = new File(tempFile, "library.xml");
            OutputStream out = new FileOutputStream(libFile);
View Full Code Here

Examples of sample.servicelifecycle.bean.UserList

                    OMElement omElement = (OMElement) obj;
                    lendBookList.addBook((Book) BeanUtil.deserialize(Book.class, omElement, new DefaultObjectSupplier(), "book"));
                }
            }
        }
        UserList users = new UserList();
        OMElement usersEle =
                element.getFirstChildWithName(new QName(LibraryConstants.USER_LIST));
        if (usersEle != null) {
            Iterator usre_itr = usersEle.getChildren();
            while (usre_itr.hasNext()) {
                Object obj = usre_itr.next();
                if (obj instanceof OMElement) {
                    OMElement omElement = (OMElement) obj;
                    users.addUser((User) BeanUtil.deserialize(User.class, omElement,
                            new DefaultObjectSupplier(), "user"));
                }

            }
        }
View Full Code Here

Examples of twitter4j.UserList

            int size = list.length();
            PagableResponseList<UserList> users =
                    new PagableResponseListImpl<UserList>(size, json, res);
            for (int i = 0; i < size; i++) {
                JSONObject userListJson = list.getJSONObject(i);
                UserList userList = new UserListJSONImpl(userListJson);
                users.add(userList);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(userList, userListJson);
                }
            }
View Full Code Here

Examples of twitter4j.UserList

            int size = list.length();
            ResponseList<UserList> users =
                    new ResponseListImpl<UserList>(size, res);
            for (int i = 0; i < size; i++) {
                JSONObject userListJson = list.getJSONObject(i);
                UserList userList = new UserListJSONImpl(userListJson);
                users.add(userList);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(userList, userListJson);
                }
            }
View Full Code Here

Examples of twitter4j.UserList

        // TODO: this is inefficient
        Map<String, UserList> lists = new HashMap<String, UserList>();
        for (UserList l : getUserLists(user)) {
            lists.put(l.getName(), l);
        }
        final UserList list = lists.get(listId);
        if (null == list) {
            throw new TwitterClientException("no such list: " + listId + " owned by user " + user);
        }

        List<User> result = new LinkedList<User>();
        for (twitter4j.User u : asList(new ListGenerator<twitter4j.User>() {
            public PagableResponseList getList(long cursor) throws TwitterException {
                return twitter.getUserListMembers(list.getId(), cursor);
            }
        })) {
            result.add(new User(u));
        }
View Full Code Here

Examples of twitter4j.UserList

            System.out.println("Usage: java twitter4j.examples.list.ShowUserList [list id]");
            System.exit(-1);
        }
        try {
            Twitter twitter = new TwitterFactory().getInstance();
            UserList list = twitter.showUserList(Integer.parseInt(args[0]));
            System.out.println("id:" + list.getId() + ", name:" + list.getName() + ", description:"
                    + list.getDescription() + ", slug:" + list.getSlug() + "");
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to show the list: " + te.getMessage());
            System.exit(-1);
View Full Code Here

Examples of twitter4j.UserList

            System.out.println("Usage: java twitter4j.examples.list.DestroyUserList [list id]");
            System.exit(-1);
        }
        try {
            Twitter twitter = new TwitterFactory().getInstance();
            UserList list = twitter.destroyUserList(Integer.parseInt(args[0]));
            System.out.println("Successfully deleted the list (id:" + list.getId() + ", slug:" + list.getSlug() + ").");
            System.exit(0);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println("Failed to delete a list: " + te.getMessage());
            System.exit(-1);
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.