当前位置: 首页>>代码示例>>Java>>正文


Java StringPool.BLANK属性代码示例

本文整理汇总了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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:25,代码来源:DictGroupIndexer.java

示例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);
    }
}
 
开发者ID:savoirfairelinux,项目名称:flashlight-search,代码行数:26,代码来源:FlashlightSearchPortlet.java

示例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;
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:36,代码来源:TaskRecordActivityInterpreter.java

示例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);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:8,代码来源:ResourceRoleManagement.java

示例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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:34,代码来源:ResourceUserIndexer.java

示例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);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:8,代码来源:ResourceRoleManagement.java

示例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;


}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:35,代码来源:ServiceProcessUtils.java

示例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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:10,代码来源:ProcessActionIndexer.java

示例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;
	}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:38,代码来源:UserUtils.java

示例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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:29,代码来源:DossierLocalServiceImpl.java

示例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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:34,代码来源:EmployeeJobPosIndexer.java

示例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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:10,代码来源:ServiceProcessUtils.java

示例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);
			}
		}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:12,代码来源:UserMgtUtils.java

示例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();
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:29,代码来源:WorkingUnitManagementImpl.java

示例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;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:81,代码来源:DossierActionLocalServiceImpl.java


注:本文中的com.liferay.portal.kernel.util.StringPool.BLANK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。