本文整理汇总了Java中com.liferay.portal.kernel.util.GetterUtil类的典型用法代码示例。如果您正苦于以下问题:Java GetterUtil类的具体用法?Java GetterUtil怎么用?Java GetterUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GetterUtil类属于com.liferay.portal.kernel.util包,在下文中一共展示了GetterUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateDeliverableTypeMappingData
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public Response updateDeliverableTypeMappingData(HttpServletRequest request, HttpHeaders header, Company company,
Locale locale, User user, ServiceContext serviceContext, long deliverableTypeId, String mappingData) {
// TODO Update FormReport of Deliverable Type
BackendAuth auth = new BackendAuthImpl();
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
DeliverableTypesActions action = new DeliverableTypesActionsImpl();
DeliverableType deliverableType = action.updateDeliverableTypeMappingData(groupId, deliverableTypeId,
mappingData, serviceContext);
DeliverableTypeDetailModel result = DeliverableTypesUtils.mappingToDeliverableTypesModel(deliverableType);
return Response.status(200).entity(result).build();
} catch (Exception e) {
return processException(e);
}
}
示例2: postProcessSearchQuery
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
@Override
public void postProcessSearchQuery(BooleanQuery searchQuery, BooleanFilter fullQueryBooleanFilter,
SearchContext searchContext) throws Exception {
boolean advancedSearch = GetterUtil.getBoolean(searchContext.getAttribute("advancedSearch"), false);
addSearchTerm(searchQuery, searchContext, "description", false);
if (!advancedSearch) {
addSearchTerm(searchQuery, searchContext, "workPackage", true);
}
// TODO: add ticketURL
LinkedHashMap<String, Object> params = (LinkedHashMap<String, Object>) searchContext.getAttribute("params");
if (params != null) {
String expandoAttributes = (String) params.get("expandoAttributes");
if (Validator.isNotNull(expandoAttributes)) {
addSearchExpando(searchQuery, searchContext, expandoAttributes);
}
}
}
示例3: getTaskRecords
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public static List<TaskRecord> getTaskRecords(Hits hits) {
List<Document> documents = ListUtil.toList(hits.getDocs());
List<TaskRecord> taskRecords = new ArrayList<TaskRecord>();
for (Document document : documents) {
try {
long taskRecordId = GetterUtil.getLong(document.get(Field.ENTRY_CLASS_PK));
TaskRecord taskRecord = TaskRecordLocalServiceUtil.getTaskRecord(taskRecordId);
taskRecords.add(taskRecord);
} catch (Exception e) {
if (_log.isErrorEnabled()) {
_log.error(e.getMessage());
}
}
}
return taskRecords;
}
示例4: ContactDisplayTerms
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public ContactDisplayTerms(PortletRequest portletRequest) {
super(portletRequest);
company = ParamUtil.getString(portletRequest, COMPANY);
contactId = ParamUtil.getString(portletRequest, CONTACT_ID);
createDate = ParamUtil.getString(portletRequest, CREATE_DATE);
email = ParamUtil.getString(portletRequest, EMAIL);
fax = ParamUtil.getString(portletRequest, FAX);
fullName = ParamUtil.getString(portletRequest, FULL_NAME);
// TODO: add default IMPP
name = ParamUtil.getString(portletRequest, NAME);
modifiedDate = ParamUtil.getString(portletRequest, MODIFIED_DATE);
String statusString = ParamUtil.getString(portletRequest, STATUS);
if (Validator.isNotNull(statusString)) {
status = GetterUtil.getInteger(statusString);
}
phone = ParamUtil.getString(portletRequest, PHONE);
userName = ParamUtil.getString(portletRequest, USER_NAME);
}
示例5: MeasurementDisplayTerms
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public MeasurementDisplayTerms(PortletRequest portletRequest) {
super(portletRequest);
createDate = ParamUtil.getString(portletRequest, CREATE_DATE);
data = ParamUtil.getString(portletRequest, DATA);
from = ParamUtil.getLong(portletRequest, FROM);
groupId = ParamUtil.getLong(portletRequest, GROUP_ID);
id = ParamUtil.getString(portletRequest, ID);
measurementId = ParamUtil.getLong(portletRequest, MEASUREMENT_ID);
modifiedDate = ParamUtil.getString(portletRequest, MODIFIED_DATE);
name = ParamUtil.getString(portletRequest, NAME);
String statusString = ParamUtil.getString(portletRequest, STATUS);
if (Validator.isNotNull(statusString)) {
status = GetterUtil.getInteger(statusString);
}
until = ParamUtil.getLong(portletRequest, UNTIL);
userName = ParamUtil.getString(portletRequest, USER_NAME);
}
示例6: buildSplittedQuery
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public BooleanQuery buildSplittedQuery(
JSONObject configurationObject, QueryParams queryParams)
throws Exception {
BooleanQuery query = new BooleanQueryImpl();
String keywordSplitter = configurationObject.getString("keywordSplitter");
String [] keywords = queryParams.getKeywords().split(keywordSplitter);
for (String keyword : keywords) {
WildcardQuery q = buildClause(configurationObject, keyword);
query.add(q, BooleanClauseOccur.SHOULD);
}
float boost = GetterUtil.getFloat(configurationObject.get("boost"), 1.0f);
query.setBoost(boost);
return query;
}
示例7: getFormReportByRegistrationTemplateId
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
@Override
public Response getFormReportByRegistrationTemplateId(HttpServletRequest request, HttpHeaders header,
Company company, Locale locale, User user, ServiceContext serviceContext, long registrationTemplateId) {
// TODO Get FormReport of RegistrationTemplates
BackendAuth auth = new BackendAuthImpl();
RegistrationTemplateFormReportInputUpdateModel result = new RegistrationTemplateFormReportInputUpdateModel();
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
RegistrationTemplates registrationTemplate = RegistrationTemplatesLocalServiceUtil
.getRegTempbyRegId(groupId, registrationTemplateId);
result.setFormReport(registrationTemplate.getFormReport());
return Response.status(200).entity(result).build();
} catch (Exception e) {
_log.error(e);
return processException(e);
}
}
示例8: mappingToStepRole
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public static List<RoleDataModel> mappingToStepRole(List<ProcessStepRole> stepRoles) {
List<RoleDataModel> outputs = new ArrayList<RoleDataModel>();
for (ProcessStepRole role : stepRoles) {
RoleDataModel model = new RoleDataModel();
model.setRoleId(GetterUtil.getInteger(role.getRoleId()));
model.setRoleName(_getRoleName(role.getRoleId()));
model.setCondition(role.getCondition());
model.setModerator(Boolean.toString(role.getModerator()));
outputs.add(model);
}
return outputs;
}
示例9: mappingToDossierTemplateList
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public static List<DossierTemplateDataModel> mappingToDossierTemplateList(List<Document> documents) {
List<DossierTemplateDataModel> outputs = new ArrayList<DossierTemplateDataModel>();
for (Document doc : documents) {
DossierTemplateDataModel model = new DossierTemplateDataModel();
model.setDossierTemplateId(GetterUtil.getLong(doc.get(Field.ENTRY_CLASS_PK)));
model.setCreateDate(doc.get(Field.CREATE_DATE));
model.setModifiedDate(doc.get(Field.MODIFIED_DATE));
model.setTemplateName(doc.get(DossierTemplateTerm.TEMPLATE_NAME));
model.setTemplateNo(doc.get(DossierTemplateTerm.TEMPLATE_NO));
model.setDescription(doc.get(DossierTemplateTerm.DESCRIPTION));
outputs.add(model);
}
return outputs;
}
示例10: getSampleDataByRegistrationTemplateId
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
@Override
public Response getSampleDataByRegistrationTemplateId(HttpServletRequest request, HttpHeaders header,
Company company, Locale locale, User user, ServiceContext serviceContext, long registrationTemplateId) {
// TODO Get SampleData of RegistrationTemplates
BackendAuth auth = new BackendAuthImpl();
RegistrationTemplateSampleDataInputUpdateModel result = new RegistrationTemplateSampleDataInputUpdateModel();
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
RegistrationTemplates registrationTemplate = RegistrationTemplatesLocalServiceUtil
.getRegTempbyRegId(groupId, registrationTemplateId);
result.setSampleData(registrationTemplate.getSampleData());
return Response.status(200).entity(result).build();
} catch (Exception e) {
_log.error(e);
return processException(e);
}
}
示例11: mappingToRegistrationTemplateModel
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public static RegistrationTemplateDetailModel mappingToRegistrationTemplateModel(
RegistrationTemplates registrationTemplates) {
if (registrationTemplates == null) {
return null;
}
long registrationTemplateId = GetterUtil.getLong(registrationTemplates.getRegistrationTemplateId());
RegistrationTemplateDetailModel model = new RegistrationTemplateDetailModel();
model.setRegistrationTemplateId(registrationTemplateId);
model.setGovAgencyCode(registrationTemplates.getGovAgencyCode());
model.setFormName(registrationTemplates.getFormName());
model.setFormNo(registrationTemplates.getFormNo());
model.setMultiple(registrationTemplates.getMultiple());
return model;
}
示例12: mappingToDeliverableTypesSearchByIdResultsModel
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
public static List<DossierLogSearchIdModel> mappingToDeliverableTypesSearchByIdResultsModel(
List<Document> documents) {
List<DossierLogSearchIdModel> outputs = new ArrayList<DossierLogSearchIdModel>();
for (Document document : documents) {
DossierLogSearchIdModel model = new DossierLogSearchIdModel();
long dossierLogId = GetterUtil.getLong(document.get("entryClassPK"));
// int notificationType =
// GetterUtil.getInteger(document.get(DossierLogTerm.NOTIFICATION_TYPE));
model.setDossierLogId(dossierLogId);
model.setAuthor(document.get(DossierLogTerm.AUTHOR));
model.setContent(document.get(DossierLogTerm.CONTENT));
model.setCreateDate(document.get(DossierLogTerm.CREATE_DATE));
model.setNotificationType(document.get(DossierLogTerm.NOTIFICATION_TYPE));
model.setPayload(document.get(DossierLogTerm.PAYLOAD));
outputs.add(model);
}
return outputs;
}
示例13: getformdatabyRegidRefid
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
@Override
public Response getformdatabyRegidRefid(HttpServletRequest request, HttpHeaders header, Company company,
Locale locale, User user, ServiceContext serviceContext, long registrationId, String referenceUid)
throws PortalException {
BackendAuth auth = new BackendAuthImpl();
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
RegistrationForm registrationForm = RegistrationFormLocalServiceUtil.findFormbyRegidRefid(groupId,
registrationId, referenceUid);
return Response.status(200).entity(registrationForm.getFormData()).build();
} catch (Exception e) {
return processException(e);
}
}
示例14: getStatisticByAgency
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
@Override
public Response getStatisticByAgency(HttpServletRequest request, HttpHeaders header, Company company, Locale locale,
User user, ServiceContext serviceContext) {
ServiceInfoActions actions = new ServiceInfoActionsImpl();
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
JSONObject results = JSONFactoryUtil.createJSONObject();
try {
results = actions.getStatisticByAdministration(serviceContext, groupId);
_log.info(results);
return Response.status(200).entity(JSONFactoryUtil.looseSerialize(results)).build();
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
error.setMessage("Forbidden.");
error.setCode(HttpURLConnection.HTTP_FORBIDDEN);
error.setDescription("Forbidden.");
return Response.status(HttpURLConnection.HTTP_FORBIDDEN).entity(error).build();
}
}
示例15: getRegistrationTemplatebyId
import com.liferay.portal.kernel.util.GetterUtil; //导入依赖的package包/类
@Override
public Response getRegistrationTemplatebyId(HttpServletRequest request, HttpHeaders header, Company company,
Locale locale, User user, ServiceContext serviceContext, String id) {
// TODO Get RegistrationTemplates by Id
BackendAuth auth = new BackendAuthImpl();
long groupId = GetterUtil.getLong(header.getHeaderString("groupId"));
try {
if (!auth.isAuth(serviceContext)) {
throw new UnauthenticationException();
}
RegistrationTemplates registrationTemplates = RegistrationTemplatesLocalServiceUtil
.getRegistrationTemplatebyId(groupId, id);
RegistrationTemplateDetailModel result = RegistrationTemplatesUtils
.mappingToRegistrationTemplateModel(registrationTemplates);
return Response.status(200).entity(result).build();
} catch (Exception e) {
_log.error(e);
return processException(e);
}
}