Examples of addHashtag()


Examples of com.streamreduce.core.model.InventoryItem.addHashtag()

        InventoryItem inventoryItem = new InventoryItem();

        inventoryItem.setAccount(connection.getAccount());
        inventoryItem.setUser(connection.getUser());
        inventoryItem.setConnection(connection);
        inventoryItem.addHashtag(connection.getProviderId());
        inventoryItem.setDeleted(false);

        // Default to visibility of the connection (Should be overridden below if required)
        inventoryItem.setVisibility(connection.getVisibility());
View Full Code Here

Examples of com.streamreduce.core.model.SobaObject.addHashtag()

            // Add tags to the Connection/InventoryItem for message creation only, do not persist (Validation occurs)
            JSONArray hashtags = entry.has("hashtags") ? entry.getJSONArray("hashtags") : null;
            SobaObject target = inventoryItemId == null ? connection : inventoryItem;
            // TODO: add Custom TAG hack, remove this and do it right
            target.addHashtag("custom");

            if (hashtags != null) {
                // Pull in hashtags from the actual IMG message
                for (Object rawHashtag : hashtags) {
                    if (rawHashtag instanceof String) {
View Full Code Here

Examples of com.streamreduce.core.model.SobaObject.addHashtag()

            if (hashtags != null) {
                // Pull in hashtags from the actual IMG message
                for (Object rawHashtag : hashtags) {
                    if (rawHashtag instanceof String) {
                        target.addHashtag((String) rawHashtag);
                    } else {
                        return error("All hashtags specified in the 'hashtags' attribute must be strings.",
                                Response.status(Response.Status.BAD_REQUEST));
                    }
                }
View Full Code Here

Examples of com.streamreduce.core.model.User.addHashtag()

            return error("Hashtag payload is empty", Response.status(Response.Status.BAD_REQUEST));
        }

        try {
            User user = userService.getUserById(new ObjectId(userId), currentUser.getAccount());
            user.addHashtag(hashtag);
            userService.updateUser(user);

        } catch (UserNotFoundException e) {
            return error(e.getMessage(), Response.status(Response.Status.NOT_FOUND));
        }
View Full Code Here

Examples of com.streamreduce.core.model.messages.SobaMessage.addHashtag()

    @Override
    public void addHashtagToMessage(Account account, ObjectId messageId, String hashtag) throws MessageNotFoundException {
        SobaMessage message = getMessage(account, messageId);

        message.addHashtag(hashtag);
        updateMessage(account, message);
    }

    @Override
    public void removeHashtagFromMessage(Account account, ObjectId messageId, String hashtag) throws MessageNotFoundException {
View Full Code Here

Examples of com.streamreduce.core.model.messages.SobaMessage.addHashtag()

    @Ignore
    public void testRemoveTag() throws Exception {
        SobaMessage sobaMessage = applicationManager.getMessageService().getMessage(getTestUser().getAccount(),
                userMessage.getMessageId());

        sobaMessage.addHashtag("foo");

        int num = sobaMessage.getHashtags().size();

        applicationManager.getMessageService().updateMessage(getTestUser().getAccount(), sobaMessage);
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.