Class NoOpDataProvider
- java.lang.Object
-
- org.symphonyoss.symphony.messageml.util.NoOpDataProvider
-
- All Implemented Interfaces:
IDataProvider
public class NoOpDataProvider extends Object implements IDataProvider
A utilityIDataProviderwhich populatesIUserPresentationwith the input (either user email or user ID) and always validates input URLs.
-
-
Constructor Summary
Constructors Constructor Description NoOpDataProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IUserPresentationgetUserPresentation(Long uid)Retrieve user information object based on UIDIUserPresentationgetUserPresentation(String emailAddress)Retrieve user information object based on user emailvoidvalidateURI(URI uri)Check an URI against a whitelist of supported protocols.
-
-
-
Method Detail
-
getUserPresentation
public IUserPresentation getUserPresentation(String emailAddress) throws InvalidInputException
Description copied from interface:IDataProviderRetrieve user information object based on user email- Specified by:
getUserPresentationin interfaceIDataProvider- Parameters:
emailAddress- Email of the user whose information to retrieve- Returns:
- User presentation object
- Throws:
InvalidInputException
-
getUserPresentation
public IUserPresentation getUserPresentation(Long uid) throws InvalidInputException
Description copied from interface:IDataProviderRetrieve user information object based on UID- Specified by:
getUserPresentationin interfaceIDataProvider- Parameters:
uid- UID of the user whose information to retrieve- Returns:
- User presentation object
- Throws:
InvalidInputException
-
validateURI
public void validateURI(URI uri) throws InvalidInputException, ProcessingException
Description copied from interface:IDataProviderCheck an URI against a whitelist of supported protocols.- Specified by:
validateURIin interfaceIDataProvider- Parameters:
uri- the URI to check- Throws:
InvalidInputException- thrown if the URI protocol is not supportedProcessingException- thrown on a malformed URI or a backend error
-
-