/** * Returns the position feed for the portfolio. * * @return position feed for the portfolio */ public PortfolioFeedLink getFeedLink() { return getExtension(PortfolioFeedLink.class); }
/** * Returns whether it has the data for the portfolio. * * @return whether it has the data for the portfolio */ public boolean hasPortfolioData() { return hasExtension(PortfolioData.class); }
/** * Sets the data for the portfolio. * * @param portfolioData data for the portfolio or <code>null</code> to reset */ public void setPortfolioData(PortfolioData portfolioData) { if (portfolioData == null) { removeExtension(PortfolioData.class); } else { setExtension(portfolioData); } }
/** * Creates a portfolio entry object. * * @param portfolioName the name of the new portfolio. e.g. "Oil & Gas". * This is required when creating a portfolio, but optional when updating. * @param currencyCode the ISO4217 currency code for the portfolio. * e.g. USD, EUR, JPY, GBP, CAD, HKD, etc. * This is required when creating a portfolio, but optional when updating. * @return the newly created portfolio entry * @throws IOException If there is a problem communicating with the server. * @throws MalformedURLException If the URL is invalid. * @throws ServiceException If the service is unable to handle the request. */ public static PortfolioEntry makePortfolioEntry(String portfolioName, String currencyCode) { PortfolioEntry entry = new PortfolioEntry(); if (!portfolioName.equals("")) entry.setTitle(new PlainTextConstruct(portfolioName)); PortfolioData data = new PortfolioData(); if (!currencyCode.equals("")) data.setCurrencyCode(currencyCode); entry.setPortfolioData(data); return entry; }
/** * Default mutable constructor. */ public PortfolioEntry() { super(); getCategories().add(CATEGORY); }
/** * Creates a portfolio entry object. * * @param portfolioName the name of the new portfolio. e.g. "Oil & Gas". * This is required when creating a portfolio, but optional when updating. * @param currencyCode the ISO4217 currency code for the portfolio. * e.g. USD, EUR, JPY, GBP, CAD, HKD, etc. * This is required when creating a portfolio, but optional when updating. * @return the newly created portfolio entry * @throws IOException If there is a problem communicating with the server. * @throws MalformedURLException If the URL is invalid. * @throws ServiceException If the service is unable to handle the request. */ public static PortfolioEntry makePortfolioEntry(String portfolioName, String currencyCode) { PortfolioEntry entry = new PortfolioEntry(); if (!portfolioName.equals("")) entry.setTitle(new PlainTextConstruct(portfolioName)); PortfolioData data = new PortfolioData(); if (!currencyCode.equals("")) data.setCurrencyCode(currencyCode); entry.setPortfolioData(data); return entry; }
/** * Default mutable constructor. */ public PortfolioEntry() { super(); getCategories().add(CATEGORY); }
/** * Sets the data for the portfolio. * * @param portfolioData data for the portfolio or <code>null</code> to reset */ public void setPortfolioData(PortfolioData portfolioData) { if (portfolioData == null) { removeExtension(PortfolioData.class); } else { setExtension(portfolioData); } }
/** * Returns whether it has the data for the portfolio. * * @return whether it has the data for the portfolio */ public boolean hasPortfolioData() { return hasExtension(PortfolioData.class); }
/** * Returns the position feed for the portfolio. * * @return position feed for the portfolio */ public PortfolioFeedLink getFeedLink() { return getExtension(PortfolioFeedLink.class); }
/** * Sets the position feed for the portfolio. * * @param feedLink position feed for the portfolio or <code>null</code> to * reset */ public void setFeedLink(PortfolioFeedLink feedLink) { if (feedLink == null) { removeExtension(PortfolioFeedLink.class); } else { setExtension(feedLink); } }
/** * Returns whether it has the position feed for the portfolio. * * @return whether it has the position feed for the portfolio */ public boolean hasFeedLink() { return hasExtension(PortfolioFeedLink.class); }
/** * Returns the data for the portfolio. * * @return data for the portfolio */ public PortfolioData getPortfolioData() { return getExtension(PortfolioData.class); }
/** * Sets the position feed for the portfolio. * * @param feedLink position feed for the portfolio or <code>null</code> to * reset */ public void setFeedLink(PortfolioFeedLink feedLink) { if (feedLink == null) { removeExtension(PortfolioFeedLink.class); } else { setExtension(feedLink); } }
/** * Returns whether it has the position feed for the portfolio. * * @return whether it has the position feed for the portfolio */ public boolean hasFeedLink() { return hasExtension(PortfolioFeedLink.class); }
/** * Returns the data for the portfolio. * * @return data for the portfolio */ public PortfolioData getPortfolioData() { return getExtension(PortfolioData.class); }