@Override public Element resolve(ElementMetadata<?, ?> metadata, ValidationContext vc) { // Fix "setCanPost" based on the existence of an entry post link. feedState.canPost = getEntryPostLink() != null; // Continue parent resolution. return super.resolve(metadata, vc); }
@Override public Element resolve(ElementMetadata<?, ?> metadata, ValidationContext vc) { // Fix "setCanPost" based on the existence of an entry post link. feedState.canPost = getEntryPostLink() != null; // Continue parent resolution. return super.resolve(metadata, vc); }
@Override public Element resolve(ElementMetadata<?, ?> metadata, ValidationContext vc) { // Fix "setCanPost" based on the existence of an entry post link. feedState.canPost = getEntryPostLink() != null; // Continue parent resolution. return super.resolve(metadata, vc); }
/** * Inserts a new Entry into the feed, if the feed is currently associated with * a Service. * * @return the inserted Entry returned by the Service. * * @throws ServiceException If there is no associated GData service or the * service is unable to perform the insertion. * * @throws UnsupportedOperationException If insert is not supported for the * target feed. * * @throws IOException If there is an error communicating with the GData * service. */ public <T extends Entry> T insert(T newEntry) throws ServiceException, IOException { if (feedState.service == null) { throw new ServiceException( CoreErrorDomain.ERR.entryNotAssociated); } Link postLink = getEntryPostLink(); if (postLink == null) { throw new UnsupportedOperationException("Media cannot be inserted"); } URL postUrl = new URL(postLink.getHref()); throw new UnsupportedOperationException("Not supported yet"); // return feedState.service.insert(postUrl, newEntry); }
/** * Inserts a new Entry into the feed, if the feed is currently associated with * a Service. * * @return the inserted Entry returned by the Service. * * @throws ServiceException If there is no associated GData service or the * service is unable to perform the insertion. * * @throws UnsupportedOperationException If insert is not supported for the * target feed. * * @throws IOException If there is an error communicating with the GData * service. */ public <T extends Entry> T insert(T newEntry) throws ServiceException, IOException { if (feedState.service == null) { throw new ServiceException( CoreErrorDomain.ERR.entryNotAssociated); } Link postLink = getEntryPostLink(); if (postLink == null) { throw new UnsupportedOperationException("Media cannot be inserted"); } URL postUrl = postLink.getHrefUri().toURL(); return feedState.service.insert(postUrl, newEntry); }
/** * Inserts a new Entry into the feed, if the feed is currently associated with * a Service. * * @return the inserted Entry returned by the Service. * * @throws ServiceException If there is no associated GData service or the * service is unable to perform the insertion. * * @throws UnsupportedOperationException If insert is not supported for the * target feed. * * @throws IOException If there is an error communicating with the GData * service. */ public <T extends Entry> T insert(T newEntry) throws ServiceException, IOException { if (feedState.service == null) { throw new ServiceException( CoreErrorDomain.ERR.entryNotAssociated); } Link postLink = getEntryPostLink(); if (postLink == null) { throw new UnsupportedOperationException("Media cannot be inserted"); } URL postUrl = postLink.getHrefUri().toURL(); return feedState.service.insert(postUrl, newEntry); }