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,
boolean visible,
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)
|
DDMContent |
addDDMContent(long groupId,
long companyId,
long userId)
|
DDMStorageLink |
addDDMStorageLink(long classNameId,
long classPK,
long structureId)
|
DDMStructure |
addDDMStructure(long groupId,
long companyId,
long userId,
long classNameId)
|
DDMStructureLink |
addDDMStructureLink(long classPK,
long structureId)
|
DLFileEntry |
addDlFileEntry(long groupId,
long companyId,
long userId,
long folderId,
String extension,
String mimeType,
String name,
String title,
String description)
|
DLFileEntryMetadata |
addDLFileEntryMetadata(long ddmStorageId,
long ddmStructureId,
long fileEntryId,
long fileVersionId)
|
DLFileRank |
addDLFileRank(long groupId,
long companyId,
long userId,
long fileEntryId)
|
DLFileVersion |
addDLFileVersion(DLFileEntry dlFileEntry)
|
DLFolder |
addDLFolder(long groupId,
long companyId,
long userId,
long parentFolderId,
String name,
String description)
|
DLSync |
addDLSync(long companyId,
long fileId,
long repositoryId,
long parentFolderId,
boolean typeFolder)
|
Group |
addGroup(long groupId,
long classNameId,
long classPK,
String name,
String friendlyURL,
boolean site)
|
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 rootMessageId,
long parentMessageId,
String subject,
String body)
|
MBStatsUser |
addMBStatsUser(long groupId,
long userId)
|
MBThread |
addMBThread(long threadId,
long groupId,
long companyId,
long categoryId,
long rootMessageId,
int messageCount,
long lastPostByUserId)
|
List<Permission> |
addPermissions(Resource resource)
|
Resource |
addResource(String name,
String primKey)
|
List<ResourcePermission> |
addResourcePermission(long companyId,
String name,
String primKey)
|
List<KeyValuePair> |
addRolesPermissions(Resource resource,
List<Permission> permissions,
Role memberRole)
|
SocialActivity |
addSocialActivity(long groupId,
long companyId,
long userId,
long classNameId,
long classPK)
|
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()
|
Company |
getCompany()
|
List<CounterModelImpl> |
getCounters()
|
ClassName |
getDDMContentClassName()
|
User |
getDefaultUser()
|
ClassName |
getDLFileEntryClassName()
|
ClassName |
getGroupClassName()
|
List<Group> |
getGroups()
|
Group |
getGuestGroup()
|
Role |
getGuestRole()
|
ClassName |
getMBMessageClassName()
|
Role |
getOrganizationAdministratorRole()
|
Role |
getOrganizationOwnerRole()
|
Role |
getOrganizationUserRole()
|
Role |
getPowerUserRole()
|
List<ResourceCode> |
getResourceCodes()
|
ClassName |
getRoleClassName()
|
List<Role> |
getRoles()
|
Role |
getSiteAdministratorRole()
|
Role |
getSiteMemberRole()
|
Role |
getSiteOwnerRole()
|
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(String baseDir,
int maxGroupsCount,
int maxUserToGroupCount,
SimpleCounter counter,
SimpleCounter permissionCounter,
SimpleCounter resourceCounter,
SimpleCounter resourceCodeCounter,
SimpleCounter resourcePermissionCounter,
SimpleCounter socialActivityCounter)
addAssetEntry
public AssetEntry addAssetEntry(long groupId,
long userId,
long classNameId,
long classPK,
boolean visible,
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
addDDMContent
public DDMContent addDDMContent(long groupId,
long companyId,
long userId)
throws Exception
- Throws:
Exception
addDDMStorageLink
public DDMStorageLink addDDMStorageLink(long classNameId,
long classPK,
long structureId)
throws Exception
- Throws:
Exception
addDDMStructure
public DDMStructure addDDMStructure(long groupId,
long companyId,
long userId,
long classNameId)
throws Exception
- Throws:
Exception
addDDMStructureLink
public DDMStructureLink addDDMStructureLink(long classPK,
long structureId)
throws Exception
- Throws:
Exception
addDlFileEntry
public DLFileEntry addDlFileEntry(long groupId,
long companyId,
long userId,
long folderId,
String extension,
String mimeType,
String name,
String title,
String description)
throws Exception
- Throws:
Exception
addDLFileEntryMetadata
public DLFileEntryMetadata addDLFileEntryMetadata(long ddmStorageId,
long ddmStructureId,
long fileEntryId,
long fileVersionId)
throws Exception
- Throws:
Exception
addDLFileRank
public DLFileRank addDLFileRank(long groupId,
long companyId,
long userId,
long fileEntryId)
throws Exception
- Throws:
Exception
addDLFileVersion
public DLFileVersion addDLFileVersion(DLFileEntry dlFileEntry)
throws Exception
- Throws:
Exception
addDLFolder
public DLFolder addDLFolder(long groupId,
long companyId,
long userId,
long parentFolderId,
String name,
String description)
throws Exception
- Throws:
Exception
addDLSync
public DLSync addDLSync(long companyId,
long fileId,
long repositoryId,
long parentFolderId,
boolean typeFolder)
throws Exception
- Throws:
Exception
addGroup
public Group addGroup(long groupId,
long classNameId,
long classPK,
String name,
String friendlyURL,
boolean site)
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 rootMessageId,
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 companyId,
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
addResourcePermission
public List<ResourcePermission> addResourcePermission(long companyId,
String name,
String primKey)
throws Exception
- Throws:
Exception
addRolesPermissions
public List<KeyValuePair> addRolesPermissions(Resource resource,
List<Permission> permissions,
Role memberRole)
throws Exception
- Throws:
Exception
addSocialActivity
public SocialActivity addSocialActivity(long groupId,
long companyId,
long userId,
long classNameId,
long classPK)
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()
getCompany
public Company getCompany()
getCounters
public List<CounterModelImpl> getCounters()
getDDMContentClassName
public ClassName getDDMContentClassName()
getDefaultUser
public User getDefaultUser()
getDLFileEntryClassName
public ClassName getDLFileEntryClassName()
getGroupClassName
public ClassName getGroupClassName()
getGroups
public List<Group> getGroups()
getGuestGroup
public Group getGuestGroup()
getGuestRole
public Role getGuestRole()
getMBMessageClassName
public ClassName getMBMessageClassName()
getOrganizationAdministratorRole
public Role getOrganizationAdministratorRole()
getOrganizationOwnerRole
public Role getOrganizationOwnerRole()
getOrganizationUserRole
public Role getOrganizationUserRole()
getPowerUserRole
public Role getPowerUserRole()
getResourceCodes
public List<ResourceCode> getResourceCodes()
getRoleClassName
public ClassName getRoleClassName()
getRoles
public List<Role> getRoles()
getSiteAdministratorRole
public Role getSiteAdministratorRole()
getSiteMemberRole
public Role getSiteMemberRole()
getSiteOwnerRole
public Role getSiteOwnerRole()
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()