本文整理汇总了Java中com.liferay.portal.kernel.util.StringPool.BLANK属性的典型用法代码示例。如果您正苦于以下问题:Java StringPool.BLANK属性的具体用法?Java StringPool.BLANK怎么用?Java StringPool.BLANK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.liferay.portal.kernel.util.StringPool
的用法示例。
在下文中一共展示了StringPool.BLANK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doGetDocument
@Override
protected Document doGetDocument(DictGroup dictGroup) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, dictGroup);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(dictGroup.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, dictGroup.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(dictGroup.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(dictGroup.getUserName()));
document.addNumberSortable(DictGroupTerm.GROUP_ID, dictGroup.getGroupId());
document.addNumberSortable(DictGroupTerm.DICT_GROUPID, dictGroup.getDictGroupId());
document.addNumberSortable(DictGroupTerm.DICT_COLLECTIONID, dictGroup.getDictCollectionId());
document.addTextSortable(DictGroupTerm.GROUP_CODE, dictGroup.getGroupCode());
document.addTextSortable(DictGroupTerm.GROUP_NAME, dictGroup.getGroupName());
document.addTextSortable(DictGroupTerm.GROUP_NAME_EN, dictGroup.getGroupNameEN());
document.addTextSortable(DictGroupTerm.GROUP_DESCRIPTION, dictGroup.getGroupDescription());
DictCollection dictCollection = DictCollectionLocalServiceUtil.fetchDictCollection(dictGroup.getDictCollectionId());
String dictCollectionCode = Validator.isNotNull(dictCollection)?dictCollection.getCollectionCode():StringPool.BLANK;
document.addTextSortable(DictGroupTerm.DICT_COLLECTION_CODE, dictCollectionCode);
return document;
}
示例2: actionSaveGlobal
/**
* Saves the global aspect of the configuration
*
* @param request The request
* @param response The response
* @throws IOException If something goes wrong
* @throws PortletException If something goes wrong
*/
@ProcessAction(name = ACTION_NAME_SAVE_GLOBAL)
public void actionSaveGlobal(ActionRequest request, ActionResponse response) throws IOException, PortletException {
String redirectUrl = ParamUtil.get(request, FORM_FIELD_REDIRECT_URL, StringPool.BLANK);
String adtUuid = ParamUtil.get(request, FORM_FIELD_ADT_UUID, StringPool.BLANK);
boolean doSearchOnStartup = ParamUtil.getBoolean(request, FORM_FIELD_DO_SEARCH_ON_STARTUP, false);
if (!PATTERN_UUID.matcher(adtUuid).matches()) {
adtUuid = StringPool.BLANK;
}
String doSearchOnStartupKeywords = ParamUtil.getString(request, FORM_FIELD_DO_SEARCH_ON_STARTUP_KEYWORDS, FlashlightSearchService.CONFIGURATION_DEFAULT_SEARCH_KEYWORDS);
this.searchService.saveGlobalSettings(adtUuid, doSearchOnStartup, doSearchOnStartupKeywords, request.getPreferences());
SessionMessages.add(request, SESSION_MESSAGE_CONFIG_SAVED);
if (!redirectUrl.isEmpty()) {
response.sendRedirect(redirectUrl);
}
}
示例3: getTitlePattern
@Override
protected String getTitlePattern(String groupName, SocialActivity activity) {
_log.info("getTitlePattern");
int activityType = activity.getType();
if (activityType == TaskRecordActivityKeys.ADD_TASK_RECORD) {
if (Validator.isNull(groupName)) {
return "activity-task-record-add-task-record";
} else {
return "activity-task-record-add-task-record-in";
}
} else if (activityType == SocialActivityConstants.TYPE_MOVE_TO_TRASH) {
if (Validator.isNull(groupName)) {
return "activity-task-record-move-to-trash";
} else {
return "activity-task-record-move-to-trash-in";
}
} else if (activityType == SocialActivityConstants.TYPE_RESTORE_FROM_TRASH) {
if (Validator.isNull(groupName)) {
return "activity-task-record-restore-from-trash";
} else {
return "activity-task-record-restore-from-trash-in";
}
} else if (activityType == TaskRecordActivityKeys.UPDATE_TASK_RECORD) {
if (Validator.isNull(groupName)) {
return "activity-task-record-update-task-record";
} else {
return "activity-task-record-update-task-record-in";
}
}
return StringPool.BLANK;
}
示例4: clone
@GET
@Path("/{className}/{classPK}/cloning/{sourcePK}")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response clone(@Context HttpServletRequest request, @Context HttpHeaders header,
@Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
@DefaultValue(StringPool.BLANK) @PathParam("className") String className, @DefaultValue(StringPool.BLANK) @PathParam("classPK") String classPK,
@DefaultValue(StringPool.BLANK) @PathParam("sourcePK") String sourcePK);
示例5: doGetDocument
@Override
protected Document doGetDocument(ResourceUser resourceUser) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, resourceUser);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(resourceUser.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, resourceUser.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(resourceUser.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(resourceUser.getUserName()));
document.addNumberSortable(ResourceUserTerm.GROUP_ID, resourceUser.getGroupId());
document.addNumberSortable(ResourceUserTerm.RESOURCEUSER_ID, resourceUser.getResourceUserId());
document.addTextSortable(ResourceUserTerm.CLASS_NAME, resourceUser.getClassName());
document.addTextSortable(ResourceUserTerm.CLASS_PK, resourceUser.getClassPK());
document.addNumberSortable(ResourceUserTerm.TO_USERID, resourceUser.getToUserId());
document.addTextSortable("selected", Boolean.TRUE.toString());
User user = UserLocalServiceUtil.fetchUser(resourceUser.getToUserId());
String userName = StringPool.BLANK;
String email = StringPool.BLANK;
if(Validator.isNotNull(user)){
userName = user.getFullName();
email = user.getEmailAddress();
}
document.addTextSortable(ResourceUserTerm.TO_USERNAME, userName);
document.addTextSortable(ResourceUserTerm.EMAIL, email);
document.addTextSortable(ResourceUserTerm.USERCLASS, Employee.class.getName());
return document;
}
示例6: getResourceRoles
@GET
@Path("/{className}/{classPK}")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response getResourceRoles(@Context HttpServletRequest request, @Context HttpHeaders header,
@Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
@DefaultValue(StringPool.BLANK) @PathParam("className") String className, @DefaultValue(StringPool.BLANK) @PathParam("classPK") String classPK,
@BeanParam DataSearchModel query);
示例7: mappingToDetail
public static ServiceProcessDetailModel mappingToDetail(ServiceProcess serviceProcess) {
ServiceProcessDetailModel output = new ServiceProcessDetailModel();
output.setServiceProcessId(GetterUtil.getInteger(serviceProcess.getPrimaryKey()));
output.setCreateDate(APIDateTimeUtils.convertDateToString(serviceProcess.getCreateDate(),
APIDateTimeUtils._NORMAL_PARTTERN));
output.setModifiedDate(APIDateTimeUtils.convertDateToString(serviceProcess.getModifiedDate(),
APIDateTimeUtils._NORMAL_PARTTERN));
output.setProcessNo(serviceProcess.getProcessNo());
output.setProcessName(serviceProcess.getProcessName());
output.setDescription(serviceProcess.getDescription());
output.setDurationCount(serviceProcess.getDurationCount());
output.setDurationUnit(serviceProcess.getDurationUnit());
output.setCounter(GetterUtil.getInteger(serviceProcess.getCounter()));
output.setGenerateDossierNo(Boolean.toString(serviceProcess.getGenerateDossierNo()));
output.setDossierNoPattern(serviceProcess.getDossierNoPattern());
output.setGenerateDueDate(Boolean.toString(serviceProcess.getGenerateDueDate()));
output.setDueDatePattern(serviceProcess.getDueDatePattern());
output.setGeneratePassword(Boolean.toString(serviceProcess.getGeneratePassword()));
output.setDirectNotification(Boolean.toString(serviceProcess.getDirectNotification()));
output.setServerNo(serviceProcess.getServerNo());
ServerConfig server = ServerConfigLocalServiceUtil.getByCode(serviceProcess.getServerNo());
String serverName = StringPool.BLANK;
if (Validator.isNotNull(server))
serverName = server.getServerName();
output.setServerName(serverName);
return output;
}
示例8: getStepName
private String getStepName(long groupId, String stepCode, long serviceProcessId) {
String sName = StringPool.BLANK;
ProcessStep step = ProcessStepLocalServiceUtil.fetchBySC_GID(stepCode, groupId, serviceProcessId);
if (Validator.isNotNull(step)) {
sName = step.getStepName();
}
return sName;
}
示例9: mapperUserModel
public static UserModel mapperUserModel(User user, long groupId) {
UserModel ett = new UserModel();
try {
Employee employee = EmployeeLocalServiceUtil.fetchByF_mappingUserId(groupId, user.getUserId());
ett.setUserId(user.getUserId());
ett.setScreenName(user.getScreenName());
ett.setEmail(user.getEmailAddress());
String fullName = StringPool.BLANK;
String contactEmail = StringPool.BLANK;
String contactTelNo = StringPool.BLANK;
String className = StringPool.BLANK;
String classPK = StringPool.BLANK;
if(Validator.isNotNull(employee)){
className = Employee.class.getName();
classPK = String.valueOf(employee.getEmployeeId());
fullName = employee.getFullName();
contactEmail = employee.getEmail();
contactTelNo = employee.getTelNo();
}
ett.setClassName(className);
ett.setClassPK(classPK);
ett.setFullName(fullName);
ett.setContactEmail(contactEmail);
ett.setContactTelNo(contactTelNo);
} catch (Exception e) {
_log.error(e);
}
return ett;
}
示例10: getDossierNote
private String getDossierNote(String serviceInfoCode, String govAgencyCode, String dossierTemplateNo,
long groupId) {
String dossierNote = StringPool.BLANK;
ServiceInfo serviceInfo = serviceInfoPersistence.fetchBySC_GI(serviceInfoCode, groupId);
try {
ServiceConfig config = ServiceConfigLocalServiceUtil.getBySICodeAndGAC(groupId, serviceInfoCode,
govAgencyCode);
ProcessOption option = ProcessOptionLocalServiceUtil.getByDTPLNoAndServiceCF(groupId, dossierTemplateNo,
config.getServiceConfigId());
dossierNote = option.getInstructionNote();
if (Validator.isNull(dossierNote)) {
throw new Exception();
}
} catch (Exception e) {
if (Validator.isNotNull(serviceInfo)) {
dossierNote = serviceInfo.getProcessText();
}
}
return dossierNote;
}
示例11: doGetDocument
@Override
protected Document doGetDocument(EmployeeJobPos employeeJobPos) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, employeeJobPos);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(employeeJobPos.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, employeeJobPos.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(employeeJobPos.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(employeeJobPos.getUserName()));
document.addNumberSortable(EmployeeJobPosTerm.GROUP_ID, employeeJobPos.getGroupId());
document.addNumberSortable(EmployeeJobPosTerm.EMPLOYEE_JOBPOST_ID, employeeJobPos.getEmployeeJobPosId());
document.addNumberSortable(EmployeeJobPosTerm.EMPLOYEE_ID, employeeJobPos.getEmployeeId());
document.addNumberSortable(EmployeeJobPosTerm.JOBPOST_ID, employeeJobPos.getJobPostId());
document.addNumberSortable(EmployeeJobPosTerm.WORKING_UNIT_ID, employeeJobPos.getWorkingUnitId());
WorkingUnit workingUnit = WorkingUnitLocalServiceUtil.fetchWorkingUnit(employeeJobPos.getWorkingUnitId());
document.addTextSortable(EmployeeJobPosTerm.WORKING_UNIT_NAME, Validator.isNotNull(workingUnit)?workingUnit.getName():StringPool.BLANK);
String title = StringPool.BLANK;
int leader = 0;
JobPos jobPos = JobPosLocalServiceUtil.fetchJobPos(employeeJobPos.getJobPostId());
if(Validator.isNotNull(jobPos)){
title = jobPos.getTitle();
leader = jobPos.getLeader();
}
document.addTextSortable(EmployeeJobPosTerm.JOBPOST_TITLE, title);
document.addNumberSortable(EmployeeJobPosTerm.LEADER, leader);
return document;
}
示例12: _getRoleName
private static String _getRoleName(long roleId) {
String roleName = StringPool.BLANK;
try {
Role role = RoleLocalServiceUtil.getRole(roleId);
roleName = role.getName();
} catch (Exception e) {
}
return roleName;
}
示例13: SplitName
public SplitName(String fullName, String lastName) {
_firstName = StringPool.BLANK;
_lastName = StringPool.BLANK;
_midName = StringPool.BLANK;
if (Validator.isNotNull(fullName)) {
this.setLastName(lastName);
this.setFirstName(fullName);
this.setMidName(StringPool.BLANK);
}
}
示例14: getLogo
@Override
public Response getLogo(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user,
ServiceContext serviceContext, long id) {
WorkingUnitInterface actions = new WorkingUnitActions();
try {
File file = actions.getLogo(id, serviceContext);
FileEntry fileEntry = actions.getFileEntry(id, serviceContext);
String fileName = Validator.isNotNull(fileEntry) ? fileEntry.getFileName() : StringPool.BLANK;
ResponseBuilder responseBuilder = Response.ok((Object) file);
responseBuilder.header("Content-Disposition", "attachment; filename=\"" + fileName + "\"")
.header("Content-Type", fileEntry.getMimeType());
return responseBuilder.build();
} catch (Exception e) {
ErrorMsg error = new ErrorMsg();
error.setMessage("file not found!");
error.setCode(404);
error.setDescription("file not found!");
return Response.status(404).entity(error).build();
}
}
示例15: updateDossierAction
@Indexable(type = IndexableType.REINDEX)
public DossierAction updateDossierAction(long groupId, long dossierActionId, long dossierId, long serviceProcessId,
long previousActionId, String actionCode, String actionUser, String actionName, String actionNote,
int actionOverdue, String syncActionCode, boolean pending, boolean rollbackable, String stepCode,
String stepName, Date dueDate, long nextActionId, String payload, String stepInstruction,
ServiceContext context) throws PortalException {
validateUpdateAction(groupId, dossierActionId, dossierId, serviceProcessId, previousActionId, actionCode,
actionUser, actionName, actionNote, actionOverdue, syncActionCode, pending, rollbackable, stepCode,
stepName, dueDate, nextActionId, payload, stepInstruction);
DossierAction object = null;
long userId = 0l;
String fullName = StringPool.BLANK;
Date now = new Date();
if (context.getUserId() > 0) {
User userAction = userLocalService.getUser(context.getUserId());
userId = userAction.getUserId();
fullName = userAction.getFullName();
}
if (dossierActionId == 0) {
dossierActionId = counterLocalService.increment(DossierAction.class.getName());
object = dossierActionPersistence.create(dossierActionId);
// Add audit fields
object.setCompanyId(context.getCompanyId());
object.setGroupId(groupId);
object.setCreateDate(now);
object.setModifiedDate(now);
object.setUserId(userId);
object.setUserName(fullName);
object.setDossierId(dossierId);
object.setServiceProcessId(serviceProcessId);
object.setPreviousActionId(previousActionId);
object.setActionCode(actionCode);
object.setActionUser(actionUser);
object.setActionName(actionName);
object.setActionNote(actionNote);
object.setActionOverdue(actionOverdue);
object.setSyncActionCode(syncActionCode);
object.setPending(pending);
object.setRollbackable(rollbackable);
object.setStepCode(stepCode);
object.setStepName(stepName);
object.setDueDate(dueDate);
object.setNextActionId(nextActionId);
object.setPayload(payload);
object.setStepInstruction(stepInstruction);
// Add DossierActionId to Dossier
// TODO add Indexer for Dossier after update DossierAction
Dossier dossier = dossierPersistence.fetchByPrimaryKey(dossierId);
dossier.setDossierActionId(dossierActionId);
dossierPersistence.update(dossier);
Indexer<Dossier> indexer = IndexerRegistryUtil.nullSafeGetIndexer(Dossier.class);
try {
indexer.reindex(dossier);
} catch (SearchException e) {
e.printStackTrace();
}
} else {
}
dossierActionPersistence.update(object);
return object;
}