org.exoplatform.forum.extras.injection.poll
Class AbstractPollInjector
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.bench.DataInjector
org.exoplatform.forum.extras.injection.poll.AbstractPollInjector
- All Implemented Interfaces:
- org.exoplatform.container.component.ComponentPlugin
- Direct Known Subclasses:
- GroupInjector, PollInjector, VoteInjector
public abstract class AbstractPollInjector
- extends org.exoplatform.services.bench.DataInjector
| Fields inherited from class org.exoplatform.services.bench.DataInjector |
ARRAY_SPLIT |
| Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin |
desc, name |
|
Method Summary |
Object |
execute(HashMap<String,String> stringHashMap)
|
org.exoplatform.poll.service.Poll |
getFullPublicPollByName(String pollName)
|
org.exoplatform.services.organization.Group |
getGroupByName(String groupName)
|
protected int |
getIntParam(HashMap<String,String> params,
String name)
|
org.exoplatform.services.log.Log |
getLog()
|
org.exoplatform.poll.service.Poll |
getPrivatePollByName(String groupName,
String pollName)
|
org.exoplatform.poll.service.Poll |
getPublicPollByName(String pollName)
|
javax.jcr.Node |
getPublicPollNodeByName(String pollName)
|
protected static String |
getStringValueParam(HashMap<String,String> params,
String key,
String defaultValue)
|
protected String |
groupName()
|
int |
groupNumber(String base)
|
void |
init(String groupPrefix,
String pollPublicPrefix,
String pollPrivatePrefix,
String toGroup,
String userPrefix)
|
javax.jcr.NodeIterator |
pollNodesForPublic(String pollBase)
|
int |
pollNumberForPrivate(String groupName,
String pollBase)
|
int |
pollNumberForPublic(String pollBase)
|
protected String |
pollPrivateName()
|
protected String |
pollPublicName()
|
void |
reject(HashMap<String,String> stringHashMap)
|
int |
userNumber(String base)
|
| Methods inherited from class org.exoplatform.services.bench.DataInjector |
createTextResource, getRestId, inject, paragraphs, randomParagraphs, randomUser, randomWords, readGroupsIfExist, readMembershipIfExist, readUsersIfExist, setRestId, words |
| Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin |
getDescription, getName, setDescription, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POLL_DEFAULT_TYPE
public static final String POLL_DEFAULT_TYPE
- See Also:
- Constant Field Values
DEFAULT_POLL_PRIVATE_PREFIX
public static final String DEFAULT_POLL_PRIVATE_PREFIX
- See Also:
- Constant Field Values
DEFAULT_POLL_PUBLIC_PREFIX
public static final String DEFAULT_POLL_PUBLIC_PREFIX
- See Also:
- Constant Field Values
DEFAULT_GROUP_PREFIX
public static final String DEFAULT_GROUP_PREFIX
- See Also:
- Constant Field Values
OPTION_DEFAULT_SIZE
protected static final int OPTION_DEFAULT_SIZE
- See Also:
- Constant Field Values
pollService
protected static org.exoplatform.poll.service.PollService pollService
forumService
protected static org.exoplatform.forum.service.ForumService forumService
locator
protected final org.exoplatform.forum.common.jcr.KSDataLocation locator
organizationService
protected static org.exoplatform.services.organization.OrganizationService organizationService
groupHandler
protected org.exoplatform.services.organization.GroupHandler groupHandler
groupBase
protected String groupBase
groupNumber
protected int groupNumber
pollPublicBase
protected String pollPublicBase
pollPrivateBase
protected String pollPrivateBase
pollPrivateNumber
protected int pollPrivateNumber
pollPublicNumber
protected int pollPublicNumber
optionBase
protected String optionBase
optionNumber
protected int optionNumber
userBase
protected String userBase
userNumber
protected int userNumber
random
protected Random random
exoNameGenerator
protected ExoNameGenerator exoNameGenerator
lorem
protected LoremIpsum4J lorem
POLL_TYPE
public static final String POLL_TYPE
- See Also:
- Constant Field Values
AbstractPollInjector
public AbstractPollInjector()
getLog
public org.exoplatform.services.log.Log getLog()
- Specified by:
getLog in class org.exoplatform.services.bench.DataInjector
execute
public Object execute(HashMap<String,String> stringHashMap)
throws Exception
- Specified by:
execute in class org.exoplatform.services.bench.DataInjector
- Throws:
Exception
reject
public void reject(HashMap<String,String> stringHashMap)
throws Exception
- Specified by:
reject in class org.exoplatform.services.bench.DataInjector
- Throws:
Exception
pollPublicName
protected String pollPublicName()
pollPrivateName
protected String pollPrivateName()
groupName
protected String groupName()
init
public void init(String groupPrefix,
String pollPublicPrefix,
String pollPrivatePrefix,
String toGroup,
String userPrefix)
groupNumber
public int groupNumber(String base)
throws Exception
- Throws:
Exception
getGroupByName
public org.exoplatform.services.organization.Group getGroupByName(String groupName)
throws Exception
- Throws:
Exception
userNumber
public int userNumber(String base)
throws Exception
- Throws:
Exception
getPublicPollByName
public org.exoplatform.poll.service.Poll getPublicPollByName(String pollName)
throws Exception
- Throws:
Exception
getFullPublicPollByName
public org.exoplatform.poll.service.Poll getFullPublicPollByName(String pollName)
throws Exception
- Throws:
Exception
getPublicPollNodeByName
public javax.jcr.Node getPublicPollNodeByName(String pollName)
throws Exception
- Throws:
Exception
getPrivatePollByName
public org.exoplatform.poll.service.Poll getPrivatePollByName(String groupName,
String pollName)
throws Exception
- Throws:
Exception
pollNumberForPrivate
public int pollNumberForPrivate(String groupName,
String pollBase)
throws Exception
- Throws:
Exception
pollNumberForPublic
public int pollNumberForPublic(String pollBase)
throws Exception
- Throws:
Exception
pollNodesForPublic
public javax.jcr.NodeIterator pollNodesForPublic(String pollBase)
throws Exception
- Throws:
Exception
getStringValueParam
protected static String getStringValueParam(HashMap<String,String> params,
String key,
String defaultValue)
getIntParam
protected int getIntParam(HashMap<String,String> params,
String name)
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.