public class CustomOrgServiceHandler extends Object
Constructor and Description |
---|
CustomOrgServiceHandler() |
Modifier and Type | Method and Description |
---|---|
static AHOrg |
addOrganisation(long companyId,
long userId,
long groupId,
RegistrationForm form)
Add (or update) an organisation
|
static AHOrg |
addOrganisation(long companyId,
long userId,
long groupId,
String owner,
String name,
String holder,
String descr,
String legalStatus,
String street,
String streetNumber,
String city,
String country,
int zip,
String tel,
String fax,
String mail,
String web,
org.springframework.web.multipart.commons.CommonsMultipartFile logo,
float coordsLat,
float coordsLon)
Add (or update) an organisation)
|
static void |
deleteOrganisation(Long orgId)
Delete an organisation by its ID
|
static RegistrationForm |
getOrganisation(AHOrg org)
Get the form object for a given organisation
|
static RegistrationForm |
getOrganisation(long orgId)
Get an organisation's form object by its ID
|
static RegistrationForm |
getOrganisationForEdit(long orgId)
Get an organisation's form object by its ID for editing purpose
This method should be used only for editing form-data in the view, as it
replaces some human-readable fields (i.e.
|
static byte[] |
getOrganisationsAsCsv()
Get a list of organisations as CSV (UTF-8).
|
static AHOrg |
getOrgByLiferayUser(com.liferay.portal.theme.ThemeDisplay tDisplay)
Get the organisation that is bound to the current Liferay user
|
static long |
getOrgIdByLiferayUser(com.liferay.portal.theme.ThemeDisplay tDisplay)
Get the ID of the organisation bound to the current Liferay user
|
static boolean |
isOrgOwner(long orgId,
String userMail)
Check if the provided email-address is an owner of the given organisation
|
static String |
updateLogo(long companyId,
long userId,
long groupId,
long orgId,
byte[] logoData,
String logoName) |
static String |
updateLogo(long companyId,
long userId,
long groupId,
long orgId,
org.springframework.web.multipart.commons.CommonsMultipartFile logo) |
public static AHOrg addOrganisation(long companyId, long userId, long groupId, RegistrationForm form)
companyId
- the company iduserId
- the user idgroupId
- the group idform
- the form objectpublic static AHOrg addOrganisation(long companyId, long userId, long groupId, String owner, String name, String holder, String descr, String legalStatus, String street, String streetNumber, String city, String country, int zip, String tel, String fax, String mail, String web, org.springframework.web.multipart.commons.CommonsMultipartFile logo, float coordsLat, float coordsLon)
companyId
- the company iduserId
- the user idgroupId
- the group idowner
- the owner of the organisationname
- the organisation nameholder
- the holder of the organisationdescr
- the description of the organisationlegalStatus
- the legal status of the organisationstreet
- the street address of the organisation's contactstreetNumber
- the street number of the organisation's contactcity
- the city of the organisation's contactcountry
- the country of the organisation's contactzip
- the zip of the organisation's contacttel
- the telephone number of the organisation's contactfax
- the fax of the organisation's contactmail
- the email address of the organisation's contactweb
- the URL of the organisation's contactlogo
- the logo of the organisation (or null)public static void deleteOrganisation(Long orgId)
orgId
- the organisation's IDpublic static RegistrationForm getOrganisation(AHOrg org)
org
- the organisation modelpublic static RegistrationForm getOrganisation(long orgId)
orgId
- the organisation's IDpublic static RegistrationForm getOrganisationForEdit(long orgId)
orgId
- the organisation's IDpublic static byte[] getOrganisationsAsCsv()
public static AHOrg getOrgByLiferayUser(com.liferay.portal.theme.ThemeDisplay tDisplay)
tDisplay
- the theme display of the current sessionpublic static long getOrgIdByLiferayUser(com.liferay.portal.theme.ThemeDisplay tDisplay)
tDisplay
- the theme display of the current sessionpublic static boolean isOrgOwner(long orgId, String userMail)
orgId
- ID of the organisationuserMail
- email address of the userpublic static String updateLogo(long companyId, long userId, long groupId, long orgId, org.springframework.web.multipart.commons.CommonsMultipartFile logo)
Copyright © 2016 Fraunhofer FOKUS. All rights reserved.