public abstract class DataInjector
extends org.exoplatform.container.component.BaseComponentPlugin
| Modifier and Type | Field and Description |
|---|---|
static String |
ARRAY_SPLIT |
| Constructor and Description |
|---|
DataInjector() |
| Modifier and Type | Method and Description |
|---|---|
String |
createTextResource(int size)
create text/plain resource by size.
|
abstract Object |
execute(HashMap<String,String> params)
This function should be implemented to execute tasks that require to response data to client.
|
abstract org.exoplatform.services.log.Log |
getLog()
get log object.
|
String |
getRestId() |
abstract void |
inject(HashMap<String,String> params)
This function should be implemented to inject data into the product.
|
String |
paragraphs(int amount)
get pseudo paragraphs.
|
String |
randomParagraphs(int i)
get random paragraphs
|
String |
randomUser()
get random user id.
|
String |
randomWords(int i)
get random words.
|
List<String> |
readGroupsIfExist(HashMap<String,String> queryParams) |
List<String> |
readMembershipIfExist(HashMap<String,String> queryParams) |
List<String> |
readUsersIfExist(HashMap<String,String> queryParams) |
abstract void |
reject(HashMap<String,String> params)
This function should be implemented to clear data that is injected before by
inject(java.util.HashMap<java.lang.String, java.lang.String>). |
void |
setRestId(String restId) |
String |
words(int amount)
get pseudo words.
|
public static final String ARRAY_SPLIT
public String getRestId()
public void setRestId(String restId)
public abstract org.exoplatform.services.log.Log getLog()
public abstract Object execute(HashMap<String,String> params) throws Exception
params - query parameters of a HTTP GET request.Exceptionpublic abstract void inject(HashMap<String,String> params) throws Exception
params - parameters for injecting. They can be query parameters of a HTTP GET request.Exceptionpublic abstract void reject(HashMap<String,String> params) throws Exception
inject(java.util.HashMap<java.lang.String, java.lang.String>).params - parameters for rejecting. They can be query parameters of a HTTP GET request.Exceptionpublic final String words(int amount)
amount - number of wordspublic final String paragraphs(int amount)
amount - number of paragraphspublic final String randomUser()
public final String randomWords(int i)
i - maximum number of words. the number of words is between 0 and i.public final String randomParagraphs(int i)
i - maximum number of paragraphs.public String createTextResource(int size)
size - in kilobyteCopyright © 2003–2019 eXo Platform SAS. All rights reserved.