com.liferay.portal.tools.samplesqlbuilder
Class DataFactory
java.lang.Object
com.liferay.portal.tools.samplesqlbuilder.DataFactory
public class DataFactory
- extends Object
Method Summary |
AssetEntry |
addAssetEntry(long groupId,
long userId,
long classNameId,
long classPK,
String mimeType,
String title)
|
BlogsEntry |
addBlogsEntry(long groupId,
long userId,
String title,
String urlTitle,
String content)
|
BlogsStatsUser |
addBlogsStatsUser(long groupId,
long userId)
|
Contact |
addContact(String firstName,
String lastName)
|
Group |
addGroup(long groupId,
long classNameId,
long classPK,
String name,
String friendlyURL)
|
Layout |
addLayout(int layoutId,
String name,
String friendlyURL,
String column1,
String column2)
|
MBCategory |
addMBCategory(long categoryId,
long groupId,
long companyId,
long userId,
String name,
String description,
int threadCount,
int messageCount)
|
MBDiscussion |
addMBDiscussion(long classNameId,
long classPK,
long threadId)
|
MBMessage |
addMBMessage(long messageId,
long groupId,
long userId,
long classNameId,
long classPK,
long categoryId,
long threadId,
long parentMessageId,
String subject,
String body)
|
MBStatsUser |
addMBStatsUser(long groupId,
long userId)
|
MBThread |
addMBThread(long threadId,
long groupId,
long categoryId,
long rootMessageId,
int messageCount,
long lastPostByUserId)
|
List<Permission> |
addPermissions(Resource resource)
|
Resource |
addResource(String name,
String primKey)
|
List<KeyValuePair> |
addRolesPermissions(Resource resource,
List<Permission> permissions,
Role memberRole)
|
User |
addUser(boolean defaultUser,
String screenName)
|
List<Long> |
addUserToGroupIds(long groupId)
|
WikiNode |
addWikiNode(long groupId,
long userId,
String name,
String description)
|
WikiPage |
addWikiPage(long groupId,
long userId,
long nodeId,
String title,
double version,
String content,
boolean head)
|
Role |
getAdministratorRole()
|
ClassName |
getBlogsEntryClassName()
|
List<ClassName> |
getClassNames()
|
Role |
getCommunityAdministratorRole()
|
Role |
getCommunityMemberRole()
|
Role |
getCommunityOwnerRole()
|
Company |
getCompany()
|
List<CounterModelImpl> |
getCounters()
|
User |
getDefaultUser()
|
ClassName |
getGroupClassName()
|
List<Group> |
getGroups()
|
Group |
getGuestGroup()
|
Role |
getGuestRole()
|
Role |
getOrganizationAdministratorRole()
|
Role |
getOrganizationMemberRole()
|
Role |
getOrganizationOwnerRole()
|
Role |
getPowerUserRole()
|
List<ResourceCode> |
getResourceCodes()
|
ClassName |
getRoleClassName()
|
List<Role> |
getRoles()
|
ClassName |
getUserClassName()
|
Object[] |
getUserNames()
|
Role |
getUserRole()
|
ClassName |
getWikiPageClassName()
|
void |
initClassNames()
|
void |
initCompany()
|
void |
initCounters()
|
void |
initDefaultUser()
|
void |
initGroups()
|
void |
initResourceCodes()
|
void |
initResourceCodes(String name)
|
void |
initRoles()
|
void |
initUserNames()
|
IntegerWrapper |
newInteger()
|
protected ResourceCode |
newResourceCode()
|
protected Role |
newRole()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataFactory
public DataFactory(int maxGroupsCount,
int maxUserToGroupCount,
SimpleCounter counter,
SimpleCounter permissionCounter,
SimpleCounter resourceCounter,
SimpleCounter resourceCodeCounter)
addAssetEntry
public AssetEntry addAssetEntry(long groupId,
long userId,
long classNameId,
long classPK,
String mimeType,
String title)
throws Exception
- Throws:
Exception
addBlogsEntry
public BlogsEntry addBlogsEntry(long groupId,
long userId,
String title,
String urlTitle,
String content)
throws Exception
- Throws:
Exception
addBlogsStatsUser
public BlogsStatsUser addBlogsStatsUser(long groupId,
long userId)
throws Exception
- Throws:
Exception
addContact
public Contact addContact(String firstName,
String lastName)
throws Exception
- Throws:
Exception
addGroup
public Group addGroup(long groupId,
long classNameId,
long classPK,
String name,
String friendlyURL)
throws Exception
- Throws:
Exception
addLayout
public Layout addLayout(int layoutId,
String name,
String friendlyURL,
String column1,
String column2)
throws Exception
- Throws:
Exception
addMBCategory
public MBCategory addMBCategory(long categoryId,
long groupId,
long companyId,
long userId,
String name,
String description,
int threadCount,
int messageCount)
throws Exception
- Throws:
Exception
addMBDiscussion
public MBDiscussion addMBDiscussion(long classNameId,
long classPK,
long threadId)
throws Exception
- Throws:
Exception
addMBMessage
public MBMessage addMBMessage(long messageId,
long groupId,
long userId,
long classNameId,
long classPK,
long categoryId,
long threadId,
long parentMessageId,
String subject,
String body)
throws Exception
- Throws:
Exception
addMBStatsUser
public MBStatsUser addMBStatsUser(long groupId,
long userId)
throws Exception
- Throws:
Exception
addMBThread
public MBThread addMBThread(long threadId,
long groupId,
long categoryId,
long rootMessageId,
int messageCount,
long lastPostByUserId)
throws Exception
- Throws:
Exception
addPermissions
public List<Permission> addPermissions(Resource resource)
throws Exception
- Throws:
Exception
addResource
public Resource addResource(String name,
String primKey)
throws Exception
- Throws:
Exception
addRolesPermissions
public List<KeyValuePair> addRolesPermissions(Resource resource,
List<Permission> permissions,
Role memberRole)
throws Exception
- Throws:
Exception
addUser
public User addUser(boolean defaultUser,
String screenName)
throws Exception
- Throws:
Exception
addUserToGroupIds
public List<Long> addUserToGroupIds(long groupId)
addWikiNode
public WikiNode addWikiNode(long groupId,
long userId,
String name,
String description)
throws Exception
- Throws:
Exception
addWikiPage
public WikiPage addWikiPage(long groupId,
long userId,
long nodeId,
String title,
double version,
String content,
boolean head)
throws Exception
- Throws:
Exception
getAdministratorRole
public Role getAdministratorRole()
getBlogsEntryClassName
public ClassName getBlogsEntryClassName()
getClassNames
public List<ClassName> getClassNames()
getCommunityAdministratorRole
public Role getCommunityAdministratorRole()
getCommunityMemberRole
public Role getCommunityMemberRole()
getCommunityOwnerRole
public Role getCommunityOwnerRole()
getCompany
public Company getCompany()
getCounters
public List<CounterModelImpl> getCounters()
getDefaultUser
public User getDefaultUser()
getGroupClassName
public ClassName getGroupClassName()
getGroups
public List<Group> getGroups()
getGuestGroup
public Group getGuestGroup()
getGuestRole
public Role getGuestRole()
getOrganizationAdministratorRole
public Role getOrganizationAdministratorRole()
getOrganizationMemberRole
public Role getOrganizationMemberRole()
getOrganizationOwnerRole
public Role getOrganizationOwnerRole()
getPowerUserRole
public Role getPowerUserRole()
getResourceCodes
public List<ResourceCode> getResourceCodes()
getRoleClassName
public ClassName getRoleClassName()
getRoles
public List<Role> getRoles()
getUserClassName
public ClassName getUserClassName()
getUserNames
public Object[] getUserNames()
getUserRole
public Role getUserRole()
getWikiPageClassName
public ClassName getWikiPageClassName()
initClassNames
public void initClassNames()
throws Exception
- Throws:
Exception
initCompany
public void initCompany()
throws Exception
- Throws:
Exception
initCounters
public void initCounters()
throws Exception
- Throws:
Exception
initDefaultUser
public void initDefaultUser()
throws Exception
- Throws:
Exception
initGroups
public void initGroups()
throws Exception
- Throws:
Exception
initResourceCodes
public void initResourceCodes()
throws Exception
- Throws:
Exception
initResourceCodes
public void initResourceCodes(String name)
throws Exception
- Throws:
Exception
initRoles
public void initRoles()
throws Exception
- Throws:
Exception
initUserNames
public void initUserNames()
throws Exception
- Throws:
Exception
newInteger
public IntegerWrapper newInteger()
newResourceCode
protected ResourceCode newResourceCode()
newRole
protected Role newRole()