public class ShareUpdateServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements ShareUpdateService
Modifier and Type | Field and Description |
---|---|
static String |
UPLOAD_DIR |
Constructor and Description |
---|
ShareUpdateServiceImpl() |
Modifier and Type | Method and Description |
---|---|
LinkPreview |
checkLink(String linkToCheck)
tries the following in the indicated order for Populating the Link preview
Open Graph protocol
Meta "title" and "description" tags
Best guess from page content (not recommended)
Schema.org microdata <-- This is still a TODO
|
LinkPreview |
checkUploadedFile(String fileName,
String fileabsolutePathOnServer)
generate a preview of the file, upload the file on the storage and shorts the link
|
void |
destroy() |
String |
extractURL(String feedText)
utilty method that extract an url ina text
|
protected static String |
getMimeType(File file,
String filenameWithExtension) |
ArrayList<org.gcube.portlets.widgets.pickuser.shared.PickingUser> |
getPortalUsers() |
ArrayList<org.gcube.portlets.widgets.pickuser.shared.PickingUser> |
getSelectedUserIds(ArrayList<String> fullNames) |
UserSettings |
getUserSettings() |
void |
init()
connect to cassandra at startup
|
org.gcube.portal.databook.shared.ClientFeed |
share(String postText,
org.gcube.portal.databook.shared.FeedType feedType,
org.gcube.portal.databook.shared.PrivacyLevel pLevel,
String vreId,
LinkPreview preview,
String urlThumbnail,
ArrayList<String> mentionedUserFullNames,
String fileName,
String filePathOnServer) |
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public static final String UPLOAD_DIR
public void init()
init
in class javax.servlet.GenericServlet
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public org.gcube.portal.databook.shared.ClientFeed share(String postText, org.gcube.portal.databook.shared.FeedType feedType, org.gcube.portal.databook.shared.PrivacyLevel pLevel, String vreId, LinkPreview preview, String urlThumbnail, ArrayList<String> mentionedUserFullNames, String fileName, String filePathOnServer)
share
in interface ShareUpdateService
public UserSettings getUserSettings()
getUserSettings
in interface ShareUpdateService
public LinkPreview checkUploadedFile(String fileName, String fileabsolutePathOnServer)
checkUploadedFile
in interface ShareUpdateService
protected static String getMimeType(File file, String filenameWithExtension) throws IOException
file
- IOException
MagicParseException
MagicMatchNotFoundException
MagicException
public String extractURL(String feedText)
feedText
- public LinkPreview checkLink(String linkToCheck)
checkLink
in interface ShareUpdateService
public ArrayList<org.gcube.portlets.widgets.pickuser.shared.PickingUser> getSelectedUserIds(ArrayList<String> fullNames)
public ArrayList<org.gcube.portlets.widgets.pickuser.shared.PickingUser> getPortalUsers()
getPortalUsers
in interface ShareUpdateService
Copyright © 2014. All Rights Reserved.