diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecf251c..c905068 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ We are currently working on implementing EmpireAvenue Service. Status as follows GET === Profile Information - rajmahendra - profile/notifications - Pending + profile/notifications - Kalakkumkarthikeyan(working) Lists - kalakkumkarthikeyan @@ -42,21 +42,21 @@ Testing and Documentation GET === -Profile Information +Profile Information-Kalakkumkarthikeyan -Lists - +Lists - Kalakkumkarthikeyan -Leaders - +Leaders -Kalakkumkarthikeyan -History - +History - Kalakkumkarthikeyan -Shares - +Shares - Kalakkumkarthikeyan -Portfolio - +Portfolio - Kalakkumkarthikeyan -Search- +Search-Kalakkumkarthikeyan -Community - +Community -Kalakkumkarthikeyan POST ==== diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenue.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenue.java index 615e437..38dd49d 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenue.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenue.java @@ -16,27 +16,25 @@ package org.agorava.empireavenue; +import org.agorava.api.atinject.ProviderRelated; + +import javax.inject.Qualifier; import java.lang.annotation.Documented; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.PARAMETER; -import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; -import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; -import javax.inject.Qualifier; -import org.agorava.api.atinject.ProviderRelated; +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * The Interface EmpireAvenue. * - * @author Rajmahendra Hegde + * @author Rajmahendra Hegde * @since 0.7.0 */ @Qualifier @ProviderRelated("EmpireAvenue") -@Target({ TYPE, METHOD, PARAMETER, FIELD }) +@Target({TYPE, METHOD, PARAMETER, FIELD}) @Retention(RUNTIME) @Documented public @interface EmpireAvenue { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueConfigOauth.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueConfigOauth.java index 2fb234a..6f2871c 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueConfigOauth.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueConfigOauth.java @@ -27,8 +27,10 @@ */ @EmpireAvenue public class EmpireAvenueConfigOauth extends ProviderConfigOauth20Final { - - /** The Constant AUTHORIZE_URL. */ + + /** + * The Constant AUTHORIZE_URL. + */ private static final String AUTHORIZE_URL = "https://www.empireavenue.com/profile/developer/authorize?client_id=%s&redirect_uri=%s&response_type=code&state=request_auth_code"; /** diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueException.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueException.java index b16bc27..d1b1897 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueException.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/EmpireAvenueException.java @@ -19,10 +19,9 @@ /** * Base exception for Agorava EmpireAvenue Services.
- * + *

* This will help you to catch all EmpireAvenue based Exception at the time of contacting to EA Services.
- * - * + * * @author Rajmahendra Hegde * @since 0.7.0 */ @@ -31,7 +30,7 @@ public class EmpireAvenueException extends AgoravaException { /** * Instantiates a new empire avenue exception. - * + * * @param errorMessage the error message */ public EmpireAvenueException(String errorMessage) { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/BankBalance.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/BankBalance.java index 825a59e..a1ae999 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/BankBalance.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/BankBalance.java @@ -18,10 +18,9 @@ import java.math.BigDecimal; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class BankBalance { private BigDecimal balance; @@ -31,14 +30,14 @@ public BankBalance() { public BigDecimal getBalance() { return balance; } - + @Override public String toString() { return new StringBuffer() - .append("BankBalance [ ") - .append(balance) - .append("]") - .toString(); + .append("BankBalance [ ") + .append(balance) + .append("]") + .toString(); } } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Community.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Community.java index afec323..fef2c47 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Community.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Community.java @@ -17,12 +17,11 @@ package org.agorava.empireavenue.model; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class Community { - + private int communityId; private String joined; private int admin; @@ -60,10 +59,9 @@ public String toString() { .append(",") .append(country) .append("]") - .toString(); + .toString(); } - - + public int getCommunityId() { return communityId; @@ -137,5 +135,5 @@ public String getVisibility() { public String getCountry() { return country; } - + } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Count.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Count.java index be93f90..48f6760 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Count.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Count.java @@ -17,8 +17,7 @@ package org.agorava.empireavenue.model; /** - * - * @author Rajmahendra Hegde + * @author Rajmahendra Hegde * @since 0.7.0 */ public class Count { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/History.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/History.java index 096504b..dec3d17 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/History.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/History.java @@ -17,19 +17,16 @@ /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public class History { - public History(String date) - { - this.date=date; - + public History(String date) { + this.date = date; + } - + private float dividend; private String date; private float price; @@ -49,271 +46,84 @@ public History(String date) private String fullName; private String smPortrait; private String ticker; - /** - * @return the dividend - */ - public float getDividend() { - return dividend; + + public float getYoutube() { + return youtube; } - /** - * @param dividend the dividend to set - */ - public void setDividend(float dividend) { - this.dividend = dividend; + public float getDividend() { + return dividend; } - /** - * @return the date - */ public String getDate() { return date; } - /** - * @param date the date to set - */ - public void setDate(String date) { - this.date = date; - } - /** - * @return the price - */ public float getPrice() { return price; } - /** - * @param price the price to set - */ - public void setPrice(float price) { - this.price = price; - } - - /** - * @return the eav - */ public float getEav() { - return eav; + return eav; } - /** - * @param eav the eav to set - */ - public void setEav(float eav) { - this.eav = eav; - } - - /** - * @return the facebook - */ public float getFacebook() { return facebook; } - /** - * @param facebook the facebook to set - */ - public void setFacebook(float facebook) { - this.facebook = facebook; - } - - /** - * @return the facebookpage - */ public float getFacebookpage() { return facebookpage; } - /** - * @param facebookpage the facebookpage to set - */ - public void setFacebookpage(float facebookpage) { - this.facebookpage = facebookpage; - } - - /** - * @return the flickr - */ public float getFlickr() { return flickr; } - /** - * @param flickr the flickr to set - */ - public void setFlickr(float flickr) { - this.flickr = flickr; - } - - /** - * @return the foursquare - */ public float getFoursquare() { return foursquare; } - /** - * @param foursquare the foursquare to set - */ - public void setFoursquare(float foursquare) { - this.foursquare = foursquare; - } - - /** - * @return the gplus - */ public float getGplus() { return gplus; } - /** - * @param gplus the gplus to set - */ - public void setGplus(float gplus) { - this.gplus = gplus; - } - - /** - * @return the instagram - */ public float getInstagram() { return instagram; } - /** - * @param instagram the instagram to set - */ - public void setInstagram(float instagram) { - this.instagram = instagram; - } - - /** - * @return the linkedin - */ public float getLinkedin() { return linkedin; } - /** - * @param linkedin the linkedin to set - */ - public void setLinkedin(float linkedin) { - this.linkedin = linkedin; - } - /** - * @return the twitter - */ public float getTwitter() { return twitter; } - /** - * @param twitter the twitter to set - */ - public void setTwitter(float twitter) { - this.twitter = twitter; - } - - /** - * @return the wordpress - */ public float getWordpress() { return wordpress; } - /** - * @param wordpress the wordpress to set - */ - public void setWordpress(float wordpress) { - this.wordpress = wordpress; - } - - /** - * @return the youtube - */ - public float getYoutube() { - return youtube; - } - - /** - * @param youtube the youtube to set - */ - public void setYoutube(float youtube) { - this.youtube = youtube; - } - - /** - * @return the shares - */ public int getShares() { return shares; } - /** - * @param shares the shares to set - */ - public void setShares(int shares) { - this.shares = shares; - } - - /** - * @return the type - */ public String getType() { - return type; - } - - /** - * @param type the type to set - */ - public void setType(String type) { - this.type = type; + return type; } - /** - * @return the fullName - */ public String getFullName() { return fullName; } - /** - * @param fullName the fullName to set - */ - public void setFullName(String fullName) { - this.fullName = fullName; - } - - /** - * @return the smPortrait - */ public String getSmPortrait() { return smPortrait; } - /** - * @param smPortrait the smPortrait to set - */ - public void setSmPortrait(String smPortrait) { - this.smPortrait = smPortrait; - } - - /** - * @return the ticker - */ public String getTicker() { return ticker; } - /** - * @param ticker the ticker to set - */ - public void setTicker(String ticker) { - this.ticker = ticker; - } - - @Override + @Override public String toString() { return new StringBuffer().append("History [").append(date) diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Leaders.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Leaders.java index 98bfae5..00e81ab 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Leaders.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Leaders.java @@ -16,15 +16,13 @@ package org.agorava.empireavenue.model; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public class Leaders { protected Leaders(String ticker, - String fullName, String country, String location) { + String fullName, String country, String location) { this.ticker = ticker; this.fullName = fullName; this.country = country; diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Lists.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Lists.java index 41a0a9b..42bc8a5 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Lists.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Lists.java @@ -17,7 +17,7 @@ package org.agorava.empireavenue.model; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ public class Lists { @@ -42,139 +42,80 @@ public Lists() { private String smPortrait; private String lgPortrait; - - - - public String getListTypeId() { return listTypeId; } - public void setListTypeId(String listTypeId) { - this.listTypeId = listTypeId; - } - public String getTitle() { return title; } - public void setTitle(String title) { - this.title = title; - } - public int getIsPrivate() { return isPrivate; } - public void setIsPrivate(int isPrivate) { - this.isPrivate = isPrivate; - } - public int getAllowPrivacyControl() { return allowPrivacyControl; } - public void setAllowPrivacyControl(int allowPrivacyControl) { - this.allowPrivacyControl = allowPrivacyControl; - } - public int getMaxUsers() { return maxUsers; } - public void setMaxUsers(int maxUsers) { - this.maxUsers = maxUsers; - } - public int getUserCount() { return userCount; } - public void setUserCount(int userCount) { - this.userCount = userCount; - } - public String getTicker() { return ticker; } - public void setTicker(String ticker) { - this.ticker = ticker; - } - public String getFullName() { return fullName; } - public void setFullName(String fullName) { - this.fullName = fullName; - } - public String getLocation() { return location; } - public void setLocation(String location) { - this.location = location; - } - public String getCountry() { return country; } - public void setCountry(String country) { - this.country = country; - } - public int getOutstandingShares() { return outstandingShares; } - public void setOutstandingShares(int outstandingShares) { - this.outstandingShares = outstandingShares; - } - public float getChange() { return change; } - public void setChange(float change) { - this.change = change; - } - public float getLastTrade() { return lastTrade; } - public void setLastTrade(float lastTrade) { - this.lastTrade = lastTrade; - } - public float getClose() { return close; } - public void setClose(float close) { - this.close = close; - } - public String getSmPortrait() { return smPortrait; } - public void setSmPortrait(String smPortrait) { - this.smPortrait = smPortrait; - } - public String getLgPortrait() { return lgPortrait; } - public void setLgPortrait(String lgPortrait) { - this.lgPortrait = lgPortrait; - } + @Override + public String toString() { + return new StringBuffer().append("Lists [").append(ticker) + .append(",").append(fullName).append(",").append(country) + .append(",").append(location) + .append(",").append(outstandingShares) + .append("];").toString(); + } } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Meta.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Meta.java index 1d61ca0..a951718 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Meta.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Meta.java @@ -16,8 +16,7 @@ package org.agorava.empireavenue.model; /** - * - * @author Rajmahendra Hegde + * @author Rajmahendra Hegde * @since 0.7.0 */ public class Meta { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Notifications.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Notifications.java new file mode 100644 index 0000000..d1aeeae --- /dev/null +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Notifications.java @@ -0,0 +1,42 @@ +package org.agorava.empireavenue.model; + + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +public class Notifications { + + public Notifications() + { + + } + + private String type; + private String created; + private NotificationsInfo notificationsInfo; + + public String getType() { + return type; + } + + public String getCreated() { + return created; + } + + public NotificationsInfo getNotificationsInfo() { + return notificationsInfo; + } + + @Override + public String toString() { + + return new StringBuffer() + .append("Notifications [ ") + .append("Type : " + this.type) + .append(", created :" + this.created) + // .append("info :"+this.getNotificationsInfo().toString()+"") + .append("]") + .toString(); + } +} diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/NotificationsInfo.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/NotificationsInfo.java new file mode 100644 index 0000000..65eb241 --- /dev/null +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/NotificationsInfo.java @@ -0,0 +1,469 @@ +package org.agorava.empireavenue.model; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +public class NotificationsInfo { + + + private String fromTicker; + private String fromFullName; + private String toTicker; + private String toFullName; + private String message; + private String replyType; + private String shareholderThreadId; + private String shareholderMailSubject; + private Boolean shareholderMailIsowner; + private String topic; + private int communityId; + private int communityTopicId; + private String communityName; + private String missionTitle; + private int missionId; + private String messageType; + private int threadId; + private int headlineId; + private String communityNotificationType; + private String inviterFullName; + private String inviterTicker; + private String requestFullName; + private String requestTicker; + private String fullName; + private String stockInfo; + private double earnings; + private double dividends; + private double gains; + private double expenses; + private int sharesBought; + private int sharesBoughtUserCount; + private int sharesSold; + private int sharesSoldUserCount; + private int shares; + private double price; + private String buyerTicker; + private String buyerName; + private String sellerTicker; + private String sellerName; + private String mentionType; + private String post; + private String statusId; + private int communityThreadId; + private String communityTitle; + private String communityTopic; + private String subject; + + public String getFromTicker() { + return fromTicker; + } + + public void setFromTicker(String fromTicker) { + this.fromTicker = fromTicker; + } + + public String getFromFullName() { + return fromFullName; + } + + public void setFromFullName(String fromFullName) { + this.fromFullName = fromFullName; + } + + public String getToTicker() { + return toTicker; + } + + public void setToTicker(String toTicker) { + this.toTicker = toTicker; + } + + public String getToFullName() { + return toFullName; + } + + public void setToFullName(String toFullName) { + this.toFullName = toFullName; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getReplyType() { + return replyType; + } + + public void setReplyType(String replyType) { + this.replyType = replyType; + } + + public String getShareholderThreadId() { + return shareholderThreadId; + } + + public void setShareholderThreadId(String shareholderThreadId) { + this.shareholderThreadId = shareholderThreadId; + } + + public String getShareholderMailSubject() { + return shareholderMailSubject; + } + + public void setShareholderMailSubject(String shareholderMailSubject) { + this.shareholderMailSubject = shareholderMailSubject; + } + + public Boolean getShareholderMailIsowner() { + return shareholderMailIsowner; + } + + public void setShareholderMailIsowner(Boolean shareholderMailIsowner) { + this.shareholderMailIsowner = shareholderMailIsowner; + } + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public int getCommunityId() { + return communityId; + } + + public void setCommunityId(int communityId) { + this.communityId = communityId; + } + + public int getCommunityTopicId() { + return communityTopicId; + } + + public void setCommunityTopicId(int communityTopicId) { + this.communityTopicId = communityTopicId; + } + + public String getCommunityName() { + return communityName; + } + + public void setCommunityName(String communityName) { + this.communityName = communityName; + } + + public String getMissionTitle() { + return missionTitle; + } + + public void setMissionTitle(String missionTitle) { + this.missionTitle = missionTitle; + } + + public int getMissionId() { + return missionId; + } + + public void setMissionId(int missionId) { + this.missionId = missionId; + } + + public String getMessageType() { + return messageType; + } + + public void setMessageType(String messageType) { + this.messageType = messageType; + } + + public int getThreadId() { + return threadId; + } + + public void setThreadId(int threadId) { + this.threadId = threadId; + } + + public int getHeadlineId() { + return headlineId; + } + + public void setHeadlineId(int headlineId) { + this.headlineId = headlineId; + } + + public String getCommunityNotificationType() { + return communityNotificationType; + } + + public void setCommunityNotificationType(String communityNotificationType) { + this.communityNotificationType = communityNotificationType; + } + + public String getInviterFullName() { + return inviterFullName; + } + + public void setInviterFullName(String inviterFullName) { + this.inviterFullName = inviterFullName; + } + + public String getInviterTicker() { + return inviterTicker; + } + + public void setInviterTicker(String inviterTicker) { + this.inviterTicker = inviterTicker; + } + + public String getRequestFullName() { + return requestFullName; + } + + public void setRequestFullName(String requestFullName) { + this.requestFullName = requestFullName; + } + + public String getRequestTicker() { + return requestTicker; + } + + public void setRequestTicker(String requestTicker) { + this.requestTicker = requestTicker; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getStockInfo() { + return stockInfo; + } + + public void setStockInfo(String stockInfo) { + this.stockInfo = stockInfo; + } + + public double getEarnings() { + return earnings; + } + + public void setEarnings(double earnings) { + this.earnings = earnings; + } + + public double getDividends() { + return dividends; + } + + public void setDividends(double dividends) { + this.dividends = dividends; + } + + public double getGains() { + return gains; + } + + public void setGains(double gains) { + this.gains = gains; + } + + public double getExpenses() { + return expenses; + } + + public void setExpenses(double expenses) { + this.expenses = expenses; + } + + public int getSharesBought() { + return sharesBought; + } + + public void setSharesBought(int sharesBought) { + this.sharesBought = sharesBought; + } + + public int getSharesBoughtUserCount() { + return sharesBoughtUserCount; + } + + public void setSharesBoughtUserCount(int sharesBoughtUserCount) { + this.sharesBoughtUserCount = sharesBoughtUserCount; + } + + public int getSharesSold() { + return sharesSold; + } + + public void setSharesSold(int sharesSold) { + this.sharesSold = sharesSold; + } + + public int getSharesSoldUserCount() { + return sharesSoldUserCount; + } + + public void setSharesSoldUserCount(int sharesSoldUserCount) { + this.sharesSoldUserCount = sharesSoldUserCount; + } + + public int getShares() { + return shares; + } + + public void setShares(int shares) { + this.shares = shares; + } + + public double getPrice() { + return price; + } + + public void setPrice(double price) { + this.price = price; + } + + public String getBuyerTicker() { + return buyerTicker; + } + + public void setBuyerTicker(String buyerTicker) { + this.buyerTicker = buyerTicker; + } + + public String getBuyerName() { + return buyerName; + } + + public void setBuyerName(String buyerName) { + this.buyerName = buyerName; + } + + public String getSellerTicker() { + return sellerTicker; + } + + public void setSellerTicker(String sellerTicker) { + this.sellerTicker = sellerTicker; + } + + public String getSellerName() { + return sellerName; + } + + public void setSellerName(String sellerName) { + this.sellerName = sellerName; + } + + public String getMentionType() { + return mentionType; + } + + public void setMentionType(String mentionType) { + this.mentionType = mentionType; + } + + public String getPost() { + return post; + } + + public void setPost(String post) { + this.post = post; + } + + public String getStatusId() { + return statusId; + } + + public void setStatusId(String statusId) { + this.statusId = statusId; + } + + public int getCommunityThreadId() { + return communityThreadId; + } + + public void setCommunityThreadId(int communityThreadId) { + this.communityThreadId = communityThreadId; + } + + public String getCommunityTitle() { + return communityTitle; + } + + public void setCommunityTitle(String communityTitle) { + this.communityTitle = communityTitle; + } + + public String getCommunityTopic() { + return communityTopic; + } + + public void setCommunityTopic(String communityTopic) { + this.communityTopic = communityTopic; + } + + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + @Override + public String toString() { + + return new StringBuffer() + .append("info [ ") + .append("buyerName:") + .append(this.buyerName) + .append(",buyerTicker:") + .append(this.buyerTicker) + .append(",communityId:") + .append(this.communityId) + .append(",communityName:") + .append(this.communityName) + .append(",communityNotificationType:") + .append(this.communityNotificationType) + .append(",communityThreadId:") + .append(this.communityThreadId) + .append(",communityTitle:") + .append(this.communityTitle) + .append(",communityTopic:") + .append(this.communityTopic) + .append(",communityTopicId:") + .append(this.communityTopicId) + .append(",dividends:") + .append(this.dividends) + .append(",topic:") + .append(this.topic) + .append(",toTicker:") + .append(this.toTicker) + .append(",fromFullName:") + .append(this.fromFullName) + .append(",fullName:") + .append(this.fullName) + .append(",earnings:") + .append(this.earnings) + .append(",gains:") + .append(this.gains) + .append("]") + .toString(); + + + } + + +} diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Portfolio.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Portfolio.java index 231dfdd..3cfc65e 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Portfolio.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Portfolio.java @@ -1,24 +1,19 @@ package org.agorava.empireavenue.model; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ - public class Portfolio { - public Portfolio(String fullName,float lastTrade,float close,String ticker) - { - - this.fullName=fullName; - this.lastTrade=lastTrade; - this.close=close; - this.ticker=ticker; + public Portfolio(String fullName, float lastTrade, float close, String ticker) { + this.fullName = fullName; + this.lastTrade = lastTrade; + this.close = close; + this.ticker = ticker; } private String fullName; @@ -58,238 +53,122 @@ public Portfolio(String fullName,float lastTrade,float close,String ticker) private int maxShares; - public float getFlickrScore() { - return flickrScore; - } - - public void setFlickrScore(float flickrScore) { - this.flickrScore = flickrScore; - } - public String getFullName() { return fullName; } - public void setFullName(String fullName) { - this.fullName = fullName; - } - public float getLastTrade() { return lastTrade; } - public void setLastTrade(float lastTrade) { - this.lastTrade = lastTrade; - } - public float getClose() { return close; } - public void setClose(float close) { - this.close = close; - } - public String getTicker() { return ticker; } - public void setTicker(String ticker) { - this.ticker = ticker; - } - public float getEavScore() { return eavScore; } - public void setEavScore(float eavScore) { - this.eavScore = eavScore; + public float getFlickrScore() { + return flickrScore; } public float getTwitterScore() { return twitterScore; } - public void setTwitterScore(float twitterScore) { - this.twitterScore = twitterScore; - } - public float getFacebookScore() { return facebookScore; } - public void setFacebookScore(float facebookScore) { - this.facebookScore = facebookScore; - } - public float getFacebookpageScore() { return facebookpageScore; } - public void setFacebookpageScore(float facebookpageScore) { - this.facebookpageScore = facebookpageScore; - } - public float getYoutubeScore() { return youtubeScore; } - public void setYoutubeScore(float youtubeScore) { - this.youtubeScore = youtubeScore; - } - public float getLinkedinScore() { return linkedinScore; } - public void setLinkedinScore(float linkedinScore) { - this.linkedinScore = linkedinScore; - } - public float getFoursquareScore() { return foursquareScore; } - public void setFoursquareScore(float foursquareScore) { - this.foursquareScore = foursquareScore; - } - public float getInstagramScore() { return instagramScore; } - public void setInstagramScore(float instagramScore) { - this.instagramScore = instagramScore; - } - public float getWordpressScore() { return wordpressScore; } - public void setWordpressScore(float wordpressScore) { - this.wordpressScore = wordpressScore; - } - public float getGplusScore() { return gplusScore; } - public void setGplusScore(float gplusScore) { - this.gplusScore = gplusScore; - } - public String getSmPortrait() { return smPortrait; } - public void setSmPortrait(String smPortrait) { - this.smPortrait = smPortrait; - } - public String getLgPortrait() { return lgPortrait; } - public void setLgPortrait(String lgPortrait) { - this.lgPortrait = lgPortrait; - } - public String getLocation() { return location; } - public void setLocation(String location) { - this.location = location; - } - public String getCountry() { return country; } - public void setCountry(String country) { - this.country = country; - } - public float getYesterdayLowest() { return yesterdayLowest; } - public void setYesterdayLowest(float yesterdayLowest) { - this.yesterdayLowest = yesterdayLowest; - } - public float getYesterdayHighest() { return yesterdayHighest; } - public void setYesterdayHighest(float yesterdayHighest) { - this.yesterdayHighest = yesterdayHighest; - } - public int getOutstandingShares() { return outstandingShares; } - public void setOutstandingShares(int outstandingShares) { - this.outstandingShares = outstandingShares; - } - public float getPortfolioValue() { return portfolioValue; } - public void setPortfolioValue(float portfolioValue) { - this.portfolioValue = portfolioValue; - } - public float getYesterdayEarnings() { return yesterdayEarnings; } - public void setYesterdayEarnings(float yesterdayEarnings) { - this.yesterdayEarnings = yesterdayEarnings; - } - public int getShares() { return shares; } - public void setShares(int shares) { - this.shares = shares; - } - public int getLastBuyShares() { return lastBuyShares; } - public void setLastBuyShares(int lastBuyShares) { - this.lastBuyShares = lastBuyShares; - } - public String getLastBuy() { return lastBuy; } - public void setLastBuy(String lastBuy) { - this.lastBuy = lastBuy; - } - public int getYourSharesHeld() { return yourSharesHeld; } - public void setYourSharesHeld(int yourSharesHeld) { - this.yourSharesHeld = yourSharesHeld; - } - public int getMaxShares() { return maxShares; } - public void setMaxShares(int maxShares) { - this.maxShares = maxShares; - } - @Override public String toString() { @@ -298,7 +177,8 @@ public String toString() { .append(", Ticker :").append(ticker) .append(", Shares :").append(shares) .append(",Close :").append(close) - .append("];").toString(); } + .append("];").toString(); + } } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/ProfileInfo.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/ProfileInfo.java index d610ca7..100f180 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/ProfileInfo.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/ProfileInfo.java @@ -18,8 +18,7 @@ import org.agorava.spi.UserProfile; /** - * - * @author Rajmahendra Hegde + * @author Rajmahendra Hegde * @since 0.7.0 */ @SuppressWarnings("serial") @@ -77,7 +76,7 @@ public class ProfileInfo extends UserProfile { private float gplusScore; public ProfileInfo(String id, String ticker, String firstName, String lastName, - String fullName, String joined, String country, String location) { + String fullName, String joined, String country, String location) { super(id); this.ticker = ticker; this.firstName = firstName; @@ -284,6 +283,12 @@ public float getGplusScore() { return gplusScore; } + @Override + public String getProfileImageUrl() { + + return smPortrait; + } + @Override public String toString() { @@ -301,10 +306,5 @@ public String toString() { .toString(); } - @Override - public String getProfileImageUrl() { - - return smPortrait; - } -} +} \ No newline at end of file diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Search.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Search.java index 5a51041..9d00536 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Search.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Search.java @@ -17,7 +17,7 @@ package org.agorava.empireavenue.model; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ public class Search { @@ -26,7 +26,6 @@ protected Search() { } - private String ticker; private String fullName; private float lastTrade; @@ -53,200 +52,102 @@ protected Search() { private float gplusScore; private float amount; - public String getTicker() { return ticker; } - public void setTicker(String ticker) { - this.ticker = ticker; - } - public String getFullName() { return fullName; } - public void setFullName(String fullName) { - this.fullName = fullName; - } - public float getLastTrade() { return lastTrade; } - public void setLastTrade(float lastTrade) { - this.lastTrade = lastTrade; - } - public float getClose() { return close; } - public void setClose(float close) { - this.close = close; - } - public String getSmPortrait() { return smPortrait; } - public void setSmPortrait(String smPortrait) { - this.smPortrait = smPortrait; - } - public String getLgPortrait() { return lgPortrait; } - public void setLgPortrait(String lgPortrait) { - this.lgPortrait = lgPortrait; - } - public int getOutstandingShares() { return outstandingShares; } - public void setOutstandingShares(int outstandingShares) { - this.outstandingShares = outstandingShares; - } - public String getCountry() { return country; } - public void setCountry(String country) { - this.country = country; - } - public String getLocation() { return location; } - public void setLocation(String location) { - this.location = location; - } - public String getCreated() { return created; } - public void setCreated(String created) { - this.created = created; - } - public int getMaxShares() { return maxShares; } - public void setMaxShares(int maxShares) { - this.maxShares = maxShares; - } - public String getTradingStatus() { return tradingStatus; } - public void setTradingStatus(String tradingStatus) { - this.tradingStatus = tradingStatus; - } - - public float getEavScore() { return eavScore; } - public void setEavScore(float eavScore) { - this.eavScore = eavScore; - } - public float getFlickrScore() { return flickrScore; } - public void setFlickrScore(float flickrScore) { - this.flickrScore = flickrScore; - } - public float getTwitterScore() { return twitterScore; } - public void setTwitterScore(float twitterScore) { - this.twitterScore = twitterScore; - } - public float getFacebookScore() { return facebookScore; } - public void setFacebookScore(float facebookScore) { - this.facebookScore = facebookScore; - } - public float getFacebookpageScore() { return facebookpageScore; } - public void setFacebookpageScore(float facebookpageScore) { - this.facebookpageScore = facebookpageScore; - } - public float getYoutubeScore() { return youtubeScore; } - public void setYoutubeScore(float youtubeScore) { - this.youtubeScore = youtubeScore; - } - public float getLinkedinScore() { return linkedinScore; } - public void setLinkedinScore(float linkedinScore) { - this.linkedinScore = linkedinScore; - } - public float getFoursquareScore() { return foursquareScore; } - public void setFoursquareScore(float foursquareScore) { - this.foursquareScore = foursquareScore; - } - public float getInstagramScore() { return instagramScore; } - public void setInstagramScore(float instagramScore) { - this.instagramScore = instagramScore; - } - public float getWordpressScore() { return wordpressScore; } - public void setWordpressScore(float wordpressScore) { - this.wordpressScore = wordpressScore; - } - public float getGplusScore() { return gplusScore; } - public void setGplusScore(float gplusScore) { - this.gplusScore = gplusScore; - } - public float getAmount() { return amount; } - public void setAmount(float amount) { - this.amount = amount; - } - @Override public String toString() { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Shares.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Shares.java index 4de7601..d7b692c 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Shares.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Shares.java @@ -17,7 +17,7 @@ package org.agorava.empireavenue.model; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ public class Shares { @@ -30,65 +30,36 @@ public class Shares { private float totalEarned; - - public Shares() { } - - public int getSharesOwned() { - return sharesOwned; - } - - public void setSharesOwned(int sharesOwned) { - this.sharesOwned = sharesOwned; + public float getCommission() { + return commission; } public boolean isSuccess() { return success; } - public void setSuccess(boolean success) { - this.success = success; + public int getSharesOwned() { + return sharesOwned; } public float getBankBalance() { return bankBalance; } - public void setBankBalance(float bankBalance) { - this.bankBalance = bankBalance; - } - public float getTotalCharged() { return totalCharged; } - public void setTotalCharged(float totalCharged) { - this.totalCharged = totalCharged; - } - - - public float getCommission() { - return commission; - } - - public void setCommission(float commission) { - this.commission = commission; - } - public float getTotalEarned() { return totalEarned; } - public void setTotalEarned(float totalEarned) { - this.totalEarned = totalEarned; - } - - @Override public String toString() { - return new StringBuffer().append("Shares [ commission :") .append(commission).append("%").toString(); + return new StringBuffer().append("Shares [ commission :").append(commission).append("%").toString(); } } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Status.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Status.java index d3d298d..9eb604d 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Status.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/model/Status.java @@ -16,10 +16,9 @@ package org.agorava.empireavenue.model; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class Status { private final String status; diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/BankBalanceResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/BankBalanceResponse.java index 2efc14a..745547e 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/BankBalanceResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/BankBalanceResponse.java @@ -18,14 +18,14 @@ import org.agorava.empireavenue.model.BankBalance; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class BankBalanceResponse extends Response { - public BankBalanceResponse() {} - - public BankBalance getBankBalance(){ + public BankBalanceResponse() { + } + + public BankBalance getBankBalance() { return retrieveData(); } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CommunityResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CommunityResponse.java index 499dee8..9cb666c 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CommunityResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CommunityResponse.java @@ -17,24 +17,25 @@ package org.agorava.empireavenue.response; +import org.agorava.empireavenue.model.Community; + import java.util.List; -import org.agorava.empireavenue.model.Community; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class CommunityResponse extends Response { - - public CommunityResponse() {} - - public Community getCommunity(){ + + public CommunityResponse() { + } + + public Community getCommunity() { return retrieveData(); } - - public List getAllCommunity(){ + + public List getAllCommunity() { return retrieveAllData(); } - + } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CountResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CountResponse.java index edfb7ee..d762147 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CountResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/CountResponse.java @@ -15,15 +15,14 @@ */ package org.agorava.empireavenue.response; -import java.util.List; - import org.agorava.empireavenue.model.Count; +import java.util.List; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class CountResponse extends Response { public CountResponse() { } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/HistoryResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/HistoryResponse.java index d659951..6bc056f 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/HistoryResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/HistoryResponse.java @@ -15,17 +15,16 @@ */ package org.agorava.empireavenue.response; -import java.util.List; import org.agorava.empireavenue.model.History; +import java.util.List; + /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public class HistoryResponse extends Response { - public HistoryResponse() { + public HistoryResponse() { } public History getHistory() { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/LeadersResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/LeadersResponse.java index f4d86e8..d677074 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/LeadersResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/LeadersResponse.java @@ -15,14 +15,13 @@ */ package org.agorava.empireavenue.response; -import java.util.List; import org.agorava.empireavenue.model.Leaders; +import java.util.List; + /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public class LeadersResponse extends Response { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ListsResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ListsResponse.java index 57dc3a3..6cae304 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ListsResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ListsResponse.java @@ -5,27 +5,26 @@ import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ -public class ListsResponse extends Response{ +public class ListsResponse extends Response { -public ListsResponse() - { + public ListsResponse() { - } + } -public Lists getListInfo() { + public Lists getListInfo() { return retrieveData(); - } + } -public List getAllListInfo() { + public List getAllListInfo() { return retrieveAllData(); - } + } -@Override -public String toString() { + @Override + public String toString() { return super.toString(); - } + } - } +} diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/NotificationsResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/NotificationsResponse.java new file mode 100644 index 0000000..56905bd --- /dev/null +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/NotificationsResponse.java @@ -0,0 +1,23 @@ +package org.agorava.empireavenue.response; + +import org.agorava.empireavenue.model.Notifications; + +import java.util.List; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +public class NotificationsResponse extends Response { + public NotificationsResponse() { + } + + public List getAllNotification() { + return retrieveAllData(); + } + + @Override + public String toString() { + return super.toString(); + } +} \ No newline at end of file diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/PortfolioResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/PortfolioResponse.java index b3ca903..03d0d6f 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/PortfolioResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/PortfolioResponse.java @@ -5,13 +5,12 @@ import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ -public class PortfolioResponse extends Response{ +public class PortfolioResponse extends Response { - public PortfolioResponse() - { + public PortfolioResponse() { } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ProfileInfoResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ProfileInfoResponse.java index 13a47e8..7b4859c 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ProfileInfoResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/ProfileInfoResponse.java @@ -15,14 +15,14 @@ */ package org.agorava.empireavenue.response; +import org.agorava.empireavenue.model.ProfileInfo; + import java.util.List; -import org.agorava.empireavenue.model.ProfileInfo; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class ProfileInfoResponse extends Response { public ProfileInfoResponse() { @@ -31,7 +31,7 @@ public ProfileInfoResponse() { public ProfileInfo getProfileInfo() { return retrieveData(); } - + public List getAllProfileInfo() { return retrieveAllData(); } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/Response.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/Response.java index e95ac7f..db05f67 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/Response.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/Response.java @@ -15,24 +15,28 @@ */ package org.agorava.empireavenue.response; -import java.util.List; - import org.agorava.empireavenue.EmpireAvenueException; import org.agorava.empireavenue.model.Meta; +import java.util.List; + /** * The Class Response. * - * @author Rajmahendra Hegde * @param the generic type + * @author Rajmahendra Hegde * @since 0.7.0 */ public abstract class Response { - - /** The meta. */ + + /** + * The meta. + */ private Meta meta; - - /** The data. */ + + /** + * The data. + */ private List data; /** @@ -89,7 +93,7 @@ protected T retrieveData() { return data.get(0); } - + /** * Retrieve all data. * diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SearchResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SearchResponse.java index d853d26..375ad5a 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SearchResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SearchResponse.java @@ -21,10 +21,10 @@ import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ -public class SearchResponse extends Response { +public class SearchResponse extends Response { public SearchResponse() { } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SharesResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SharesResponse.java index e8552c2..6a37156 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SharesResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/SharesResponse.java @@ -19,15 +19,15 @@ import org.agorava.empireavenue.model.Shares; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ -public class SharesResponse extends Response{ +public class SharesResponse extends Response { public SharesResponse() { } - public Shares getCommission(){ + public Shares getCommission() { return retrieveData(); } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/StatusResponse.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/StatusResponse.java index fc3659f..770ff7d 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/StatusResponse.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/response/StatusResponse.java @@ -16,11 +16,11 @@ package org.agorava.empireavenue.response; import org.agorava.empireavenue.model.Status; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class StatusResponse extends Response { public StatusResponse() { diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/CommunityService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/CommunityService.java index 8764173..55f9b86 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/CommunityService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/CommunityService.java @@ -20,21 +20,20 @@ /** * Operations on Portfolio /Portfolio - * - * + *

+ *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/
* Rate Limit: User
* Authentication: Required

- * + *

* API Calls
* community/info
* community/personal/list
* community/recent/list
* - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public interface CommunityService { @@ -47,16 +46,15 @@ public interface CommunityService { /** * Returns Information about a community
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/community/info
*
- * + *

* Rate Limit: User
Authentication: Required * * @param communityId The unique community id * @return CommunityResponse Returns community Information for given Community id . * @see org.agorava.empireavenue.service.CommunityService#getCommunitiesInfo(java.lang.String...) - * */ @@ -65,77 +63,62 @@ public interface CommunityService { /** * Returns Information about a community
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/community/info
*
- * + *

* Rate Limit: User
Authentication: Required + * * @param communityId comma delimited string of integer community ids * @return CommunityResponse Returns community Information for given list of Community id . * @see org.agorava.empireavenue.service.CommunityService#getCommunitiesInfo(int) - * */ CommunityResponse getCommunitiesInfo(String... communityId); - - /** * Returns a full list of Personal Communities
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/community/info
*
- * + *

* Rate Limit: User
Authentication: Required + * * @return CommunityResponse Returns a full list of Personal Communities * @see org.agorava.empireavenue.service.CommunityService#getListOfPersonalCommunities(int) - * */ CommunityResponse getListOfPersonalCommunities(); - - /** * Returns a full list of Personal Communities
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/community/info
*
- * + *

* Rate Limit: User
Authentication: Required + * * @param pageLimit Specific page number of results (e.g. page=2 will return page 2 of the result set) * @return CommunityResponse Returns a full list of Personal Communities with the * @see org.agorava.empireavenue.service.CommunityService#getListOfPersonalCommunities() - * */ CommunityResponse getListOfPersonalCommunities(int pageLimit); - /** * Returns the latest communities that were created
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/community/info
*
- * + *

* Rate Limit: User
Authentication: Required - * @return CommunityResponse Returns the last 50 communities that were created * + * @return CommunityResponse Returns the last 50 communities that were created */ CommunityResponse getLatestCommunities(); - - - - - - - - - - } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/HistoryService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/HistoryService.java index ff6ae0c..342765d 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/HistoryService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/HistoryService.java @@ -20,13 +20,13 @@ /** * Operations on Portfolio /Portfolio - * - * + *

+ *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/
* Rate Limit: User
* Authentication: Required

- * + *

* API Calls
* history/dividends
* history/dividends/received
@@ -37,13 +37,11 @@ * history/shares/bought
* history/shares/sold
* - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public interface HistoryService { - + static final String HISTORY_DIVIDENDS = "history/dividends"; static final String HISTORY_DIVIDENDS_RECEIVED = "history/dividends/received"; static final String HISTORY_NETWORKSCORE = "history/networkscore"; @@ -56,357 +54,311 @@ public interface HistoryService { /** * Returns the Full Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/dividends
*
- * + *

* Rate Limit: User
Authentication: Required - * + * * @return HistoryResponse Returns the Full Portfolio information for a specific user. - * - * */ HistoryResponse getDividendsHistory(); - + /** * Returns the Full Portfolio information for a specific user and the user specified
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/dividends/received
*
- * + *

* Rate Limit: User
Authentication: Required - * + * * @return HistoryResponse Returns the Full Portfolio information for a specific user and the user specified. - * * @see org.agorava.empireavenue.service.HistoryService#getReceivedDividendsHistory(String) - * - **/ - + */ + HistoryResponse getReceivedDividendsHistory(); - + /** * Returns the Full Portfolio information for a specific user and the user specified
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/dividends/received
*
- * + *

* Rate Limit: User
Authentication: Required - * + * * @param ticker The Ticker symbol of whose history is queried * @return HistoryResponse Returns the Full Portfolio information for a specific user and the user specified. * @see org.agorava.empireavenue.service.HistoryService#getReceivedDividendsHistory() - * - **/ + */ HistoryResponse getReceivedDividendsHistory(String ticker); - + /** * Returns the network score history recorded at each market close for the user.By default it will return 30 days of network score history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/networkscore
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. - * + * + * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String) * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(int) - * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String,int) - * - **/ - + * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String, int) + */ + HistoryResponse getNetworkscoreHistory(); - + /** * Returns the network score history recorded at each market close for the requested user.By default it will return 30 days of network score history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/networkscore
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. - * + * + * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory() * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(int) - * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String,int) - * - **/ + * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String, int) + */ HistoryResponse getNetworkscoreHistory(String ticker); - + /** * Returns the network score history recorded at each market close for the requested user.By default it will return 30 days of network score history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/networkscore
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param days The number of days for which the history is queried - * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. - * + * + * @param days The number of days for which the history is queried + * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory() * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String) - * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String,int) - * - **/ + * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String, int) + */ HistoryResponse getNetworkscoreHistory(int days); + /** * Returns the network score history recorded at each market close for the requested user.By default it will return 30 days of network score history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/networkscore
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param days The number of days for which the history is queried - * @param ticker The Ticker symbol whose history is queried - * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. - * + * + * @param days The number of days for which the history is queried + * @param ticker The Ticker symbol whose history is queried + * @return HistoryResponse Returns the network score history recorded at each market close for the requested user. * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory() * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(String) * @see org.agorava.empireavenue.service.HistoryService#getNetworkscoreHistory(int) - * - **/ + */ HistoryResponse getNetworkscoreHistory(String ticker, int days); - - + /** * Returns the shareprice history for the the requested user. By default it will return 24 hours of share price history. It can bring up to 7 days (168 hours) of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @return HistoryResponse Returns the shareprice history for the the requested user. - * + * + * @return HistoryResponse Returns the shareprice history for the the requested user. * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(int) * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String) - * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String,int) - * - **/ - - - + * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String, int) + */ + + HistoryResponse getSharepriceHistory(); - - + + /** * Returns the shareprice history for the the requested user. By default it will return 24 hours of share price history. It can bring up to 7 days (168 hours) of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param ticker The Ticker symbol whose history is queried - * @return HistoryResponse Returns the shareprice history for the the requested user. - * + * + * @param ticker The Ticker symbol whose history is queried + * @return HistoryResponse Returns the shareprice history for the the requested user. * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory() * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(int) - * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String,int) - * - **/ + * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String, int) + */ HistoryResponse getSharepriceHistory(String ticker); /** * Returns the shareprice history for the the requested user. By default it will return 24 hours of share price history. It can bring up to 7 days (168 hours) of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param hours The number of hours for which the history is queried - * @return HistoryResponse Returns the shareprice history for the the requested user. - * + * + * @param hours The number of hours for which the history is queried + * @return HistoryResponse Returns the shareprice history for the the requested user. * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory() * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String) - * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String,int) - * - **/ - - + * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String, int) + */ + + HistoryResponse getSharepriceHistory(int hours); + /** * Returns the shareprice history for the the requested user. By default it will return 24 hours of share price history. It can bring up to 7 days (168 hours) of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param ticker The Ticker symbol whose history is queried - * @param hours The number of hours for which the history is queried - * @return HistoryResponse Returns the shareprice history for the the requested user. - * + * + * @param ticker The Ticker symbol whose history is queried + * @param hours The number of hours for which the history is queried + * @return HistoryResponse Returns the shareprice history for the the requested user. * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory() * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(String) * @see org.agorava.empireavenue.service.HistoryService#getSharepriceHistory(int) - * - **/ - + */ + HistoryResponse getSharepriceHistory(String ticker, int hours); /** * Returns the shareprice history recorded at each market close for the the requested user. By default it will return 30 days of closing price history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice/close
*
- * + *

* Rate Limit: User
Authentication: Required - * + * * @return HistoryResponse Returns the shareprice history recorded at each market close for the the requested user. - * * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String) * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(int) - * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String,int) - * - **/ - - + * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String, int) + */ + + HistoryResponse getSharepriceCloseHistory(); + /** * Returns the shareprice history recorded at each market close for the the requested user. By default it will return 30 days of closing price history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice/close
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param ticker The Ticker symbol whose history is queried + * + * @param ticker The Ticker symbol whose history is queried * @return HistoryResponse Returns the shareprice history recorded at each market close for the the requested user. - * * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory() * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(int) - * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String,int) - * - **/ + * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String, int) + */ HistoryResponse getSharepriceCloseHistory(String ticker); - + /** * Returns the shareprice history recorded at each market close for the the requested user. By default it will return 30 days of closing price history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice/close
*
- * + *

* Rate Limit: User
Authentication: Required - * - * - * @param days The number of days for which the history is queried + * + * @param days The number of days for which the history is queried * @return HistoryResponse Returns the shareprice history recorded at each market close for the the requested user. - * * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory() * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String) - * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String,int) - * - **/ - - + * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String, int) + */ + HistoryResponse getSharepriceCloseHistory(int days); /** * Returns the shareprice history recorded at each market close for the the requested user. By default it will return 30 days of closing price history. It can bring up to 90 days of history.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice/close
*
- * + *

* Rate Limit: User
Authentication: Required - * @param ticker The Ticker symbol whose history is queried - * @param days The number of days for which the history is queried + * + * @param ticker The Ticker symbol whose history is queried + * @param days The number of days for which the history is queried * @return HistoryResponse Returns the shareprice history recorded at each market close for the the requested user. - * * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory() * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(String) * @see org.agorava.empireavenue.service.HistoryService#getSharepriceCloseHistory(int) - * - **/ + */ HistoryResponse getSharepriceCloseHistory(String ticker, int days); - + /** * Returns the share purchase history for the the authenticated user. This does not bring back trades. Max: 50 results.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shareprice/close
*
- * + *

* Rate Limit: User
Authentication: Required - * + * * @return HistoryResponse Returns the share purchase history for the the authenticated user. - * - - * - **/ - + */ + HistoryResponse getSharesHistory(); /** * Returns the share purchase history for the the authenticated user and the requested user, specifically "buys". This does not bring back trades. Max: 50 results. Authenticated user must own requested user.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shares/bought
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param ticker The Ticker symbol whose history is queried - * @return HistoryResponse Returns the share purchase history for the the authenticated user and the requested user, specifically "buys". * - * - **/ + * @param ticker The Ticker symbol whose history is queried + * @return HistoryResponse Returns the share purchase history for the the authenticated user and the requested user, specifically "buys". + */ HistoryResponse getSharesBoughtHistory(String ticker); /** * Returns the share purchase history for the the authenticated user and the requested user, specifically "sells". This does not bring back trades. Max: 50 results. Authenticated user must own requested user.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/history/shares/sold
*
- * + *

* Rate Limit: User
Authentication: Required - * - * @param ticker The Ticker symbol whose history is queried - * @return HistoryResponse Returns the share purchase history for the the authenticated user and the requested user, specifically "sells". * - * - **/ + * @param ticker The Ticker symbol whose history is queried + * @return HistoryResponse Returns the share purchase history for the the authenticated user and the requested user, specifically "sells". + */ HistoryResponse getSharesSoldHistory(String ticker); - - - - - - - - - - } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/LeadersService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/LeadersService.java index 5621a76..3edcbee 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/LeadersService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/LeadersService.java @@ -19,22 +19,19 @@ import org.agorava.empireavenue.response.LeadersResponse; /** - * * Operations on Leaders Board Information
- * - * - * + *

+ *

+ *

* API Calls
* leaders/change
* leaders/dividends
* leaders/recent
* leaders/shareprice
* leaders/wealth
- * - * - * @author Karthikeyan Annamalai + * + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public interface LeadersService { @@ -61,60 +58,54 @@ public interface LeadersService { /** * Returns all the leader boards by yesterday's change in share price value
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/change
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns all the leaderboards by yesterday's change in share price value - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands(String) - * */ LeadersResponse getAllLeadersChange(); /** * Returns People leaderboards by yesterday's change in share price value
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/change/people
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns people leaderboards by yesterday's change in share price value - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands(String) - * */ LeadersResponse getAllLeadersChangePeople(); /** * Returns brands leaderboards by yesterday's change in share price value
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/change/brands
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns brands leaderboards by yesterday's change in share price value - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands(String) - * */ LeadersResponse getAllLeadersChangeBrands(); @@ -122,22 +113,19 @@ public interface LeadersService { /** * Returns all the leaderboards by yesterday's change in share price value
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/change
*
- * + *

* Rate Limit: User Authentication: Required - * - * + * * @param order - in which the result should be returned [ either "desc" (default) or "asc ] * @return LeadersResponse Returns all the leaderboards by yesterday's change in share price value - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands(String) - * */ LeadersResponse getAllLeadersChange(String order); @@ -145,21 +133,19 @@ public interface LeadersService { /** * Returns People leaderboards by yesterday's change in share price value
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/change/people
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @param order - in which the result should be returned [ either "desc" (default) or "asc ] * @return LeadersResponse Returns people leaderboards by yesterday's change in share price value - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands(String) - * */ LeadersResponse getAllLeadersChangePeople(String order); @@ -167,55 +153,49 @@ public interface LeadersService { /** * Returns brands leaderboards by yesterday's change in share price value
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/change/brands
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @param order - in which the result should be returned [ either "desc" (default) or "asc ] * @return LeadersResponse Returns brands leaderboards by yesterday's change in share price value - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangeBrands() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChange(String) * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersChangePeople(String) - * */ LeadersResponse getAllLeadersChangeBrands(String order); /** * Returns the leaderboards by Weekly Dividends Paid out to Shareholders
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the leaderboards by Weekly Dividends Paid out to Shareholders - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersDividendsPeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersDividendsBrands() - * */ LeadersResponse getAllLeadersDividends(); /** * Returns the people leaderboards by Weekly Dividends Paid out to Shareholders
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/people
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return Returnsthe people leaderboards by Weekly Dividends Paid out to Shareholders - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersDividends() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersDividendsBrands() - * */ LeadersResponse getAllLeadersDividendsPeople(); @@ -223,17 +203,15 @@ public interface LeadersService { /** * Returns the brands leaderboards by Weekly Dividends Paid out to Shareholders
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/brands
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the brands leaderboards by Weekly Dividends Paid out to Shareholders - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersDividends() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersDividendsPeople() - * */ LeadersResponse getAllLeadersDividendsBrands(); @@ -241,17 +219,15 @@ public interface LeadersService { /** * Returns the leaderboards by recent signups
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/recent
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the leaderboards by recent signups - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersRecentPeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersRecentBrands() - * */ LeadersResponse getAllLeadersRecent(); @@ -259,17 +235,15 @@ public interface LeadersService { /** * Returns the people leaderboards by recent signups
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/recent/people
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the people leaderboards by recent signups - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersRecent() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersRecentBrands() - * */ LeadersResponse getAllLeadersRecentPeople(); @@ -277,17 +251,15 @@ public interface LeadersService { /** * Returns the brands leaderboards by recent signups
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/recent/brands
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the brands leaderboards by recent signups - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersRecent() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersRecentPeople() - * */ LeadersResponse getAllLeadersRecentBrands(); @@ -295,17 +267,15 @@ public interface LeadersService { /** * Returns the leaderboards by share price
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/leaders/shareprice
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the leaderboards by share price - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersSharepricePeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersSharepriceBrands() - * */ LeadersResponse getAllLeadersShareprice(); @@ -313,34 +283,30 @@ public interface LeadersService { /** * Returns the people leaderboards by share price
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/leaders/shareprice/people
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the people leaderboards by share price - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersShareprice() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersSharepriceBrands() - * */ LeadersResponse getAllLeadersSharepricePeople(); /** * Returns the brands leaderboards by share price
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/leaders/shareprice/brands
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the brands leaderboards by share price - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersShareprice() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersSharepricePeople() - * */ LeadersResponse getAllLeadersSharepriceBrands(); @@ -348,34 +314,30 @@ public interface LeadersService { /** * Returns the leaderboards by wealth
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/leaders/wealth
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the leaderboards by wealth - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersWealthPeople() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersWealthBrands() - * */ LeadersResponse getAllLeadersWealth(); /** * Returns the people leaderboards by wealth
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/leaders/wealth/people
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the people leaderboards by wealth - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersWealth() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersWealthBrands() - * */ LeadersResponse getAllLeadersWealthPeople(); @@ -383,17 +345,15 @@ public interface LeadersService { /** * Returns the brands leaderboards by wealth
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/leaders/dividends/leaders/wealth/brands
*
- * + *

* Rate Limit: User Authentication: Required - * + * * @return LeadersResponse Returns the brands leaderboards by wealth - * * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersWealth() * @see org.agorava.empireavenue.service.LeadersService#getAllLeadersWealthPeople() - * */ LeadersResponse getAllLeadersWealthBrands(); diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ListsService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ListsService.java index 9f81658..34885f0 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ListsService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ListsService.java @@ -20,28 +20,27 @@ /** * Operations on Lists /lists - * - * + *

+ *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/
* Rate Limit: User
* Authentication: Required

- * + *

* API Calls
- * + *

* GET * lists/get
* lists/members
* lists/listedby
* lists/recommendedby
- * + *

* POST * lists/add
* lists/remove
* * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @@ -51,7 +50,6 @@ public interface ListsService { static final String LISTS_MEMBERS = "lists/members"; static final String LISTS_LISTEDBY = "lists/listedby"; static final String LISTS_RECOMMENDEDBY = "lists/recommendedby"; - static final String LISTS_ADD = "lists/add"; static final String LISTS_REMOVE = "lists/remove"; @@ -59,15 +57,14 @@ public interface ListsService { /** * Returns the lists and information about the lists that a person has. Note, Private lists are not returned unless you are fetching for the authenticated user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/get
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the lists and information about the lists that a person has. * @see org.agorava.empireavenue.service.ListsService#getListInfo(java.lang.String) - * */ ListsResponse getListInfo(); @@ -75,35 +72,32 @@ public interface ListsService { /** * Returns the lists and information about the lists that a person has. Note, Private lists are not returned unless you are fetching for the authenticated user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/get
*
- * + *

* Rate Limit: User
Authentication: Required * * @param ticker The ticker of the person whose list information is being queried. * @return ListsResponse Returns the lists and information about the lists that a person has. * @see org.agorava.empireavenue.service.ListsService#getListInfo() - * */ ListsResponse getListInfo(String ticker); - /** * Returns the members from a list. Will not return members of private lists except for the authenticated user.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/members
*
- * + *

* Rate Limit: User
Authentication: Required * * @param listTypeId List type - "friends","watch","recommend_buy","private","favourite" * @return ListsResponse Returns the members from a list. Will not return members of private lists except for the authenticated user. - * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String,int) - * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String,java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String, int) + * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String, java.lang.String, int) */ ListsResponse getListMembersInfo(String listTypeId); @@ -111,56 +105,52 @@ public interface ListsService { /** * Returns the members from a list. Will not return members of private lists except for the authenticated user.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/members
*
- * + *

* Rate Limit: User
Authentication: Required * * @param listTypeId List type - "friends","watch","recommend_buy","private","favourite" - * @param page number of result pages requested + * @param page number of result pages requested * @return ListsResponse Returns the members from a list. Will not return members of private lists except for the authenticated user. * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String) - * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String,java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String, java.lang.String, int) */ - ListsResponse getListMembersInfo(String listTypeId,int page); - + ListsResponse getListMembersInfo(String listTypeId, int page); /** * Returns the members from a list. Will not return members of private lists except for the authenticated user.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/members
*
- * + *

* Rate Limit: User
Authentication: Required * * @param listTypeId List type - "friends","watch","recommend_buy","private","favourite" - * @param ticker The ticker of the person whose list information is being queried - * @param page number of result pages requested + * @param ticker The ticker of the person whose list information is being queried + * @param page number of result pages requested * @return ListsResponse Returns the members from a list. Will not return members of private lists except for the authenticated user. - * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String,int) + * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String, int) * @see org.agorava.empireavenue.service.ListsService#getListMembersInfo(java.lang.String) - * */ - ListsResponse getListMembersInfo(String listTypeId,String ticker,int page); + ListsResponse getListMembersInfo(String listTypeId, String ticker, int page); /** * Returns the users on the site who have listed TICKER. Does not return those who have placed a TICKER on a private list. *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/listedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER. * @see org.agorava.empireavenue.service.ListsService#getListedUsers(int) * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String) - * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String, int) */ ListsResponse getListedUsers(); @@ -168,34 +158,32 @@ public interface ListsService { /** * Returns the users on the site who have listed TICKER. Does not return those who have placed a TICKER on a private list. *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/listedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER. * @see org.agorava.empireavenue.service.ListsService#getListedUsers() * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String) - * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String, int) */ ListsResponse getListedUsers(int page); /** * Returns the users on the site who have listed TICKER. Does not return those who have placed a TICKER on a private list. *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/listedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER. * @see org.agorava.empireavenue.service.ListsService#getListedUsers() * @see org.agorava.empireavenue.service.ListsService#getListedUsers(int) - * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String, int) */ ListsResponse getListedUsers(String ticker); @@ -203,35 +191,33 @@ public interface ListsService { /** * Returns the users on the site who have listed TICKER. Does not return those who have placed a TICKER on a private list. *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/listedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER. * @see org.agorava.empireavenue.service.ListsService#getListedUsers() * @see org.agorava.empireavenue.service.ListsService#getListedUsers(int) * @see org.agorava.empireavenue.service.ListsService#getListedUsers(java.lang.String) - * */ - ListsResponse getListedUsers(String ticker,int page); + ListsResponse getListedUsers(String ticker, int page); /** * Returns the users on the site who have listed TICKER as a "Recommended Buy". *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/recommendedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER as a "Recommended Buy". * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String) * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(int) - * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String, int) */ ListsResponse getRecommendedUsers(); @@ -239,92 +225,80 @@ public interface ListsService { /** * Returns the users on the site who have listed TICKER as a "Recommended Buy". *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/recommendedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER as a "Recommended Buy". * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String) * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers() - * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String, int) */ ListsResponse getRecommendedUsers(int page); /** * Returns the users on the site who have listed TICKER as a "Recommended Buy". *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/recommendedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER as a "Recommended Buy". * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers() * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(int) - * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String,int) - * + * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String, int) */ ListsResponse getRecommendedUsers(String ticker); /** * Returns the users on the site who have listed TICKER as a "Recommended Buy". *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/recommendedby
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse Returns the users on the site who have listed TICKER as a "Recommended Buy". * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers() * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(java.lang.String) * @see org.agorava.empireavenue.service.ListsService#getRecommendedUsers(int) - * */ - ListsResponse getRecommendedUsers(String ticker,int page); - - + ListsResponse getRecommendedUsers(String ticker, int page); /** - * Adds the given ticker into the mentioned lists of authenticated user. + * Adds the given ticker into the mentioned lists of authenticated user. *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/add
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse On Success the list type,max user of the list and current user count will be returned as a ListsResponse. - * @see org.agorava.empireavenue.service.ListsService#removeFromList(String ,String) - * + * @see org.agorava.empireavenue.service.ListsService#removeFromList(String, String) */ - ListsResponse addToList(String ticker,String list); - - - - - + ListsResponse addToList(String ticker, String list); /** - * Removes the given ticker from the mentioned lists of authenticated user. + * Removes the given ticker from the mentioned lists of authenticated user. *
- * + *

* EmpireAvenue : https://api.empireavenue.com/lists/remove
*
- * + *

* Rate Limit: User
Authentication: Required * * @return ListsResponse On Success the list type,max user of the list and current user count will be returned as a ListsResponse. - * @see org.agorava.empireavenue.service.ListsService#addToList(String ,String) - * + * @see org.agorava.empireavenue.service.ListsService#addToList(String, String) */ - ListsResponse removeFromList(String ticker,String list); + ListsResponse removeFromList(String ticker, String list); } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/NotificationsService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/NotificationsService.java new file mode 100644 index 0000000..c130c4d --- /dev/null +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/NotificationsService.java @@ -0,0 +1,44 @@ +/* + * Copyright 2014 Agorava. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.agorava.empireavenue.service; + +import org.agorava.empireavenue.response.NotificationsResponse; + +/** + * Operations on Notifications + *

+ *

+ * EmpireAvenue Info:
+ * URI: https://api.empireavenue.com/profile/notifications
+ * Rate Limit: User
+ * Authentication: Required

+ *

+ * API Calls
+ * profile/notifications
+ * + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +public interface NotificationsService { + + + static final String NOTIFICATIONS_ALL = "profile/notifications"; + + NotificationsResponse getAllNotification(); + + +} diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/PortfolioService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/PortfolioService.java index ba26d6a..eac0424 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/PortfolioService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/PortfolioService.java @@ -16,171 +16,153 @@ package org.agorava.empireavenue.service; -import org.agorava.empireavenue.model.Portfolio; import org.agorava.empireavenue.response.PortfolioResponse; /** * Operations on Portfolio /Portfolio - * - * + *

+ *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/
* Rate Limit: User
* Authentication: Required

- * + *

* API Calls
* portfolio/base
* portfolio/get
* - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ public interface PortfolioService { static final String PORTFOLIO_BASE = "portfolio/base"; - static final String PORTFOLIO_GET= "portfolio/get"; - + static final String PORTFOLIO_GET = "portfolio/get"; /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/base
*
- * + *

* Rate Limit: User
Authentication: Required * * @return HistoryResponse Returns the Base Portfolio information for a specific user. * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String) - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int,java.lang.Integer); - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String,int,java.lang.Integer); - * + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int, java.lang.Integer); + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String, int, java.lang.Integer); */ - PortfolioResponse getBasePortfolio(); + PortfolioResponse getBasePortfolio(); /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/base
*
- * + *

* Rate Limit: User
Authentication: Required * * @return HistoryResponse Returns the Base Portfolio information for a specific user. * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio() - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int,java.lang.Integer); - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String,int,java.lang.Integer); - * + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int, java.lang.Integer); + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String, int, java.lang.Integer); */ - PortfolioResponse getBasePortfolio(String ticker); - + PortfolioResponse getBasePortfolio(String ticker); /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/base
*
- * + *

* Rate Limit: User
Authentication: Required * * @return PortfolioResponse Returns the Base Portfolio information for a specific user. * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String) * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(); - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int,java.lang.Integer); - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String,int,java.lang.Integer); - * + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int, java.lang.Integer); + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String, int, java.lang.Integer); */ - PortfolioResponse getBasePortfolio(int page,Integer maxresults); - + PortfolioResponse getBasePortfolio(int page, Integer maxresults); /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue :https://api.empireavenue.com/portfolio/base
*
- * + *

* Rate Limit: User
Authentication: Required * * @return PortfolioResponse Returns the Base Portfolio information for a specific user. * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(); * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(String) - * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int,java.lang.Integer); - * - * + * @see org.agorava.empireavenue.service.PortfolioService#getBasePortfolio(int, java.lang.Integer); */ - PortfolioResponse getBasePortfolio(String ticker,int page,Integer maxresults ); + PortfolioResponse getBasePortfolio(String ticker, int page, Integer maxresults); /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/get
*
- * + *

* Rate Limit: User
Authentication: Required * * @return PortfolioResponse Returns the Full Portfolio information for a specific user. - * - * */ - PortfolioResponse getFullPortfolio(); + PortfolioResponse getFullPortfolio(); /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/get
*
- * + *

* Rate Limit: User
Authentication: Required * * @return PortfolioResponse Returns the Full Portfolio information for a specific user. - * - * */ - PortfolioResponse getFullPortfolio(String ticker); + PortfolioResponse getFullPortfolio(String ticker); /** * Returns the Base Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/get
*
- * + *

* Rate Limit: User
Authentication: Required * * @return PortfolioResponse Returns the Full Portfolio information for a specific user. - * - * */ - PortfolioResponse getFullPortfolio(int page,float maxresults); + PortfolioResponse getFullPortfolio(int page, float maxresults); /** * Returns the Full Portfolio information for a specific user
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/portfolio/get
*
- * + *

* Rate Limit: User
Authentication: Required * * @return PortfolioResponse Returns the Full Portfolio information for a specific user. - * - * */ - PortfolioResponse getFullPortfolio(String ticker,int page,Integer maxresults ); + PortfolioResponse getFullPortfolio(String ticker, int page, Integer maxresults); } \ No newline at end of file diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ProfileService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ProfileService.java index dedb73e..67cb3c7 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ProfileService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/ProfileService.java @@ -15,22 +15,18 @@ */ package org.agorava.empireavenue.service; -import org.agorava.empireavenue.response.BankBalanceResponse; -import org.agorava.empireavenue.response.CommunityResponse; -import org.agorava.empireavenue.response.CountResponse; -import org.agorava.empireavenue.response.StatusResponse; -import org.agorava.empireavenue.response.ProfileInfoResponse; +import org.agorava.empireavenue.response.*; import org.agorava.spi.UserProfileService; /** * Operations on Profile Information /profile - * - * + *

+ *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/profile/bank/balance
* Rate Limit: User
* Authentication: Required

- * + *

* API Calls
* profile/bank/balance
* profile/counts
@@ -41,8 +37,7 @@ * profile/rankings
* profile/notifications
* - * - * @author Rajmahendra Hegde + * @author Rajmahendra Hegde * @since 0.7.0 */ public interface ProfileService extends UserProfileService { @@ -51,15 +46,15 @@ public interface ProfileService extends UserProfileService { static final String PROFILE_INFO = "profile/info"; static final String PROFILE_COMMUNITIES = "/profile/communities"; static final String PROFILE_SHAREHOLDERS = "/profile/shareholders"; - static final String PROFILE_COUNT="/profile/counts"; + static final String PROFILE_COUNT = "/profile/counts"; static final String PROFILE_BANK_BALANCE = "/profile/bank/balance"; /** * Set statusMessage to the authenticated user's status

- * + *

* EmpireAvenue : * https://apidocs.empireavenue.com/v1/post?call=profile/set/status

- * + *

* This message is maximum 140 characters long and UTF-8 safe. * * @param statusMessage the message to be updated @@ -69,59 +64,53 @@ public interface ProfileService extends UserProfileService { /** * Returns the base information of the current logged-in user

- * + *

* EmpireAvenue : * https://apidocs.empireavenue.com/v1/get?call=profile/info

- * + *

* Limit: Maximum of 100 user profiles fetched in any one call * * @return ProfileInfo Profile information of the user - * * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo(String) * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo(String[]) - * */ ProfileInfoResponse getProfileInfo(); + /** * Returns the base information of the given ticker

- * + *

* EmpireAvenue : * https://apidocs.empireavenue.com/v1/get?call=profile/info

- * + *

* Limit: Maximum of 100 user profiles fetched in any one call * * @param ticker - * @return - * + * @return * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo() * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo(String[]) - * */ - ProfileInfoResponse getProfileInfo(String ticker); - + ProfileInfoResponse getProfileInfo(String ticker); + /** * Returns the base information of all the given ticker

- * + *

* EmpireAvenue : * https://apidocs.empireavenue.com/v1/get?call=profile/info

- * + *

* Limit: Maximum of 100 user profiles fetched in any one call * - * @param tickers - * @return - * - * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo() + * @param tickers + * @return + * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo() * @see org.agorava.empireavenue.service.ProfileService#getProfileInfo(String) - */ - ProfileInfoResponse getProfileInfo(String... tickers); + */ + ProfileInfoResponse getProfileInfo(String... tickers); /** * Lists all the Communities the current user belongs to.

* * @return CommunityResponse Array of all Community the current user belongs to. - * * @see org.agorava.empireavenue.service.ProfileService#getAllCommunities(String) - * */ CommunityResponse getAllCommunities(); @@ -130,86 +119,74 @@ public interface ProfileService extends UserProfileService { * * @param ticker EA Ticker * @return CommunityResponse Array of all Community the the given ticker belongs - * * @see org.agorava.empireavenue.service.ProfileService#getAllCommunities() - * */ CommunityResponse getAllCommunitiesFor(String ticker); - + /** - * * @return ProfileInfoResponse containing Shareholders info as ProfileInfo - * - * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(int,int) - * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(String,int,int) - * + * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(int, int) + * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(String, int, int) */ ProfileInfoResponse getAllShareholders(); - + /** * Retrieve all the Shareholders based currenlty logged in user with page and maximum results to display. - * - * @param page are more than a single page request the page of results + * + * @param page are more than a single page request the page of results * @param maxresults limit results returned; range {1..100), default 100; the ?page= parameter still applies, and trusts you send the same ?maxresults= parameter * @return ProfileInfoResponse containing Shareholders info as ProfileInfo - * * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders() - * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(String,int,int) - * + * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(String, int, int) */ ProfileInfoResponse getAllShareholders(int page, int maxresults); - + /** * Retrieve all the Shareholders based on a token. - * - * @param ticker ticker id - * @param page are more than a single page request the page of results + * + * @param ticker ticker id + * @param page are more than a single page request the page of results * @param maxresults limit results returned; range {1..100), default 100; the ?page= parameter still applies, and trusts you send the same ?maxresults= parameter * @return ProfileInfoResponse containing Shareholders info as ProfileInfo - * * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders() - * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(int,int) - * + * @see org.agorava.empireavenue.service.ProfileService#getAllShareholders(int, int) */ - ProfileInfoResponse getAllShareholders(String ticker,int page, int maxresults); - + ProfileInfoResponse getAllShareholders(String ticker, int page, int maxresults); + /** * Returns the various totals for the current user. - * + * * @return CountResponse containing the Count object. - * * @see org.agorava.empireavenue.service.ProfileService#getCountFor(String) * @see org.agorava.empireavenue.service.ProfileService#getCountFor(String[]) */ CountResponse getCount(); - + /** * Returns the various totals for the given ticker. - * + * * @param ticker A ticker to which to get a Count * @return CountResponse containing the Count object. - * * @see org.agorava.empireavenue.service.ProfileService#getCount() * @see org.agorava.empireavenue.service.ProfileService#getCountFor(String[]) */ CountResponse getCountFor(String ticker); - + /** * Returns the various totals for the list of given tickers. - * + * * @param tickers array of tickers to get Count * @return CountResponse containing the List of Count objects. - * * @see org.agorava.empireavenue.service.ProfileService#getCount() * @see org.agorava.empireavenue.service.ProfileService#getCountFor(String) */ CountResponse getCountFor(String... tickers); - + /** * Returns current bank balance for authenticating user - * + * * @return BankBalanceResponse returns the BankBalance object */ BankBalanceResponse getBankBalance(); - + } diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SearchService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SearchService.java index 4c5b0fe..cd62231 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SearchService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SearchService.java @@ -17,44 +17,38 @@ package org.agorava.empireavenue.service; import org.agorava.empireavenue.response.SearchResponse; -import org.agorava.empireavenue.response.SharesResponse; /** * Operations on Search /Search - * + *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/
* Rate Limit: User
* Authentication: Required
* Limit: 100 results
- * + *

* API Calls
* search/recent
* - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * - **/ - + */ public interface SearchService { static final String SEARCH_RECENT = "search/recent"; - /** * Returns the 100 most recent users in Empire Avenue.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/search/recent
*
- * + *

* Rate Limit: User
Authentication: Required * * @return SearchResponse Returns the 100 most recent users in Empire Avenue. - * - * */ SearchResponse getRecentUsers(); diff --git a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SharesService.java b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SharesService.java index cd00ef8..31f8176 100644 --- a/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SharesService.java +++ b/agorava-empireavenue-api/src/main/java/org/agorava/empireavenue/service/SharesService.java @@ -19,89 +19,78 @@ /** * Operations on Shares /shares - * + *

* EmpireAvenue Info:
* URI: https://api.empireavenue.com/
* Rate Limit: User
* Authentication: Required

- * + *

* API Calls
* shares/commission/get
* - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * - **/ + */ public interface SharesService { static final String SHARES_COMMISSION = "shares/commission/get"; - - static final String SHARES_BUY= "shares/buy"; + static final String SHARES_BUY = "shares/buy"; static final String SHARES_SELL = "shares/sell"; - /** * Returns the commission to be charged between authenticating user and other user. You should be passing in the number of shares that you want the commission for.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/search/recent
*
- * + *

* Rate Limit: User
Authentication: Required * - * @param ticker // The ticker of the shares for which the commission is enquired - * @param numberOfShares // The number of shares + * @param ticker // The ticker of the shares for which the commission is enquired + * @param numberOfShares // The number of shares * @return SharesResponse Returns the commission to be charged between authenticating user and other user. - * - * */ - SharesResponse getSharesCommission(String ticker,int numberOfShares); - + SharesResponse getSharesCommission(String ticker, int numberOfShares); /** * Buy Shares from requested ticker. Trading falls under separate daily limits aside from the limits set by the API as well. Abuse of the Trading Shares API will result in the application and the IP addresses being permanently banned from Empire Avenue.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/search/recent
*
- * + *

* Rate Limit: User
Authentication: Required * - * @param ticker // The ticker of the shares that is to be bought - * @param numberOfShares // The number of shares - * @param sharePrice // The price of shares + * @param ticker // The ticker of the shares that is to be bought + * @param numberOfShares // The number of shares + * @param sharePrice // The price of shares * @return SharesResponse Returns buying status (Success ) and related charges. * @see org.agorava.empireavenue.service.SharesService#sellShares(String, int, double) - * - * */ - SharesResponse buyShares(String ticker,int numberOfShares,double sharePrice); + SharesResponse buyShares(String ticker, int numberOfShares, double sharePrice); /** * Returns the commission to be charged between authenticating user and other user. You should be passing in the number of shares that you want the commission for.
*
- * + *

* EmpireAvenue : https://api.empireavenue.com/search/recent
*
- * + *

* Rate Limit: User
Authentication: Required * - * @param ticker // The ticker of the shares this is to be sold - * @param numberOfShares // The number of shares - * @param sharePrice // The price of shares + * @param ticker // The ticker of the shares this is to be sold + * @param numberOfShares // The number of shares + * @param sharePrice // The price of shares * @return SharesResponse Returns selling status (Success ) and related charges. - * @see org.agorava.empireavenue.service.SharesService#buyShares(String, int,double) - * + * @see org.agorava.empireavenue.service.SharesService#buyShares(String, int, double) */ - SharesResponse sellShares(String ticker,int numberOfShares,double sharePrice); - - + SharesResponse sellShares(String ticker, int numberOfShares, double sharePrice); } diff --git a/agorava-empireavenue-cdi/pom.xml b/agorava-empireavenue-cdi/pom.xml index 295f8ee..1620f76 100644 --- a/agorava-empireavenue-cdi/pom.xml +++ b/agorava-empireavenue-cdi/pom.xml @@ -48,53 +48,53 @@ - - - org.jboss.arquillian - arquillian-bom - 1.1.2.Final - import - pom - - - + + + org.jboss.arquillian + arquillian-bom + 1.1.2.Final + import + pom + + + - - org.jboss.arquillian.container - arquillian-weld-ee-embedded-1.1 - 1.0.0.CR3 - test - - - org.jboss.weld - weld-core - 1.1.5.Final - test - - - org.slf4j - slf4j-simple - 1.6.4 - test - + + org.jboss.arquillian.container + arquillian-weld-ee-embedded-1.1 + 1.0.0.CR3 + test + + + org.jboss.weld + weld-core + 1.1.5.Final + test + + + org.slf4j + slf4j-simple + 1.6.4 + test + + + + org.jboss.arquillian.junit + arquillian-junit-container + test + - org.jboss.arquillian.junit - arquillian-junit-container - test - - - - org.jboss.spec - jboss-javaee-6.0 - 1.0.0.Final - pom - provided - + org.jboss.spec + jboss-javaee-6.0 + 1.0.0.Final + pom + provided + javax.enterprise cdi-api @@ -135,36 +135,36 @@ - - arquillian-weld-ee-embedded - - - org.jboss.spec - jboss-javaee-6.0 - 1.0.0.Final - pom - provided - - - org.jboss.arquillian.container - arquillian-weld-ee-embedded-1.1 - 1.0.0.CR3 - test - - - org.jboss.weld - weld-core - 1.1.5.Final - test - - - org.slf4j - slf4j-simple - 1.6.4 - test - - - - + + arquillian-weld-ee-embedded + + + org.jboss.spec + jboss-javaee-6.0 + 1.0.0.Final + pom + provided + + + org.jboss.arquillian.container + arquillian-weld-ee-embedded-1.1 + 1.0.0.CR3 + test + + + org.jboss.weld + weld-core + 1.1.5.Final + test + + + org.slf4j + slf4j-simple + 1.6.4 + test + + + + diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueBaseService.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueBaseService.java index d55fa5f..cf76a38 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueBaseService.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueBaseService.java @@ -15,26 +15,21 @@ */ package org.agorava; -import java.util.HashMap; -import java.util.Map; - +import org.agorava.api.oauth.OAuthService; import org.agorava.empireavenue.EmpireAvenue; +import org.agorava.spi.ProviderApiService; import javax.inject.Inject; -import org.agorava.api.oauth.OAuthService; -import org.agorava.spi.ProviderApiService; - /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class EmpireAvenueBaseService extends ProviderApiService { public static final String API_ROOT = "https://api.empireavenue.com/"; - - + + @Inject @EmpireAvenue private OAuthService service; @@ -49,9 +44,9 @@ public String buildAbsoluteUri(String uri) { public org.agorava.api.oauth.OAuthService getService() { return service; } - - - protected String makeCommaSeperatedFromArray(String... arrayValue ) { + + + protected String makeCommaSeperatedFromArray(String... arrayValue) { StringBuilder result = new StringBuilder(); for (String ticker : arrayValue) { result.append(ticker); diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueLiteral.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueLiteral.java index e8b33f2..3c29a99 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueLiteral.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/EmpireAvenueLiteral.java @@ -16,13 +16,13 @@ package org.agorava; import org.agorava.empireavenue.EmpireAvenue; + import javax.enterprise.util.AnnotationLiteral; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class EmpireAvenueLiteral extends AnnotationLiteral implements EmpireAvenue { public static EmpireAvenue INSTANCE = new EmpireAvenueLiteral(); diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/cdi/EmpireAvenueOAuth20Service.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/cdi/EmpireAvenueOAuth20Service.java index a3eda26..a12a9f5 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/cdi/EmpireAvenueOAuth20Service.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/cdi/EmpireAvenueOAuth20Service.java @@ -9,11 +9,10 @@ import org.agorava.oauth.OAuth20FinalServiceImpl; /** -* -*@author Antoine Sabot-Durand -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Antoine Sabot-Durand + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @GenericBean @OAuth(OAuth.OAuthVersion.OTHER) public class EmpireAvenueOAuth20Service extends OAuth20FinalServiceImpl { diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/CommunityServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/CommunityServiceImpl.java index e31350e..df82f4c 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/CommunityServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/CommunityServiceImpl.java @@ -25,10 +25,8 @@ import java.util.Map; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @EmpireAvenue public class CommunityServiceImpl extends EmpireAvenueBaseService implements CommunityService { diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/HistoryServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/HistoryServiceImpl.java index 040cdf2..64b311b 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/HistoryServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/HistoryServiceImpl.java @@ -24,10 +24,8 @@ import java.util.Map; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @EmpireAvenue public class HistoryServiceImpl extends EmpireAvenueBaseService implements HistoryService { @@ -46,19 +44,19 @@ public HistoryResponse getReceivedDividendsHistory() { public HistoryResponse getReceivedDividendsHistory(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(HISTORY_DIVIDENDS_RECEIVED),data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_DIVIDENDS_RECEIVED), data, HistoryResponse.class); } @Override public HistoryResponse getNetworkscoreHistory() { - return getService().get(buildAbsoluteUri(HISTORY_NETWORKSCORE), HistoryResponse.class); + return getService().get(buildAbsoluteUri(HISTORY_NETWORKSCORE), HistoryResponse.class); } @Override public HistoryResponse getNetworkscoreHistory(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(HISTORY_NETWORKSCORE),data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_NETWORKSCORE), data, HistoryResponse.class); } @Override @@ -66,7 +64,7 @@ public HistoryResponse getNetworkscoreHistory(int days) { Map data = new HashMap<>(); data.put("days", days); - return getService().post(buildAbsoluteUri(HISTORY_NETWORKSCORE),data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_NETWORKSCORE), data, HistoryResponse.class); } @Override @@ -74,26 +72,26 @@ public HistoryResponse getNetworkscoreHistory(String ticker, int days) { Map data = new HashMap<>(); data.put("ticker", ticker); data.put("days", days); - return getService().post(buildAbsoluteUri(HISTORY_NETWORKSCORE), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_NETWORKSCORE), data, HistoryResponse.class); } @Override public HistoryResponse getSharepriceHistory() { - return getService().get(buildAbsoluteUri(HISTORY_SHAREPRICE), HistoryResponse.class); + return getService().get(buildAbsoluteUri(HISTORY_SHAREPRICE), HistoryResponse.class); } @Override public HistoryResponse getSharepriceHistory(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE), data, HistoryResponse.class); } @Override public HistoryResponse getSharepriceHistory(int hours) { Map data = new HashMap<>(); data.put("hours", hours); - return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE), data, HistoryResponse.class); } @Override @@ -101,26 +99,26 @@ public HistoryResponse getSharepriceHistory(String ticker, int hours) { Map data = new HashMap<>(); data.put("ticker", ticker); data.put("hours", hours); - return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE), data, HistoryResponse.class); } @Override public HistoryResponse getSharepriceCloseHistory() { - return getService().get(buildAbsoluteUri(HISTORY_SHAREPRICE_CLOSE), HistoryResponse.class); + return getService().get(buildAbsoluteUri(HISTORY_SHAREPRICE_CLOSE), HistoryResponse.class); } @Override public HistoryResponse getSharepriceCloseHistory(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE_CLOSE), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE_CLOSE), data, HistoryResponse.class); } @Override public HistoryResponse getSharepriceCloseHistory(int days) { Map data = new HashMap<>(); data.put("days", days); - return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE_CLOSE), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHAREPRICE_CLOSE), data, HistoryResponse.class); } @Override @@ -134,7 +132,7 @@ public HistoryResponse getSharepriceCloseHistory(String ticker, int days) { @Override public HistoryResponse getSharesHistory() { - return getService().get(buildAbsoluteUri(HISTORY_SHARES), HistoryResponse.class); + return getService().get(buildAbsoluteUri(HISTORY_SHARES), HistoryResponse.class); } @@ -142,7 +140,7 @@ public HistoryResponse getSharesHistory() { public HistoryResponse getSharesBoughtHistory(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(HISTORY_SHARES_BOUGHT), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHARES_BOUGHT), data, HistoryResponse.class); } @@ -151,9 +149,8 @@ public HistoryResponse getSharesSoldHistory(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(HISTORY_SHARES_SOLD), data, HistoryResponse.class); + return getService().post(buildAbsoluteUri(HISTORY_SHARES_SOLD), data, HistoryResponse.class); } - - - + + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/LeadersServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/LeadersServiceImpl.java index b09a51a..043d5f2 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/LeadersServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/LeadersServiceImpl.java @@ -15,17 +15,16 @@ */ package org.agorava.empireavenue.impl; -import java.util.HashMap; -import java.util.Map; - import org.agorava.EmpireAvenueBaseService; import org.agorava.empireavenue.EmpireAvenue; import org.agorava.empireavenue.response.LeadersResponse; import org.agorava.empireavenue.service.LeadersService; +import java.util.HashMap; +import java.util.Map; + /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @EmpireAvenue diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ListsServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ListsServiceImpl.java index a806f81..e81e0cc 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ListsServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ListsServiceImpl.java @@ -9,7 +9,7 @@ import java.util.Map; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @EmpireAvenue diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/NotificationsServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/NotificationsServiceImpl.java new file mode 100644 index 0000000..7b65a2b --- /dev/null +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/NotificationsServiceImpl.java @@ -0,0 +1,19 @@ +package org.agorava.empireavenue.impl; + +import org.agorava.EmpireAvenueBaseService; +import org.agorava.empireavenue.EmpireAvenue; +import org.agorava.empireavenue.response.NotificationsResponse; +import org.agorava.empireavenue.service.NotificationsService; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +@EmpireAvenue +public class NotificationsServiceImpl extends EmpireAvenueBaseService implements NotificationsService { + + @Override + public NotificationsResponse getAllNotification() { + return getService().get(buildAbsoluteUri(NOTIFICATIONS_ALL), NotificationsResponse.class); + } +} diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/PortfolioServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/PortfolioServiceImpl.java index a59a631..f95d9d0 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/PortfolioServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/PortfolioServiceImpl.java @@ -17,7 +17,6 @@ import org.agorava.EmpireAvenueBaseService; import org.agorava.empireavenue.EmpireAvenue; -import org.agorava.empireavenue.response.HistoryResponse; import org.agorava.empireavenue.response.PortfolioResponse; import org.agorava.empireavenue.service.PortfolioService; @@ -25,7 +24,7 @@ import java.util.Map; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @EmpireAvenue @@ -40,19 +39,17 @@ public PortfolioResponse getBasePortfolio() { public PortfolioResponse getBasePortfolio(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(PORTFOLIO_BASE),data, PortfolioResponse.class); + return getService().post(buildAbsoluteUri(PORTFOLIO_BASE), data, PortfolioResponse.class); } - - @Override public PortfolioResponse getBasePortfolio(String ticker, int page, Integer maxresults) { Map data = new HashMap<>(); data.put("ticker", ticker); data.put("maxresults", maxresults); data.put("page", page); - return getService().post(buildAbsoluteUri(PORTFOLIO_BASE),data, PortfolioResponse.class); + return getService().post(buildAbsoluteUri(PORTFOLIO_BASE), data, PortfolioResponse.class); } @Override @@ -64,7 +61,7 @@ public PortfolioResponse getFullPortfolio() { public PortfolioResponse getFullPortfolio(String ticker) { Map data = new HashMap<>(); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(PORTFOLIO_GET),data, PortfolioResponse.class); + return getService().post(buildAbsoluteUri(PORTFOLIO_GET), data, PortfolioResponse.class); } @@ -73,11 +70,10 @@ public PortfolioResponse getFullPortfolio(int page, float maxresults) { Map data = new HashMap<>(); data.put("page", page); data.put("maxresults", maxresults); - return getService().post(buildAbsoluteUri(PORTFOLIO_GET),data, PortfolioResponse.class); + return getService().post(buildAbsoluteUri(PORTFOLIO_GET), data, PortfolioResponse.class); } - @Override public PortfolioResponse getFullPortfolio(String ticker, int page, Integer maxresults) { Map data = new HashMap<>(); @@ -85,7 +81,7 @@ public PortfolioResponse getFullPortfolio(String ticker, int page, Integer maxre data.put("page", page); data.put("ticker", ticker); - return getService().post(buildAbsoluteUri(PORTFOLIO_GET),data, PortfolioResponse.class); + return getService().post(buildAbsoluteUri(PORTFOLIO_GET), data, PortfolioResponse.class); } @Override @@ -93,6 +89,7 @@ public PortfolioResponse getBasePortfolio(int page, Integer maxresults) { Map data = new HashMap<>(); data.put("maxresults", maxresults); data.put("page", page); - return getService().post(buildAbsoluteUri(PORTFOLIO_GET),data, PortfolioResponse.class); } + return getService().post(buildAbsoluteUri(PORTFOLIO_GET), data, PortfolioResponse.class); + } } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ProfileServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ProfileServiceImpl.java index 99b7a5c..0686e57 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ProfileServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/ProfileServiceImpl.java @@ -17,28 +17,21 @@ import org.agorava.EmpireAvenueBaseService; import org.agorava.empireavenue.EmpireAvenue; +import org.agorava.empireavenue.response.*; import org.agorava.empireavenue.service.ProfileService; -import org.agorava.empireavenue.response.BankBalanceResponse; -import org.agorava.empireavenue.response.CountResponse; -import org.agorava.empireavenue.response.ProfileInfoResponse; -import org.agorava.empireavenue.response.StatusResponse; import org.agorava.spi.UserProfile; import java.util.HashMap; import java.util.Map; -import org.agorava.empireavenue.response.CommunityResponse; - /** - * - * @author Rajmahendra Hegde + * @author Rajmahendra Hegde * @since 0.7.0 */ @EmpireAvenue public class ProfileServiceImpl extends EmpireAvenueBaseService implements ProfileService { /** - * * @see org.agorava.empireavenue.ProfileService#updateStatus(java.lang.String) */ @Override @@ -51,7 +44,6 @@ public StatusResponse updateStatus(String statusMessage) { } /** - * * @see org.agorava.empireavenue.ProfileService#getProfileInfo() */ @Override @@ -60,7 +52,6 @@ public ProfileInfoResponse getProfileInfo() { } /** - * * @return */ @Override @@ -70,7 +61,6 @@ public UserProfile getUserProfile() { } /** - * * @see org.agorava.empireavenue.ProfileService#getAllCommunities() */ @Override @@ -79,7 +69,6 @@ public CommunityResponse getAllCommunities() { } /** - * * @see org.agorava.empireavenue.ProfileService#getAllCommunitiesFor(String) */ @Override @@ -91,7 +80,6 @@ public CommunityResponse getAllCommunitiesFor(String ticker) { } /** - * * @see org.agorava.empireavenue.ProfileService#getProfileInfo(String) */ @Override @@ -102,13 +90,12 @@ public ProfileInfoResponse getProfileInfo(String ticker) { } /** - * * @see org.agorava.empireavenue.ProfileService#getProfileInfo(String...) */ @Override public ProfileInfoResponse getProfileInfo(String... tickers) { Map data = new HashMap<>(); - + String ticker = makeCommaSeperatedFromArray(tickers); data.put("ticker", ticker); @@ -125,8 +112,8 @@ public ProfileInfoResponse getAllShareholders() { /** * TODO: Need a GET method with parameter - * - * @see org.agorava.empireavenue.ProfileService#getAllShareholders(int,int) + * + * @see org.agorava.empireavenue.ProfileService#getAllShareholders(int, int) */ @Override public ProfileInfoResponse getAllShareholders(int page, int maxresults) { @@ -137,11 +124,11 @@ public ProfileInfoResponse getAllShareholders(int page, int maxresults) { } /** - * @see org.agorava.empireavenue.ProfileService#getAllShareholders(String,int,int) + * @see org.agorava.empireavenue.ProfileService#getAllShareholders(String, int, int) */ @Override public ProfileInfoResponse getAllShareholders(String ticker, int page, - int maxresults) { + int maxresults) { Map data = new HashMap<>(); data.put("ticker", ticker); data.put("page", page); @@ -150,7 +137,6 @@ public ProfileInfoResponse getAllShareholders(String ticker, int page, } /** - * * @see org.agorava.empireavenue.ProfileService#getCount() */ @Override @@ -159,7 +145,6 @@ public CountResponse getCount() { } /** - * * @see org.agorava.empireavenue.ProfileService#getCountFor(String) */ @Override @@ -170,13 +155,12 @@ public CountResponse getCountFor(String ticker) { } /** - * * @see org.agorava.empireavenue.ProfileService#getCountFor(String[]) */ @Override public CountResponse getCountFor(String... tickers) { Map data = new HashMap<>(); - + String ticker = makeCommaSeperatedFromArray(tickers); data.put("ticker", ticker); @@ -184,7 +168,6 @@ public CountResponse getCountFor(String... tickers) { } /** - * * {@inheritDoc} */ @Override diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SearchServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SearchServiceImpl.java index e7a093f..9012ee1 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SearchServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SearchServiceImpl.java @@ -21,7 +21,7 @@ import org.agorava.empireavenue.service.SearchService; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SharesServiceImpl.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SharesServiceImpl.java index fb60e4c..f37a657 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SharesServiceImpl.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/impl/SharesServiceImpl.java @@ -25,7 +25,7 @@ import java.util.Map; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @@ -40,7 +40,7 @@ public SharesResponse buyShares(String ticker, int numberOfShares, double shareP data.put("shares", numberOfShares); data.put("last_trade", sharePrice); - return getService().post(buildAbsoluteUri(SHARES_BUY),data, SharesResponse.class); + return getService().post(buildAbsoluteUri(SHARES_BUY), data, SharesResponse.class); } @@ -51,14 +51,14 @@ public SharesResponse sellShares(String ticker, int numberOfShares, double share data.put("shares", numberOfShares); data.put("last_trade", sharePrice); - return getService().post(buildAbsoluteUri(SHARES_SELL),data, SharesResponse.class); - } + return getService().post(buildAbsoluteUri(SHARES_SELL), data, SharesResponse.class); + } @Override public SharesResponse getSharesCommission(String ticker, int numberOfShares) { Map data = new HashMap<>(); data.put("ticker", ticker); data.put("shares", numberOfShares); - return getService().post(buildAbsoluteUri(SHARES_COMMISSION),data, SharesResponse.class); + return getService().post(buildAbsoluteUri(SHARES_COMMISSION), data, SharesResponse.class); } } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceMixin.java index b2b4298..4f47ba1 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceMixin.java @@ -15,25 +15,24 @@ */ package org.agorava.empireavenue.jackson; -import java.math.BigDecimal; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.math.BigDecimal; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) abstract class BankBalanceMixin { @JsonCreator BankBalanceMixin(@JsonProperty("balance") - BigDecimal balance) { + BigDecimal balance) { } @JsonProperty("balance") diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceResponseMixin.java index 42f93cf..a87137b 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/BankBalanceResponseMixin.java @@ -15,22 +15,22 @@ */ package org.agorava.empireavenue.jackson; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ abstract class BankBalanceResponseMixin extends ResponseMixin { @JsonCreator BankBalanceResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { -super(meta); + MetaMixin meta, + @JsonProperty("data") + List data) { + super(meta); } @JsonProperty("data") diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityMixin.java index 85491f2..6803a98 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityMixin.java @@ -21,30 +21,29 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonTypeName("meta") @JsonIgnoreProperties(ignoreUnknown = true) abstract class CommunityMixin { @JsonCreator CommunityMixin(@JsonProperty("community_id") int communityId, - @JsonProperty("joined") String joined, - @JsonProperty("admin") int admin, - @JsonProperty("founder") int founder, - @JsonProperty("short_name") String shortName, - @JsonProperty("type") String type, - @JsonProperty("name") String name, - @JsonProperty("pic_lg") String picLg, - @JsonProperty("pic_sm") String picSm, - @JsonProperty("location") String location, - @JsonProperty("member_count") int memberCount, - @JsonProperty("money") float money, - @JsonProperty("influence_score") float influenceScore, - @JsonProperty("visibility") String visibility, - @JsonProperty("country") String country) { + @JsonProperty("joined") String joined, + @JsonProperty("admin") int admin, + @JsonProperty("founder") int founder, + @JsonProperty("short_name") String shortName, + @JsonProperty("type") String type, + @JsonProperty("name") String name, + @JsonProperty("pic_lg") String picLg, + @JsonProperty("pic_sm") String picSm, + @JsonProperty("location") String location, + @JsonProperty("member_count") int memberCount, + @JsonProperty("money") float money, + @JsonProperty("influence_score") float influenceScore, + @JsonProperty("visibility") String visibility, + @JsonProperty("country") String country) { } @JsonProperty("community_id") @@ -92,4 +91,5 @@ abstract class CommunityMixin { @JsonProperty("country") abstract String getCountry(); + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityResponseMixin.java index 7d376c7..b7c9444 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CommunityResponseMixin.java @@ -18,21 +18,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; + import java.util.List; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ abstract class CommunityResponseMixin extends ResponseMixin { - + @JsonCreator CommunityResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { -super(meta); + MetaMixin meta, + @JsonProperty("data") + List data) { + super(meta); } @JsonProperty("data") diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountMixin.java index 1bdd52b..d51ffce 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountMixin.java @@ -21,55 +21,63 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) abstract class CountMixin { @JsonCreator CountMixin(@JsonProperty("ticker") - String ticker, - @JsonProperty("following") - int following, - @JsonProperty("followers") - int followers, - @JsonProperty("shareholders") - int shareholders, - @JsonProperty("portfolio") - int portfolio, - @JsonProperty("shares_owned") - int sharesOwned, - @JsonProperty("total_thumbs_up") - int totalThumbsUp, - @JsonProperty("total_thumbs_down") - int totalThumbsDown, - @JsonProperty("listed") - int listed, - @JsonProperty("recommended") - int recommended) { + String ticker, + @JsonProperty("following") + int following, + @JsonProperty("followers") + int followers, + @JsonProperty("shareholders") + int shareholders, + @JsonProperty("portfolio") + int portfolio, + @JsonProperty("shares_owned") + int sharesOwned, + @JsonProperty("total_thumbs_up") + int totalThumbsUp, + @JsonProperty("total_thumbs_down") + int totalThumbsDown, + @JsonProperty("listed") + int listed, + @JsonProperty("recommended") + int recommended) { } @JsonProperty("ticker") abstract String getTicker(); + @JsonProperty("following") abstract int getFollowing(); + @JsonProperty("followers") abstract int getFollowers(); + @JsonProperty("shareholders") abstract int getShareholders(); + @JsonProperty("portfolio") abstract int getPortfolio(); + @JsonProperty("shares_owned") abstract int getSharesOwned(); + @JsonProperty("total_thumbs_up") abstract int getTotalThumbsUp(); + @JsonProperty("total_thumbs_down") abstract int getTotalThumbsDown(); + @JsonProperty("listed") abstract int getListed(); + @JsonProperty("recommended") abstract int getRecommended(); diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountResponseMixin.java index abff6b2..1b6004c 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/CountResponseMixin.java @@ -15,23 +15,22 @@ */ package org.agorava.empireavenue.jackson; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ abstract class CountResponseMixin extends ResponseMixin { @JsonCreator CountResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { -super(meta); + MetaMixin meta, + @JsonProperty("data") + List data) { + super(meta); } @JsonProperty("data") diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/EmpireAvenueModule.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/EmpireAvenueModule.java index 77dcedc..3122bd7 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/EmpireAvenueModule.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/EmpireAvenueModule.java @@ -15,18 +15,14 @@ */ package org.agorava.empireavenue.jackson; -import org.agorava.empireavenue.model.*; - import com.fasterxml.jackson.databind.module.SimpleModule; - -import org.agorava.empireavenue.model.Status; +import org.agorava.empireavenue.model.*; import org.agorava.empireavenue.response.*; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @SuppressWarnings("serial") public class EmpireAvenueModule extends SimpleModule { @@ -46,30 +42,35 @@ public void setupModule(SetupContext context) { context.setMixInAnnotations(ProfileInfoResponse.class, ProfileInfoResponseMixin.class); context.setMixInAnnotations(CommunityResponse.class, CommunityResponseMixin.class); - - context.setMixInAnnotations(Count.class,CountMixin.class); - context.setMixInAnnotations(CountResponse.class,CountResponseMixin.class); - - context.setMixInAnnotations(BankBalance.class,BankBalanceMixin.class); - context.setMixInAnnotations(BankBalanceResponse.class,BankBalanceResponseMixin.class); - - context.setMixInAnnotations(Leaders.class,LeadersMixin.class); - context.setMixInAnnotations(LeadersResponse.class,LeadersResponseMixin.class); - - context.setMixInAnnotations(History.class,HistoryMixin.class); - context.setMixInAnnotations(HistoryResponse.class,HistoryResponseMixin.class); - - context.setMixInAnnotations(Portfolio.class,PortfolioMixin.class); - context.setMixInAnnotations(PortfolioResponse.class,PortfolioResponseMixin.class); - - context.setMixInAnnotations(Shares.class,SharesMixin.class); - context.setMixInAnnotations(SharesResponse.class,SharesResponseMixin.class); - - context.setMixInAnnotations(Search.class,SearchMixin.class); - context.setMixInAnnotations(SearchResponse.class,SearchResponseMixin.class); - - context.setMixInAnnotations(Lists.class,ListsMixin.class); - context.setMixInAnnotations(ListsResponse.class,ListsResponseMixin.class); + + context.setMixInAnnotations(Count.class, CountMixin.class); + context.setMixInAnnotations(CountResponse.class, CountResponseMixin.class); + + context.setMixInAnnotations(BankBalance.class, BankBalanceMixin.class); + context.setMixInAnnotations(BankBalanceResponse.class, BankBalanceResponseMixin.class); + + context.setMixInAnnotations(Leaders.class, LeadersMixin.class); + context.setMixInAnnotations(LeadersResponse.class, LeadersResponseMixin.class); + + context.setMixInAnnotations(History.class, HistoryMixin.class); + context.setMixInAnnotations(HistoryResponse.class, HistoryResponseMixin.class); + + context.setMixInAnnotations(Portfolio.class, PortfolioMixin.class); + context.setMixInAnnotations(PortfolioResponse.class, PortfolioResponseMixin.class); + + context.setMixInAnnotations(Shares.class, SharesMixin.class); + context.setMixInAnnotations(SharesResponse.class, SharesResponseMixin.class); + + context.setMixInAnnotations(Search.class, SearchMixin.class); + context.setMixInAnnotations(SearchResponse.class, SearchResponseMixin.class); + + context.setMixInAnnotations(Lists.class, ListsMixin.class); + context.setMixInAnnotations(ListsResponse.class, ListsResponseMixin.class); + + + context.setMixInAnnotations(Notifications.class, NotificationsMixin.class); + context.setMixInAnnotations(NotificationsInfo.class, NotificationsInfoMixin.class); + context.setMixInAnnotations(NotificationsResponse.class, NotificationsResponseMixin.class); } } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryMixin.java index b0ed427..fc72da4 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryMixin.java @@ -21,22 +21,20 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) -public class HistoryMixin { - - @JsonCreator +abstract class HistoryMixin { + + @JsonCreator HistoryMixin(@JsonProperty("date") String date) { } - - - @JsonProperty("dividend") + + + @JsonProperty("dividend") private float dividend; @JsonProperty("price") private float price; @@ -52,8 +50,8 @@ public class HistoryMixin { private float foursquare; @JsonProperty("gplus") private float gplus; - @JsonProperty("instagram") - private float instagram; + @JsonProperty("instagram") + private float instagram; @JsonProperty("linkedin") private float linkedin; @JsonProperty("twitter") @@ -73,9 +71,62 @@ public class HistoryMixin { @JsonProperty("ticker") private String ticker; - - - - - + + @JsonProperty("dividend") + abstract float getDividend(); + + @JsonProperty("date") + abstract String getDate(); + + @JsonProperty("price") + abstract float getPrice(); + + @JsonProperty("eav") + abstract float getEav(); + + @JsonProperty("facebook") + abstract float getFacebook(); + + @JsonProperty("facebookpage") + abstract float getFacebookpage(); + + @JsonProperty("flickr") + abstract float getFlickr(); + + @JsonProperty("foursquare") + abstract float getFoursquare(); + + @JsonProperty("gplus") + abstract float getGplus(); + + @JsonProperty("instagram") + abstract float getInstagram(); + + @JsonProperty("linkedin") + abstract float getLinkedin(); + + @JsonProperty("twitter") + abstract float getTwitter(); + + @JsonProperty("wordpress") + abstract float getWordpress(); + + @JsonProperty("youtube") + abstract float getYoutube(); + + @JsonProperty("shares") + abstract int getShares(); + + @JsonProperty("type") + abstract String getType(); + + @JsonProperty("full_name") + abstract String getFullName(); + + @JsonProperty("sm_portrait") + abstract String getSmPortrait(); + + @JsonProperty("ticker") + abstract String getTicker(); + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryResponseMixin.java index ecf9524..284b930 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/HistoryResponseMixin.java @@ -18,25 +18,24 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; + import java.util.List; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @JsonIgnoreProperties(ignoreUnknown = true) -abstract class HistoryResponseMixin extends ResponseMixin { - @JsonCreator +abstract class HistoryResponseMixin extends ResponseMixin { + @JsonCreator HistoryResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { + MetaMixin meta, + @JsonProperty("data") + List data) { super(meta); } @JsonProperty("data") abstract List getData(); - + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersMixin.java index fe50f2d..720ea9c 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersMixin.java @@ -21,18 +21,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai + * @since 0.7.0 */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) -public class LeadersMixin { +abstract class LeadersMixin { @JsonCreator LeadersMixin(@JsonProperty("ticker") String ticker, - @JsonProperty("full_name") String fullName, - @JsonProperty("country") String country, @JsonProperty("location") String location) { + @JsonProperty("full_name") String fullName, + @JsonProperty("country") String country, @JsonProperty("location") String location) { } + @JsonProperty("max_share") private int maxShare; @JsonProperty("last_trade") @@ -49,8 +50,10 @@ public class LeadersMixin { private int ranking; @JsonProperty("old_ranking") private int oldRanking; - - + @JsonProperty("amount") + private float amount; + + @JsonProperty("eva_score") private float eavScore; @JsonProperty("flickr_score") @@ -73,4 +76,43 @@ public class LeadersMixin { private float wordpressScore; @JsonProperty("gplus_score") private float gplusScore; + + + @JsonProperty("ranking") + abstract int getRanking(); + + @JsonProperty("old_ranking") + abstract int getOldRanking(); + + @JsonProperty("ticker") + abstract String getTicker(); + + @JsonProperty("full_name") + abstract String getFullName(); + + @JsonProperty("last_trade") + abstract float getLastTrade(); + + @JsonProperty("close") + abstract float getClose(); + + @JsonProperty("sm_portrait") + abstract String getSmPortrait(); + + @JsonProperty("lg_portrait") + abstract String getLgPortrait(); + + @JsonProperty("outstanding_shares") + abstract int getOutstandingShares(); + + @JsonProperty("country") + abstract String getCountry(); + + @JsonProperty("location") + abstract String getLocation(); + + @JsonProperty("max_share") + abstract int getMaxShare(); + + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersResponseMixin.java index 2859b0f..81b0715 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/LeadersResponseMixin.java @@ -18,13 +18,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; + import java.util.List; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @JsonIgnoreProperties(ignoreUnknown = true) @@ -32,9 +31,9 @@ abstract class LeadersResponseMixin extends ResponseMixin { @JsonCreator LeadersResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { + MetaMixin meta, + @JsonProperty("data") + List data) { super(meta); } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsMixin.java index 73b91d5..2f47922 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsMixin.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @@ -31,26 +31,74 @@ abstract class ListsMixin { @JsonCreator - ListsMixin( @JsonProperty("list_type_id") String listTypeId, - @JsonProperty("title") String title, - @JsonProperty("private") int isPrivate, - @JsonProperty("allow_privacy_control") int allowPrivacyControl, - @JsonProperty("max_users") int maxUsers, - @JsonProperty("user_count") int userCount, - @JsonProperty("ticker") String ticker, - @JsonProperty("full_name") String full_name, - @JsonProperty("location") String location, - @JsonProperty("country") String country, - @JsonProperty("outstanding_shares") int outstandingShares, - @JsonProperty("change") float change, - @JsonProperty("last_trade") float lastTrade, - @JsonProperty("close") float close, - @JsonProperty("sm_portrait") String smPortrait, - @JsonProperty("lg_portrait") String lgPortrait - ) + ListsMixin(@JsonProperty("list_type_id") String listTypeId, + @JsonProperty("title") String title, + @JsonProperty("private") int isPrivate, + @JsonProperty("allow_privacy_control") int allowPrivacyControl, + @JsonProperty("max_users") int maxUsers, + @JsonProperty("user_count") int userCount, + @JsonProperty("ticker") String ticker, + @JsonProperty("full_name") String full_name, + @JsonProperty("location") String location, + @JsonProperty("country") String country, + @JsonProperty("outstanding_shares") int outstandingShares, + @JsonProperty("change") float change, + @JsonProperty("last_trade") float lastTrade, + @JsonProperty("close") float close, + @JsonProperty("sm_portrait") String smPortrait, + @JsonProperty("lg_portrait") String lgPortrait + ) { } + @JsonProperty("list_type_id") + abstract String getListTypeId(); + + @JsonProperty("title") + abstract String getTitle(); + + @JsonProperty("private") + abstract int getIsPrivate(); + + @JsonProperty("allow_privacy_control") + abstract int getAllowPrivacyControl(); + + @JsonProperty("max_users") + abstract int getMaxUsers(); + + @JsonProperty("user_count") + abstract int getUserCount(); + + @JsonProperty("ticker") + abstract String getTicker(); + + @JsonProperty("full_name") + abstract String getFullName(); + + @JsonProperty("location") + abstract String getLocation(); + + @JsonProperty("country") + abstract String getCountry(); + + @JsonProperty("outstanding_shares") + abstract int getOutstandingShares(); + + @JsonProperty("change") + abstract float getChange(); + + @JsonProperty("last_trade") + abstract float getLastTrade(); + + @JsonProperty("close") + abstract float getClose(); + + @JsonProperty("sm_portrait") + abstract String getSmPortrait(); + + @JsonProperty("lg_portrait") + abstract String getLgPortrait(); + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsResponseMixin.java index 6dffd30..737635a 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ListsResponseMixin.java @@ -22,10 +22,10 @@ import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ -abstract class ListsResponseMixin extends ResponseMixin{ +abstract class ListsResponseMixin extends ResponseMixin { @JsonCreator ListsResponseMixin(@JsonProperty("meta") diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/MetaMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/MetaMixin.java index bce4ea7..5fb7ab0 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/MetaMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/MetaMixin.java @@ -21,33 +21,32 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonTypeName("meta") @JsonIgnoreProperties(ignoreUnknown = true) abstract class MetaMixin { @JsonCreator MetaMixin(@JsonProperty("total_rows") - int totalRows, - @JsonProperty("uri") - String uri, - @JsonProperty("limit") - int limit, - @JsonProperty("limit_type") - String limitType, - @JsonProperty("requests") - int requests, - @JsonProperty("reset") - int reset, - @JsonProperty("recorded") - String recorded, - @JsonProperty("premium") - boolean premium, - @JsonProperty("error") - String error) { + int totalRows, + @JsonProperty("uri") + String uri, + @JsonProperty("limit") + int limit, + @JsonProperty("limit_type") + String limitType, + @JsonProperty("requests") + int requests, + @JsonProperty("reset") + int reset, + @JsonProperty("recorded") + String recorded, + @JsonProperty("premium") + boolean premium, + @JsonProperty("error") + String error) { } @JsonProperty("total_rows") @@ -73,7 +72,7 @@ abstract class MetaMixin { @JsonProperty("premium") abstract boolean isPremium(); - + @JsonProperty("error") abstract String getError(); diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsInfoMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsInfoMixin.java new file mode 100644 index 0000000..6b2f014 --- /dev/null +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsInfoMixin.java @@ -0,0 +1,161 @@ +package org.agorava.empireavenue.jackson; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ + +@JsonTypeName("info") +@JsonIgnoreProperties(ignoreUnknown = true) +abstract class NotificationsInfoMixin { + + + @JsonCreator + NotificationsInfoMixin() { + } + + @JsonProperty("from_ticker") + private String fromTicker; + + @JsonProperty("from_full_name") + private String fromFullName; + + @JsonProperty("to_ticker") + private String toTicker; + + @JsonProperty("to_full_name") + private String toFullName; + + @JsonProperty("message") + private String message; + + @JsonProperty("reply_type") + private String replyType; + + @JsonProperty("shareholder_thread_id") + private String shareholderThreadId; + + @JsonProperty("shareholder_mail_subject") + private String shareholderMailSubject; + + @JsonProperty("shareholder_mail_isowner") + private Boolean shareholderMailIsowner; + + @JsonProperty("topic") + private String topic; + + @JsonProperty("community_id") + private int communityId; + + @JsonProperty("community_topic_id") + private int communityTopicId; + + @JsonProperty("community_name") + private String communityName; + + @JsonProperty("mission_title") + private String missionTitle; + + @JsonProperty("mission_id") + private int missionId; + + @JsonProperty("message_type") + private String messageType; + + @JsonProperty("thread_id") + private int threadId; + + @JsonProperty("headline_id") + private int headlineId; + + @JsonProperty("community_notification_type") + private String communityNotificationType; + + @JsonProperty("inviter_full_name") + private String inviterFullName; + + @JsonProperty("inviter_ticker") + private String inviterTicker; + + @JsonProperty("request_full_name") + private String requestFullName; + + @JsonProperty("request_ticker") + private String requestTicker; + + @JsonProperty("full_name") + private String fullName; + + @JsonProperty("stock_info") + private String stockInfo; + + @JsonProperty("earnings") + private double earnings; + + @JsonProperty("dividends") + private double dividends; + + @JsonProperty("gains") + private double gains; + + @JsonProperty("expenses") + private double expenses; + + @JsonProperty("shares_bought") + private int sharesBought; + + @JsonProperty("shares_bought_user_count") + private int sharesBoughtUserCount; + + @JsonProperty("shares_sold") + private int sharesSold; + + @JsonProperty("shares_sold_user_count") + private int sharesSoldUserCount; + + @JsonProperty("shares") + private int shares; + + @JsonProperty("price") + private double price; + + @JsonProperty("buyer_ticker") + private String buyerTicker; + + @JsonProperty("buyer_name") + private String buyerName; + + @JsonProperty("seller_ticker") + private String sellerTicker; + + @JsonProperty("seller_name") + private String sellerName; + + @JsonProperty("mention_type") + private String mentionType; + + @JsonProperty("post") + private String post; + + @JsonProperty("status_id") + private String statusId; + + @JsonProperty("community_thread_id") + private int communityThreadId; + + @JsonProperty("community_title") + private String communityTitle; + + @JsonProperty("community_topic") + private String communityTopic; + + @JsonProperty("subject") + private String subject; + + +} diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsMixin.java new file mode 100644 index 0000000..b231a1e --- /dev/null +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsMixin.java @@ -0,0 +1,41 @@ +package org.agorava.empireavenue.jackson; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.agorava.empireavenue.model.NotificationsInfo; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ + +@JsonTypeName("data") +//@JsonIgnoreProperties(ignoreUnknown = true) +abstract class NotificationsMixin { + + @JsonCreator + NotificationsMixin() { + + } + + @JsonProperty("type") + String type; + + @JsonProperty("created") + String created; + + @JsonProperty("info") + NotificationsInfo noteInfo; + + + + @JsonProperty("info") + abstract NotificationsInfo getNoteInfo(); + + @JsonProperty("type") + abstract String getType() ; + + @JsonProperty("created") + abstract String getCreated() ; +} diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsResponseMixin.java new file mode 100644 index 0000000..e56975d --- /dev/null +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/NotificationsResponseMixin.java @@ -0,0 +1,25 @@ +package org.agorava.empireavenue.jackson; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +abstract class NotificationsResponseMixin extends ResponseMixin { + + @JsonCreator + NotificationsResponseMixin(@JsonProperty("meta") + MetaMixin meta, @JsonProperty("info") + List info, @JsonProperty("data") + List data) { + super(meta); + } + + @JsonProperty("data") + abstract List getData(); + +} \ No newline at end of file diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioMixin.java index d016e26..abc9a37 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioMixin.java @@ -6,19 +6,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) -public class PortfolioMixin { +abstract class PortfolioMixin { @JsonCreator - PortfolioMixin(@JsonProperty("full_name")String fullName,@JsonProperty("last_trade")float lastTrade,@JsonProperty("close")float close,@JsonProperty("ticker")String ticker) - { + PortfolioMixin(@JsonProperty("full_name") String fullName, @JsonProperty("last_trade") float lastTrade, @JsonProperty("close") float close, @JsonProperty("ticker") String ticker) { } + @JsonProperty("eav_score") private float eavScore; @JsonProperty("flickr_score") @@ -42,7 +42,7 @@ public class PortfolioMixin { @JsonProperty("gplus_score") private float gplusScore; - /* @JsonProperty("sm_portrait") + @JsonProperty("sm_portrait") private String smPortrait; @JsonProperty("lg_portrait") private String lgPortrait; @@ -72,6 +72,95 @@ public class PortfolioMixin { @JsonProperty("your_shares_held") private int yourSharesHeld; @JsonProperty("max_shares") - private int maxShares;*/ + private int maxShares; + + + @JsonProperty("full_name") + abstract String getFullName(); + + @JsonProperty("last_trade") + abstract float getLastTrade(); + + @JsonProperty("close") + abstract float getClose(); + + @JsonProperty("ticker") + abstract String getTicker(); + + @JsonProperty("eva_score") + abstract float getEavScore(); + + @JsonProperty("flickr_score") + abstract float getFlickrScore(); + + @JsonProperty("twitter_score") + abstract float getTwitterScore(); + + @JsonProperty("facebook_score") + abstract float getFacebookScore(); + + @JsonProperty("facebookpage_score") + abstract float getFacebookpageScore(); + + @JsonProperty("youtube_score") + abstract float getYoutubeScore(); + + @JsonProperty("linkedin_score") + abstract float getLinkedinScore(); + + @JsonProperty("foursquare_score") + abstract float getFoursquareScore(); + + @JsonProperty("instagram_score") + abstract float getInstagramScore(); + + @JsonProperty("wordpress_score") + abstract float getWordpressScore(); + + @JsonProperty("gplus_score") + abstract float getGplusScore(); + + @JsonProperty("sm_portrait") + abstract String getSmPortrait(); + + @JsonProperty("lg_portrait") + abstract String getLgPortrait(); + + @JsonProperty("location") + abstract String getLocation(); + + @JsonProperty("country") + abstract String getCountry(); + + @JsonProperty("yesterday_lowest") + abstract float getYesterdayLowest(); + + @JsonProperty("yesterday_highest") + abstract float getYesterdayHighest(); + + @JsonProperty("outstanding_shares") + abstract int getOutstandingShares(); + + @JsonProperty("portfolio_value") + abstract float getPortfolioValue(); + + @JsonProperty("yesterday_earnings") + abstract float getYesterdayEarnings(); + + @JsonProperty("shares") + abstract int getShares(); + + @JsonProperty("last_buy_shares") + abstract int getLastBuyShares(); + + @JsonProperty("last_buy") + abstract String getLastBuy(); + + @JsonProperty("your_shares_held") + abstract int getYourSharesHeld(); + + @JsonProperty("max_shares") + abstract int getMaxShares(); + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioResponseMixin.java index 62dd856..7dd19ac 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/PortfolioResponseMixin.java @@ -7,18 +7,18 @@ import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @JsonIgnoreProperties(ignoreUnknown = true) -abstract class PortfolioResponseMixin extends ResponseMixin { +abstract class PortfolioResponseMixin extends ResponseMixin { @JsonCreator PortfolioResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { + MetaMixin meta, + @JsonProperty("data") + List data) { super(meta); } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoMixin.java index 84876e0..e25f853 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoMixin.java @@ -21,27 +21,26 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ -@JsonTypeName("data") + * @author Rajmahendra Hegde + * @since 0.7.0 + */ +@JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) abstract class ProfileInfoMixin { @JsonCreator ProfileInfoMixin(@JsonProperty("id") - String id, @JsonProperty("ticker") - String ticker, @JsonProperty("first_name") - String firstName, - @JsonProperty("last_name") - String lastName, - @JsonProperty("full_name") - String fullName, @JsonProperty("joined") - String joined, - @JsonProperty("country") - String country, @JsonProperty("location") - String location) { + String id, @JsonProperty("ticker") + String ticker, @JsonProperty("first_name") + String firstName, + @JsonProperty("last_name") + String lastName, + @JsonProperty("full_name") + String fullName, @JsonProperty("joined") + String joined, + @JsonProperty("country") + String country, @JsonProperty("location") + String location) { } @JsonProperty("site_name") @@ -131,4 +130,156 @@ abstract class ProfileInfoMixin { @JsonProperty("gplus_score") private float gplusScore; + + @JsonProperty("ticker") + abstract String getTicker(); + + @JsonProperty("first_name") + abstract String getFirstName(); + + @JsonProperty("site_name") + abstract String getSiteName(); + + @JsonProperty("site_url") + abstract String getSiteUrl(); + + @JsonProperty("last_name") + abstract String getLastName(); + + @JsonProperty("full_name") + abstract String getFullName(); + + @JsonProperty("joined") + abstract String getJoined(); + + @JsonProperty("country") + abstract String getCountry(); + + @JsonProperty("location") + abstract String getLocation(); + + @JsonProperty("type") + abstract String getType(); + + @JsonProperty("max_share") + abstract int getMaxShare(); + + @JsonProperty("commission") + abstract float getCommission(); + + @JsonProperty("last_trade") + abstract float getLastTrade(); + + @JsonProperty("outstanding_shares") + abstract int getOutstandingShares(); + + @JsonProperty("total_shares") + abstract int getTotalShares(); + + @JsonProperty("close") + abstract float getClose(); + + @JsonProperty("close_money") + abstract float getCloseMoney(); + + @JsonProperty("open") + abstract float getOpen(); + + @JsonProperty("yesterday_lowest") + abstract float getYesterdayLowest(); + + @JsonProperty("yesterday_highest") + abstract float getYesterdayHighest(); + + @JsonProperty("yesterday_change") + abstract float getYesterdayChange(); + + @JsonProperty("volume") + abstract int getVolume(); + + @JsonProperty("sm_portrait") + abstract String getSmPortrait(); + + @JsonProperty("lg_portrait") + abstract String getLgPortrait(); + + @JsonProperty("current_status") + abstract String getCurrentStatus(); + + @JsonProperty("current_status_set") + abstract String getCurrentStatusSet(); + + @JsonProperty("market_last_close") + abstract String getMarketLastClose(); + + @JsonProperty("market_last_open") + abstract String getMarketLastOpen(); + + @JsonProperty("trading_status") + abstract String getTradingStatus(); + + @JsonProperty("investments_count") + abstract int getInvestmentsCount(); + + @JsonProperty("shareholders_count") + abstract int getShareholdersCount(); + + @JsonProperty("thumbs_up_count") + abstract int getThumbsUpCount(); + + @JsonProperty("thumbs_down_count") + abstract int getThumbsDowncount(); + + @JsonProperty("shares_owner_count") + abstract int getSharesOwnedCount(); + + @JsonProperty("listed_count") + abstract int getListedCount(); + + @JsonProperty("recommended_count") + abstract int getRecommendedCount(); + + @JsonProperty("held_shares") + abstract int getHeldShares(); + + @JsonProperty("avg_div_per_share") + abstract float getAvgDivPerShare(); + + @JsonProperty("eva_score") + abstract float getEavScore(); + + @JsonProperty("flickr_score") + abstract float getFlickrScore(); + + @JsonProperty("twitter_score") + abstract float getTwitterScore(); + + @JsonProperty("facebook_score") + abstract float getFacebookScore(); + + @JsonProperty("facebookpage_score") + abstract float getFacebookpageScore(); + + @JsonProperty("youtube_score") + abstract float getYoutubeScore(); + + @JsonProperty("linkedin_score") + abstract float getLinkedinScore(); + + @JsonProperty("foursquare_score") + abstract float getFoursquareScore(); + + @JsonProperty("instagram_score") + abstract float getInstagramScore(); + + @JsonProperty("wordpress_score") + abstract float getWordpressScore(); + + @JsonProperty("gplus_score") + abstract float getGplusScore(); + + @JsonProperty("sm_portrait") + abstract String getProfileImageUrl(); + + } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoResponseMixin.java index 1c6dde4..cf94a48 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ProfileInfoResponseMixin.java @@ -15,24 +15,24 @@ */ package org.agorava.empireavenue.jackson; -import java.util.List; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonIgnoreProperties(ignoreUnknown = true) abstract class ProfileInfoResponseMixin extends ResponseMixin { @JsonCreator ProfileInfoResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { + MetaMixin meta, + @JsonProperty("data") + List data) { super(meta); } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ResponseMixin.java index 23f6ec8..d7b72e9 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/ResponseMixin.java @@ -17,15 +17,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ abstract class ResponseMixin { @JsonCreator ResponseMixin(@JsonProperty("meta") - MetaMixin meta) { + MetaMixin meta) { } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchMixin.java index dfeaead..2c07969 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchMixin.java @@ -22,20 +22,18 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * - **/ + */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) -public class SearchMixin { +abstract class SearchMixin { @JsonCreator SearchMixin(@JsonProperty("ticker") String ticker) { } - @JsonProperty("full_name") private String fullName; @JsonProperty("last_trade") @@ -58,10 +56,103 @@ public class SearchMixin { private int maxShares; @JsonProperty("trading_status") private int tradingStatus; + @JsonProperty("eva_score") + private float eavScore; + @JsonProperty("flickr_score") + private float flickrScore; + @JsonProperty("twitter_score") + private float twitterScore; + @JsonProperty("facebook_score") + private float facebookScore; + @JsonProperty("facebookpage_score") + private float facebookpageScore; + @JsonProperty("youtube_score") + private float youtubeScore; + @JsonProperty("linkedin_score") + private float linkedinScore; + @JsonProperty("foursquare_score") + private float foursquareScore; + @JsonProperty("instagram_score") + private float instagramScore; + @JsonProperty("wordpress_score") + private float wordpressScore; + @JsonProperty("gplus_score") + private float gplusScore; + @JsonProperty("amount") + private float amount; + + + @JsonProperty("ticker") + abstract String getTicker(); + + @JsonProperty("full_name") + abstract String getFullName(); + + @JsonProperty("last_trade") + abstract float getLastTrade(); + + @JsonProperty("close") + abstract float getClose(); + + @JsonProperty("sm_portrait") + abstract String getSmPortrait(); + + @JsonProperty("lg_portrait") + abstract String getLgPortrait(); + + @JsonProperty("outstanding_shares") + abstract int getOutstandingShares(); + + @JsonProperty("country") + abstract String getCountry(); + + @JsonProperty("location") + abstract String getLocation(); + + @JsonProperty("created") + abstract String getCreated(); + + @JsonProperty("max_shares") + abstract int getMaxShares(); + + @JsonProperty("trading_status") + abstract String getTradingStatus(); + + @JsonProperty("eva_score") + abstract float getEavScore(); + + @JsonProperty("flickr_score") + abstract float getFlickrScore(); + + @JsonProperty("twitter_score") + abstract float getTwitterScore(); + + @JsonProperty("facebook_score") + abstract float getFacebookScore(); + + @JsonProperty("facebookpage_score") + abstract float getFacebookpageScore(); + + @JsonProperty("youtube_score") + abstract float getYoutubeScore(); + + @JsonProperty("linkedin_score") + abstract float getLinkedinScore(); + + @JsonProperty("foursquare_score") + abstract float getFoursquareScore(); + @JsonProperty("instagram_score") + abstract float getInstagramScore(); + @JsonProperty("wordpress_score") + abstract float getWordpressScore(); + @JsonProperty("gplus_score") + abstract float getGplusScore(); + @JsonProperty("amount") + abstract float getAmount(); } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchResponseMixin.java index c2272d2..89c8cc1 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SearchResponseMixin.java @@ -23,14 +23,14 @@ import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @JsonIgnoreProperties(ignoreUnknown = true) -abstract class SearchResponseMixin extends ResponseMixin{ +abstract class SearchResponseMixin extends ResponseMixin { @JsonCreator SearchResponseMixin(@JsonProperty("meta") diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesMixin.java index 0aec6d2..897f981 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesMixin.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) abstract class SharesMixin { @JsonCreator - public SharesMixin(@JsonProperty("commission")float balance) { + public SharesMixin(@JsonProperty("commission") float commission) { } @@ -47,18 +47,26 @@ public SharesMixin(@JsonProperty("commission")float balance) { @JsonProperty("total_charged") private float totalCharged; - - @JsonProperty("total_earned") private float totalEarned; - @JsonProperty("commission") abstract float getCommission(); + @JsonProperty("success") + abstract boolean isSuccess(); + @JsonProperty("shares_owned") + abstract int getSharesOwned(); + @JsonProperty("bank_balance") + abstract float getBankBalance(); + + @JsonProperty("total_earned") + abstract float getTotalCharged(); + @JsonProperty("total_earned") + abstract float getTotalEarned(); } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesResponseMixin.java index 0954a45..cf4d6d8 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/SharesResponseMixin.java @@ -18,20 +18,19 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import org.agorava.empireavenue.model.Shares; import java.util.List; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ abstract class SharesResponseMixin extends ResponseMixin { @JsonCreator SharesResponseMixin(@JsonProperty("meta") - MetaMixin meta, - @JsonProperty("data") - List data) { + MetaMixin meta, + @JsonProperty("data") + List data) { super(meta); } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusMixin.java index 8bb9913..366f69a 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusMixin.java @@ -19,20 +19,20 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonTypeName("data") @JsonIgnoreProperties(ignoreUnknown = true) abstract class StatusMixin { @JsonCreator StatusMixin(@JsonProperty("status") - String status, - @JsonProperty("content_id") - int contentId) { + String status, + @JsonProperty("content_id") + int contentId) { } diff --git a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusResponseMixin.java b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusResponseMixin.java index 866d520..7bd5a51 100644 --- a/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusResponseMixin.java +++ b/agorava-empireavenue-cdi/src/main/java/org/agorava/empireavenue/jackson/StatusResponseMixin.java @@ -15,25 +15,24 @@ */ package org.agorava.empireavenue.jackson; -import java.util.List; - - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @JsonIgnoreProperties(ignoreUnknown = true) abstract class StatusResponseMixin extends ResponseMixin { @JsonCreator StatusResponseMixin(@JsonProperty("meta") - MetaMixin meta, @JsonProperty("data") - List data) { -super(meta); + MetaMixin meta, @JsonProperty("data") + List data) { + super(meta); } @JsonProperty("data") diff --git a/agorava-empireavenue-cdi/src/main/resources/META-INF/beans.xml b/agorava-empireavenue-cdi/src/main/resources/META-INF/beans.xml index 9bae3e8..08fff08 100644 --- a/agorava-empireavenue-cdi/src/main/resources/META-INF/beans.xml +++ b/agorava-empireavenue-cdi/src/main/resources/META-INF/beans.xml @@ -18,5 +18,5 @@ xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> - + diff --git a/agorava-empireavenue-cdi/src/main/resources/arquillian.xml b/agorava-empireavenue-cdi/src/main/resources/arquillian.xml index cc80431..3769139 100644 --- a/agorava-empireavenue-cdi/src/main/resources/arquillian.xml +++ b/agorava-empireavenue-cdi/src/main/resources/arquillian.xml @@ -15,10 +15,10 @@ ~ limitations under the License. --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> - + @@ -26,7 +26,6 @@ - diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueServiceProducer.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueServiceProducer.java index caa6b40..9bf5ccd 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueServiceProducer.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueServiceProducer.java @@ -15,20 +15,19 @@ */ package org.agorava.empireavenue.cdi.test; +import org.agorava.api.oauth.application.OAuthAppSettings; +import org.agorava.api.oauth.application.OAuthApplication; import org.agorava.empireavenue.EmpireAvenue; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; -import org.agorava.api.oauth.application.OAuthAppSettings; -import org.agorava.api.oauth.application.OAuthApplication; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class EmpireAvenueServiceProducer { - + @ApplicationScoped @Produces @EmpireAvenue diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueTestDeploy.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueTestDeploy.java index fd90ea0..8459e66 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueTestDeploy.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/EmpireAvenueTestDeploy.java @@ -15,7 +15,12 @@ */ package org.agorava.empireavenue.cdi.test; -import org.agorava.empireavenue.model.Lists; +import org.agorava.api.atinject.Current; +import org.agorava.api.oauth.OAuthService; +import org.agorava.api.oauth.OAuthSession; +import org.agorava.api.oauth.Token; +import org.agorava.api.service.OAuthLifeCycleService; +import org.agorava.empireavenue.EmpireAvenue; import org.agorava.empireavenue.service.*; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.shrinkwrap.api.Archive; @@ -26,26 +31,19 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.shrinkwrap.resolver.api.maven.Maven; +import org.junit.Before; -import java.io.FileNotFoundException; import javax.inject.Inject; -import org.agorava.api.atinject.Current; -import org.agorava.api.oauth.OAuthService; -import org.agorava.api.oauth.OAuthSession; -import org.agorava.api.oauth.Token; -import org.agorava.api.service.OAuthLifeCycleService; -import org.agorava.empireavenue.EmpireAvenue; -import org.junit.Before; +import java.io.FileNotFoundException; /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ public class EmpireAvenueTestDeploy { - - private final String TOKEN = ""; - + + private final String TOKEN = ""; + @Inject @EmpireAvenue protected ProfileService profileService; @@ -80,6 +78,9 @@ public class EmpireAvenueTestDeploy { @EmpireAvenue protected CommunityService communityService; + @Inject + @EmpireAvenue + protected NotificationsService notificationsService; @Inject @@ -96,14 +97,14 @@ public class EmpireAvenueTestDeploy { @Before public void init() { - + Token token = new Token(TOKEN.trim(), ""); sessionTest.setAccessToken(token); oAuthLifeCycleService.endDance(); } - - + + @Deployment public static Archive createTestArchive() throws FileNotFoundException { JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "agorava-empireavenue.jar") diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/CommunityTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/CommunityTest.java index 22e3163..46b46b7 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/CommunityTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/CommunityTest.java @@ -27,18 +27,17 @@ import static org.junit.Assert.assertTrue; /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @RunWith(Arquillian.class) public class CommunityTest extends EmpireAvenueTestDeploy { - private String twitter="265"; - private String wordPress="628"; - private String amazonReview="3891"; + private String twitter = "265"; + private String wordPress = "628"; + private String amazonReview = "3891"; + + private int pages = 1; - private int pages=1; @Test public void authorizationUrlTest() { assertTrue(service.getAuthorizationUrl().startsWith("https")); @@ -49,15 +48,15 @@ public void communityInfoTest() { CommunityResponse communityServiceCommunitiesInfo = communityService.getCommunitiesInfo(twitter); assertNotNull(communityServiceCommunitiesInfo); assertNotNull(communityServiceCommunitiesInfo.getCommunity()); - - - System.out.println(communityServiceCommunitiesInfo.getCommunity().toString()); + + + System.out.println(communityServiceCommunitiesInfo.getCommunity().toString()); System.out.println("--------------------------------------"); } @Test public void communitiesInfo() { - CommunityResponse communityServiceCommunitiesInfo = communityService.getCommunitiesInfo(twitter,wordPress,amazonReview); + CommunityResponse communityServiceCommunitiesInfo = communityService.getCommunitiesInfo(twitter, wordPress, amazonReview); assertNotNull(communityServiceCommunitiesInfo); assertNotNull(communityServiceCommunitiesInfo.getAllCommunity()); assertTrue(communityServiceCommunitiesInfo.getAllCommunity().size() > 0); @@ -71,7 +70,7 @@ public void communitiesInfo() { @Test public void communitiesInfoTest2() { - CommunityResponse communityServiceCommunitiesInfo = communityService.getCommunitiesInfo(twitter,wordPress,amazonReview,twitter,wordPress,amazonReview); + CommunityResponse communityServiceCommunitiesInfo = communityService.getCommunitiesInfo(twitter, wordPress, amazonReview, twitter, wordPress, amazonReview); assertNotNull(communityServiceCommunitiesInfo); assertNotNull(communityServiceCommunitiesInfo.getAllCommunity()); assertTrue(communityServiceCommunitiesInfo.getAllCommunity().size() > 0); diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/HistoryTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/HistoryTest.java index d6d8829..fe0901d 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/HistoryTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/HistoryTest.java @@ -19,22 +19,21 @@ import org.agorava.empireavenue.model.History; import org.agorava.empireavenue.response.HistoryResponse; import org.jboss.arquillian.junit.Arquillian; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import org.junit.Test; import org.junit.runner.RunWith; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 - * */ @RunWith(Arquillian.class) public class HistoryTest extends EmpireAvenueTestDeploy { - private String ticker="RMH"; + private String ticker = "RMH"; - private int days=20; + private int days = 20; @Test public void authorizationUrlTest() { @@ -234,7 +233,6 @@ public void getAllSharesHistory() { } - @Test public void getAllSharesBoughtHistory() { HistoryResponse sharesBoughtHistory = historyService.getSharesBoughtHistory(ticker); @@ -248,7 +246,6 @@ public void getAllSharesBoughtHistory() { } - @Test public void getAllSharesSoldHistory() { HistoryResponse sharesSoldHistory = historyService.getSharesSoldHistory(ticker); diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/LeadersTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/LeadersTest.java index 71e6cfe..7969941 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/LeadersTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/LeadersTest.java @@ -15,9 +15,6 @@ */ package org.agorava.empireavenue.cdi.test.testcase; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import org.agorava.empireavenue.cdi.test.EmpireAvenueTestDeploy; import org.agorava.empireavenue.model.Leaders; import org.agorava.empireavenue.response.LeadersResponse; @@ -25,9 +22,11 @@ import org.junit.Test; import org.junit.runner.RunWith; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + /** - * - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @RunWith(Arquillian.class) diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ListsTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ListsTest.java index e9e3704..ee96cad 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ListsTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ListsTest.java @@ -4,7 +4,6 @@ import org.agorava.empireavenue.model.Lists; import org.agorava.empireavenue.response.ListsResponse; import org.jboss.arquillian.junit.Arquillian; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -12,15 +11,15 @@ import static org.junit.Assert.assertTrue; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @RunWith(Arquillian.class) public class ListsTest extends EmpireAvenueTestDeploy { - private static String ticker="RMH"; - private static int page=2; - private static Integer maxresults=101; + private static String ticker = "RMH"; + private static int page = 2; + private static Integer maxresults = 101; @Test public void authorizationUrlTest() { @@ -38,6 +37,7 @@ public void listInfoTest() { System.out.println(list.toString()); System.out.println("--------------------------------------"); } + @Test public void listInfoTestWithTicker() { ListsResponse listsResponse = listsService.getListInfo(ticker); @@ -50,7 +50,6 @@ public void listInfoTestWithTicker() { } - //"friends","watch","recommend_buy","private","favourite" @@ -110,10 +109,9 @@ public void favouriteListMembersTest() { } - @Test public void friendsListMembersTestWithPage() { - ListsResponse listsResponse = listsService.getListMembersInfo("friends",page); + ListsResponse listsResponse = listsService.getListMembersInfo("friends", page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -124,7 +122,7 @@ public void friendsListMembersTestWithPage() { @Test public void watchListMembersTestWithPage() { - ListsResponse listsResponse = listsService.getListMembersInfo("watch",page); + ListsResponse listsResponse = listsService.getListMembersInfo("watch", page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -135,7 +133,7 @@ public void watchListMembersTestWithPage() { @Test public void recommendBuyListMembersTestWithPage() { - ListsResponse listsResponse = listsService.getListMembersInfo("recommend_buy",page); + ListsResponse listsResponse = listsService.getListMembersInfo("recommend_buy", page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -146,7 +144,7 @@ public void recommendBuyListMembersTestWithPage() { @Test public void privateListMembersTestWithPage() { - ListsResponse listsResponse = listsService.getListMembersInfo("private",page); + ListsResponse listsResponse = listsService.getListMembersInfo("private", page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -157,7 +155,7 @@ public void privateListMembersTestWithPage() { @Test public void favouriteListMembersTestWithPage() { - ListsResponse listsResponse = listsService.getListMembersInfo("favourite",page); + ListsResponse listsResponse = listsService.getListMembersInfo("favourite", page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -169,7 +167,7 @@ public void favouriteListMembersTestWithPage() { @Test public void friendsListMembersTestWithPageAndTicker() { - ListsResponse listsResponse = listsService.getListMembersInfo("friends",ticker,page); + ListsResponse listsResponse = listsService.getListMembersInfo("friends", ticker, page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -180,7 +178,7 @@ public void friendsListMembersTestWithPageAndTicker() { @Test public void watchListMembersTestWithPageAndTicker() { - ListsResponse listsResponse = listsService.getListMembersInfo("watch",ticker,page); + ListsResponse listsResponse = listsService.getListMembersInfo("watch", ticker, page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -191,7 +189,7 @@ public void watchListMembersTestWithPageAndTicker() { @Test public void recommendBuyListMembersTestWithPageAndTicker() { - ListsResponse listsResponse = listsService.getListMembersInfo("recommend_buy",ticker,page); + ListsResponse listsResponse = listsService.getListMembersInfo("recommend_buy", ticker, page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -202,7 +200,7 @@ public void recommendBuyListMembersTestWithPageAndTicker() { @Test public void privateListMembersTestWithPageAndTicker() { - ListsResponse listsResponse = listsService.getListMembersInfo("private",ticker,page); + ListsResponse listsResponse = listsService.getListMembersInfo("private", ticker, page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -213,7 +211,7 @@ public void privateListMembersTestWithPageAndTicker() { @Test public void favouriteListMembersTestWithPageAndTicker() { - ListsResponse listsResponse = listsService.getListMembersInfo("favourite",ticker,page); + ListsResponse listsResponse = listsService.getListMembersInfo("favourite", ticker, page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -259,7 +257,7 @@ public void listedUsersTestWithTicker() { @Test public void listedUsersTestWithPageLimitAndTicket() { - ListsResponse listsResponse = listsService.getListedUsers(ticker,page); + ListsResponse listsResponse = listsService.getListedUsers(ticker, page); assertNotNull(listsResponse); assertNotNull(listsResponse.getAllListInfo()); assertTrue(listsResponse.getAllListInfo().size() > 0); @@ -276,9 +274,9 @@ public void addListTest() { assertNotNull(listsResponse.getListInfo()); System.out.println(" ::::::::: The List Type ID :" + listsResponse.getListInfo().getListTypeId()); - System.out.println(" ::::::::: Maximum users :" +listsResponse.getListInfo().getMaxUsers()); - System.out.println(" ::::::::: User Count :" +listsResponse.getListInfo().getUserCount()); - } + System.out.println(" ::::::::: Maximum users :" + listsResponse.getListInfo().getMaxUsers()); + System.out.println(" ::::::::: User Count :" + listsResponse.getListInfo().getUserCount()); + } @Test @@ -288,7 +286,7 @@ public void removeFromListTest() { assertNotNull(listsResponse.getListInfo()); System.out.println(" ::::::::: The List Type ID :" + listsResponse.getListInfo().getListTypeId()); - System.out.println(" ::::::::: Maximum users :" +listsResponse.getListInfo().getMaxUsers()); - System.out.println(" ::::::::: User Count :" +listsResponse.getListInfo().getUserCount()); + System.out.println(" ::::::::: Maximum users :" + listsResponse.getListInfo().getMaxUsers()); + System.out.println(" ::::::::: User Count :" + listsResponse.getListInfo().getUserCount()); } } diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/NotificationsTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/NotificationsTest.java new file mode 100644 index 0000000..a46600f --- /dev/null +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/NotificationsTest.java @@ -0,0 +1,41 @@ +package org.agorava.empireavenue.cdi.test.testcase; + +import org.agorava.empireavenue.cdi.test.EmpireAvenueTestDeploy; +import org.agorava.empireavenue.model.Notifications; +import org.agorava.empireavenue.response.NotificationsResponse; +import org.jboss.arquillian.junit.Arquillian; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +/** + * @author Karthikeyan Annamalai + * @since 0.7.0 + */ +@RunWith(Arquillian.class) +public class NotificationsTest extends EmpireAvenueTestDeploy { + + private static String ticker = "RMH"; + private static int page = 2; + private static Integer maxresults = 101; + + @Test + public void authorizationUrlTest() { + assertTrue(service.getAuthorizationUrl().startsWith("https")); + } + + @Test + public void getAllNotificationsTest() { + NotificationsResponse notificationsResponse = notificationsService.getAllNotification(); + assertNotNull(notificationsResponse); + assertNotNull(notificationsResponse.getAllNotification()); + assertTrue(notificationsResponse.getAllNotification().size() > 0); + for (Notifications notifications : notificationsResponse.getAllNotification()) { + System.out.println(notifications.toString()); + } + + + } +} diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/PortfolioTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/PortfolioTest.java index 99f21e5..fd48755 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/PortfolioTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/PortfolioTest.java @@ -4,7 +4,6 @@ import org.agorava.empireavenue.model.Portfolio; import org.agorava.empireavenue.response.PortfolioResponse; import org.jboss.arquillian.junit.Arquillian; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -14,14 +13,13 @@ /** * @author Karthikeyan Annamalai @EmpireAvenue * @since 0.7.0 - * */ @RunWith(Arquillian.class) public class PortfolioTest extends EmpireAvenueTestDeploy { - private static String ticker="RMH"; - private static int page=10; - private static Integer maxresults=101; + private static String ticker = "RMH"; + private static int page = 10; + private static Integer maxresults = 101; @Test @@ -53,8 +51,6 @@ public void getAllFullPortfolioInfo() { } - - @Test public void getAllBasePortfolioInfoWithTicker() { PortfolioResponse basePortfolioInfo = portfolioService.getBasePortfolio(ticker); @@ -67,10 +63,9 @@ public void getAllBasePortfolioInfoWithTicker() { } - @Test public void getAllBasePortfolioInfoWithPageAndMaxResults() { - PortfolioResponse basePortfolioInfo = portfolioService.getBasePortfolio(page,maxresults); + PortfolioResponse basePortfolioInfo = portfolioService.getBasePortfolio(page, maxresults); assertNotNull(basePortfolioInfo); assertTrue(basePortfolioInfo.getAllPortfolioInfo().size() > 0); for (Portfolio portfolio : basePortfolioInfo.getAllPortfolioInfo()) { @@ -80,10 +75,9 @@ public void getAllBasePortfolioInfoWithPageAndMaxResults() { } - @Test public void getAllBasePortfolioInfoWithTickerPageAndMaxResult() { - PortfolioResponse basePortfolioInfo = portfolioService.getBasePortfolio(ticker,page,maxresults); + PortfolioResponse basePortfolioInfo = portfolioService.getBasePortfolio(ticker, page, maxresults); assertNotNull(basePortfolioInfo); assertTrue(basePortfolioInfo.getAllPortfolioInfo().size() > 0); for (Portfolio portfolio : basePortfolioInfo.getAllPortfolioInfo()) { @@ -107,10 +101,9 @@ public void getAllFullPortfolioInfoWithTicker() { } - @Test public void getAllFullPortfolioInfoWithPageAndMaxResults() { - PortfolioResponse fullPortfolioInfo = portfolioService.getFullPortfolio(page,maxresults); + PortfolioResponse fullPortfolioInfo = portfolioService.getFullPortfolio(page, maxresults); assertNotNull(fullPortfolioInfo); assertTrue(fullPortfolioInfo.getAllPortfolioInfo().size() > 0); for (Portfolio portfolio : fullPortfolioInfo.getAllPortfolioInfo()) { @@ -120,10 +113,9 @@ public void getAllFullPortfolioInfoWithPageAndMaxResults() { } - @Test public void getAllFullPortfolioInfoWithTickerPageAndMaxResult() { - PortfolioResponse fullPortfolioInfo = portfolioService.getFullPortfolio(ticker,page,maxresults); + PortfolioResponse fullPortfolioInfo = portfolioService.getFullPortfolio(ticker, page, maxresults); assertNotNull(fullPortfolioInfo); assertTrue(fullPortfolioInfo.getAllPortfolioInfo().size() > 0); for (Portfolio portfolio : fullPortfolioInfo.getAllPortfolioInfo()) { diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ProfileInfoTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ProfileInfoTest.java index 9ad937c..44cb298 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ProfileInfoTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/ProfileInfoTest.java @@ -15,27 +15,19 @@ */ package org.agorava.empireavenue.cdi.test.testcase; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import org.agorava.empireavenue.cdi.test.EmpireAvenueTestDeploy; -import org.agorava.empireavenue.response.BankBalanceResponse; -import org.agorava.empireavenue.response.CommunityResponse; -import org.agorava.empireavenue.response.CountResponse; -import org.agorava.empireavenue.response.LeadersResponse; -import org.agorava.empireavenue.response.ProfileInfoResponse; -import org.agorava.empireavenue.response.StatusResponse; +import org.agorava.empireavenue.response.*; import org.jboss.arquillian.junit.Arquillian; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; +import static org.junit.Assert.*; + /** -* -* @author Rajmahendra Hegde -* @since 0.7.0 -*/ + * @author Rajmahendra Hegde + * @since 0.7.0 + */ @RunWith(Arquillian.class) public class ProfileInfoTest extends EmpireAvenueTestDeploy { @@ -48,10 +40,10 @@ public void authorizationUrlTest() { @Ignore @Test public void sendAUpdateTest() throws Exception { - String message = "Posted using Agorava API for EA"; + String message = "Posted using Agorava API for EA"; StatusResponse statusResponse = profileService.updateStatus(message); assertNotNull(statusResponse); - assertEquals(message,statusResponse.getStatus().getStatus()); + assertEquals(message, statusResponse.getStatus().getStatus()); } @Test @@ -61,17 +53,17 @@ public void getProfileInfoForTheCurrentUser() { assertNotNull(profileInfoResponse.getProfileInfo()); } - - + + @Test public void getAllCommunityForCurrentUser() { CommunityResponse communityResponse = profileService.getAllCommunities(); assertNotNull(communityResponse); assertNotNull(communityResponse.getAllCommunity()); assertTrue(communityResponse.getAllCommunity().size() > 0); - + } - + @Test public void getAllCommunityForMYSODOTCOM() { CommunityResponse communityResponse = profileService.getAllCommunitiesFor("MYSODOTCOM"); @@ -79,15 +71,15 @@ public void getAllCommunityForMYSODOTCOM() { assertNotNull(communityResponse.getAllCommunity()); assertTrue(communityResponse.getAllCommunity().size() > 0); } - + @Test public void getAllShareholders() { - ProfileInfoResponse profileInfoResponse = profileService.getAllShareholders(); - assertNotNull(profileInfoResponse); - assertNotNull(profileInfoResponse.getProfileInfo()); - assertTrue(profileInfoResponse.getAllProfileInfo().size() > 0); + ProfileInfoResponse profileInfoResponse = profileService.getAllShareholders(); + assertNotNull(profileInfoResponse); + assertNotNull(profileInfoResponse.getProfileInfo()); + assertTrue(profileInfoResponse.getAllProfileInfo().size() > 0); } - + @Test public void getCountForTheCurrentUser() { CountResponse countResponse = profileService.getCount(); @@ -95,7 +87,7 @@ public void getCountForTheCurrentUser() { assertNotNull(countResponse.getCount()); } - + @Test public void getBankBalanceOfCurrentUser() { BankBalanceResponse bankBalanceResponse = profileService.getBankBalance(); @@ -103,8 +95,6 @@ public void getBankBalanceOfCurrentUser() { assertNotNull(bankBalanceResponse.getBankBalance()); } - - - - + + } diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SearchTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SearchTest.java index 5f55d81..a0b79b0 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SearchTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SearchTest.java @@ -27,11 +27,11 @@ import static org.junit.Assert.assertTrue; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @RunWith(Arquillian.class) -public class SearchTest extends EmpireAvenueTestDeploy { +public class SearchTest extends EmpireAvenueTestDeploy { @Test diff --git a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SharesTest.java b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SharesTest.java index 92d0ec7..a61ac47 100644 --- a/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SharesTest.java +++ b/agorava-empireavenue-cdi/src/test/java/org/agorava/empireavenue/cdi/test/testcase/SharesTest.java @@ -26,17 +26,15 @@ import static org.junit.Assert.assertTrue; /** - * @author Karthikeyan Annamalai + * @author Karthikeyan Annamalai * @since 0.7.0 */ @RunWith(Arquillian.class) public class SharesTest extends EmpireAvenueTestDeploy { - private String ticker="ARKARTHICK"; - private int numberOfShares=160; - private double sharePrice=195.54; - - + private String ticker = "ARKARTHICK"; + private int numberOfShares = 160; + private double sharePrice = 195.54; @Test @@ -46,7 +44,7 @@ public void authorizationUrlTest() { @Test public void commissionChargesTest() { - SharesResponse sharesCommission = sharesService.getSharesCommission(ticker,numberOfShares); + SharesResponse sharesCommission = sharesService.getSharesCommission(ticker, numberOfShares); assertNotNull(sharesCommission); assertNotNull(sharesCommission.getCommission()); System.out.println(sharesCommission.getCommission().getCommission()); @@ -56,7 +54,7 @@ public void commissionChargesTest() { @Test public void buySharesTest() { - SharesResponse buyShares = sharesService.buyShares(ticker, numberOfShares,sharePrice); + SharesResponse buyShares = sharesService.buyShares(ticker, numberOfShares, sharePrice); assertNotNull(buyShares); assertNotNull(buyShares.getCommission()); assert (buyShares.getCommission().isSuccess()); @@ -65,10 +63,9 @@ public void buySharesTest() { } - @Test public void sellSharesTest() { - SharesResponse sellShares = sharesService.sellShares(ticker, numberOfShares,sharePrice); + SharesResponse sellShares = sharesService.sellShares(ticker, numberOfShares, sharePrice); assertNotNull(sellShares); assertNotNull(sellShares.getCommission()); assert (sellShares.getCommission().isSuccess()); diff --git a/agorava-empireavenue-cdi/src/test/resources/arquillian.xml b/agorava-empireavenue-cdi/src/test/resources/arquillian.xml index f72f321..2f74349 100644 --- a/agorava-empireavenue-cdi/src/test/resources/arquillian.xml +++ b/agorava-empireavenue-cdi/src/test/resources/arquillian.xml @@ -14,7 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + diff --git a/agorava-empireavenue-utils/src/main/java/org/agorava/empireavenue/utils/ConfigProducer.java b/agorava-empireavenue-utils/src/main/java/org/agorava/empireavenue/utils/ConfigProducer.java index a287ffb..f3aa33c 100644 --- a/agorava-empireavenue-utils/src/main/java/org/agorava/empireavenue/utils/ConfigProducer.java +++ b/agorava-empireavenue-utils/src/main/java/org/agorava/empireavenue/utils/ConfigProducer.java @@ -34,7 +34,7 @@ public class ConfigProducer { @ApplicationScoped @Produces @EmpireAvenue - @OAuthApplication(params = {@Param(name = "prefix",value = "ea")}) + @OAuthApplication(params = {@Param(name = "prefix", value = "ea")}) public OAuthAppSettings settings;