• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Parameter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.kuali.rice.coreservice.api.parameter.Parameter的典型用法代码示例。如果您正苦于以下问题:Java Parameter类的具体用法?Java Parameter怎么用?Java Parameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Parameter类属于org.kuali.rice.coreservice.api.parameter包,在下文中一共展示了Parameter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: update

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@RequestMapping(params = "methodToCall=update")
public ModelAndView update(@ModelAttribute("KualiForm") UifFormBase form) {
    ParameterForm parameterForm = (ParameterForm) form;

    String applicationId = KRADConstants.DEFAULT_PARAMETER_APPLICATION_ID;
    String namespaceCode = parameterForm.getNamespaceCode();
    String componentCode = parameterForm.getComponentCode();
    String parameterName = parameterForm.getParameterName();

    Parameter parameter = null;

    if (StringUtils.isNotBlank(applicationId) && StringUtils.isNotBlank(namespaceCode)
        && StringUtils.isNotBlank(componentCode) && StringUtils.isNotBlank(parameterName)) {
        ParameterKey key = ParameterKey.create(applicationId, namespaceCode, componentCode, parameterName);
        parameter = CoreServiceApiServiceLocator.getParameterRepositoryService().getParameter(key);
    }

    if (parameter != null) {
        Parameter.Builder builder = Parameter.Builder.create(parameter);
        builder.setValue(parameterForm.getParameterValue());

        CoreServiceApiServiceLocator.getParameterRepositoryService().updateParameter(builder.build());
    }

    return getModelAndView(form);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:ParameterController.java


示例2: testRetrieveParameter

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@Test
/**
 * tests {@link org.kuali.rice.coreservice.framework.parameter.ParameterService#getParameter(String, String, String)}
 */
public void testRetrieveParameter() throws Exception {
	String namespaceCode = "KR-NS";
	String parameterDetailTypeCode = "Lookup";
	String parameterName = "RESULTS_LIMIT";
	String parameterValue = "200";
	
	Parameter resultsLimitParam = CoreFrameworkServiceLocator.getParameterService().getParameter(namespaceCode, parameterDetailTypeCode, parameterName);
	assertNotNull("RESULTS_LIMIT should be non-null", resultsLimitParam);
	assertEquals(parameterValue, resultsLimitParam.getValue());
	
	String detailType = resultsLimitParam.getComponentCode();
	assertNotNull("Should have a detail type: " + detailType);
	
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:ParameterServiceTest.java


示例3: getRecordsPerPage

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
public int getRecordsPerPage() {
	if ( recordsPerPage == -1 ) {
		Parameter param = CoreFrameworkServiceLocator.getParameterService().getParameter(KimConstants.NAMESPACE_CODE, KRADConstants.DetailTypes.DOCUMENT_DETAIL_TYPE, MAX_MEMBERS_PER_PAGE_PARM);
		if ( param != null ) {
			try {
				recordsPerPage = Integer.parseInt( param.getValue() );
			} catch ( NumberFormatException ex ) {
				LOG.error( "Unable to parse parameter " + KimConstants.NAMESPACE_CODE+"/"+ KRADConstants.DetailTypes.DOCUMENT_DETAIL_TYPE+"/"+MAX_MEMBERS_PER_PAGE_PARM + "(+"+param.getValue()+") as an int - defaulting to 1." );
				recordsPerPage = 1;
			}
		} else {
			LOG.error( "Unable to find " + KimConstants.NAMESPACE_CODE+"/"+ KRADConstants.DetailTypes.DOCUMENT_DETAIL_TYPE+"/"+MAX_MEMBERS_PER_PAGE_PARM + " - defaulting to 1." );
			recordsPerPage = 1;
		}
	}
	return recordsPerPage;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:IdentityManagementDocumentFormBase.java


示例4: testParameterServiceImpl

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@Test
public void testParameterServiceImpl() throws Exception{
    setupParameterBoDataObjectAndSave();
    ParameterKey parameterKey = ParameterKey.create(APP_ID, "TST_NM_SPACE", "TST", "TST_PARAM");

    Parameter parameter = CoreServiceApiServiceLocator.getParameterRepositoryService().
            getParameter(parameterKey);
    assertTrue("Parameter fetched correctly after save", parameter != null &&
            StringUtils.equals(parameter.getName(),"TST_PARAM"));
    String value = CoreServiceApiServiceLocator.getParameterRepositoryService().getParameterValueAsString(parameterKey);
    assertTrue("Parameter value fetched correctly", StringUtils.equals(parameter.getValue(),value));
    ParameterBo modifiedParam = ParameterBo.from(parameter);
    modifiedParam.setValue("new value");
    CoreServiceApiServiceLocator.getParameterRepositoryService().updateParameter(ParameterBo.to(modifiedParam));
    value = CoreServiceApiServiceLocator.getParameterRepositoryService().getParameterValueAsString(parameterKey);
    assertTrue("Parameter value fetched correctly", StringUtils.equals(modifiedParam.getValue(),value));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:CoreServiceJpaDataTest.java


示例5: createParameter

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@Override
@Transactional
public Parameter createParameter(Parameter parameter) {
    if (parameter == null) {
        throw new RiceIllegalArgumentException("parameter is null");
    }

    final ParameterKey key = ParameterKey.create(parameter.getApplicationId(), parameter.getNamespaceCode(), parameter.getComponentCode(), parameter.getName());
    final Parameter existing = getParameter(key);
    if (existing != null && existing.getApplicationId().equals(parameter.getApplicationId())) {
        throw new RiceIllegalStateException("the parameter to create already exists: " + parameter);
    }
    //Parameter flush needed here to accomodate the fact that the version number is not set until flush
    //and the immediate transform of the object loses its JPA context
    ParameterBo parameterBo = getDataObjectService().save(ParameterBo.from(parameter), PersistenceOption.FLUSH);
    return ParameterBo.to(parameterBo);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:ParameterRepositoryServiceImpl.java


示例6: updateParameter

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@Override
@Transactional
public Parameter updateParameter(Parameter parameter) {
    if (parameter == null) {
        throw new RiceIllegalArgumentException("parameter is null");
    }

    final ParameterKey key = ParameterKey.create(parameter.getApplicationId(), parameter.getNamespaceCode(), parameter.getComponentCode(), parameter.getName());
    final Parameter existing = getParameter(key);
    if (existing == null) {
        throw new RiceIllegalStateException("the parameter does not exist: " + parameter);
    }

    final Parameter toUpdate;
    if (!existing.getApplicationId().equals(parameter.getApplicationId())) {
        final Parameter.Builder builder = Parameter.Builder.create(parameter);
        builder.setApplicationId(existing.getApplicationId());
        toUpdate = builder.build();
    } else {
        toUpdate = parameter;
    }
    return ParameterBo.to(getDataObjectService().save(ParameterBo.from(toUpdate)));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:24,代码来源:ParameterRepositoryServiceImpl.java


示例7: findParameters

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@Override
public ParameterQueryResults findParameters(QueryByCriteria queryByCriteria) {
       if (queryByCriteria == null) {
           throw new RiceIllegalArgumentException("queryByCriteria is null");
       }

       QueryResults<ParameterBo> results = dataObjectService.findMatching(ParameterBo.class, queryByCriteria);

       ParameterQueryResults.Builder builder = ParameterQueryResults.Builder.create();
       builder.setMoreResultsAvailable(results.isMoreResultsAvailable());
       builder.setTotalRowCount(results.getTotalRowCount());

       final List<Parameter> ims = new ArrayList<Parameter>();
       for (ParameterBo bo : results.getResults()) {
           ims.add(ParameterBo.to(bo));
       }

       builder.setResults(ims);
       return builder.build();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:ParameterRepositoryServiceImpl.java


示例8: initialize

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
/**
    * {@inheritDoc}
    */
@Override
public synchronized void initialize() {
	checkState(!initialized, "Already initialized");

	parameterService = CoreFrameworkServiceLocator.getParameterService();

	Optional<Parameter> parameter = Optional.fromNullable(parameterService.getParameter(namespace, component, name));
	if (!parameter.isPresent() && runOnMissingParameter) {
		parameter = Optional.of(createParameter());
	}
	runonce = isRunOnce(parameter);
	showConfig(parameter);

	initialized = true;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:ParameterServiceRunOnce.java


示例9: lockUnlockDocuments

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
private void lockUnlockDocuments(boolean locked) {
    for (String documentType : lockedDocuments) {
        Class<? extends Document> documentClass = dataDictionaryService.getDocumentClassByTypeName(documentType);
        if (parameterService.parameterExists(documentClass, OLEConstants.DOCUMENT_LOCKOUT_PARM_NM)) {
            Parameter existingParam = parameterService.getParameter(documentClass, OLEConstants.DOCUMENT_LOCKOUT_PARM_NM);
            Parameter.Builder updatedParam = Builder.create(existingParam);
            updatedParam.setValue(locked ? "Y" : "N");
            parameterService.updateParameter(updatedParam.build());
        } else {
            String namespace = KRADServiceLocatorWeb.getKualiModuleService().getNamespaceCode(documentClass);
            String detailType = KRADServiceLocatorWeb.getKualiModuleService().getComponentCode(documentClass);
            Parameter.Builder newParam = Builder.create(OLEConstants.APPLICATION_NAMESPACE_CODE, namespace, detailType, OLEConstants.DOCUMENT_LOCKOUT_PARM_NM, ParameterType.Builder.create(OleParameterConstants.PARAMETER_CONFIG_TYPE_CODE));
            newParam.setValue("Y");
            newParam.setDescription(OLEConstants.DOCUMENT_LOCKOUT_PARM_DESC);
            parameterService.createParameter(newParam.build());
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:19,代码来源:PdpExtractServiceImpl.java


示例10: buildRunParameterSearchKeyMap

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
/**
 * Used by setInitiatedRunParameter to build a Map of search keys to obtain the exact needed Run parameter from the database.
 *
 * @return A Map<String,Object> where the Objects are the attributes of the Run parameter
 */
private Map<String, Object> buildRunParameterSearchKeyMap() {
    Map<String, Object> pkMapForParameter = new HashMap<String, Object>();

    // Set up a list of all the field names and values of the fields in the Parameter object.
    Map<String, Object> fieldNamesValuesForParameter = new HashMap<String, Object>();
    fieldNamesValuesForParameter.put("parameterNamespaceCode", PurapConstants.PURAP_NAMESPACE);
    fieldNamesValuesForParameter.put("parameterDetailTypeCode", RUN_INDICATOR_PARAMETER_NAMESPACE_STEP);
    fieldNamesValuesForParameter.put("parameterName", Job.STEP_RUN_PARM_NM);
    fieldNamesValuesForParameter.put("parameterConstraintCode", RUN_INDICATOR_PARAMETER_ALLOWED);
    fieldNamesValuesForParameter.put("parameterTypeCode", RUN_INDICATOR_PARAMETER_TYPE);

    // get the primary keys and assign them to values
    List<String> parameterPKFields = psService.getPrimaryKeys(Parameter.class);
    for (String pkFieldName : parameterPKFields) {
        pkMapForParameter.put(pkFieldName, fieldNamesValuesForParameter.get(pkFieldName));
    }
    return pkMapForParameter;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:24,代码来源:PurapMassRequisitionStep.java


示例11: loadDefaultIngestProfile

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
public List<String> loadDefaultIngestProfile( boolean forceLoad ) throws Exception {
    if ( forceLoad || parameterService.getParameterValueAsBoolean(OLEConstants.DLVR_NMSPC,  OLEConstants.DLVR_CMPNT,  LOAD_DEFAULT_INGEST_POLICIES_IND, Boolean.TRUE) ) {
        LOG.info("Starting Load of Default Ingest Profiles");
        URL resource = getClass().getResource(fileName);
        File file = new File(resource.toURI());
        String fileContent = new FileUtil().readFile(file);
        List<String> policies= oleKrmsBuilder.persistKrmsFromFileContent(fileContent);
        LOG.info("Completed Load of Default Ingest Profiles");

        Parameter existingParameter = parameterService.getParameter(OLEConstants.DLVR_NMSPC,  OLEConstants.DLVR_CMPNT,  LOAD_DEFAULT_INGEST_POLICIES_IND);
        if ( existingParameter != null ) {
            Parameter.Builder updatedParameter = Parameter.Builder.create(existingParameter);
            updatedParameter.setValue("N");
            parameterService.updateParameter(updatedParameter.build());
        } else {
            Parameter.Builder newParameter = Parameter.Builder.create(OLEConstants.APPL_ID, OLEConstants.DLVR_NMSPC,  OLEConstants.DLVR_CMPNT,  LOAD_DEFAULT_INGEST_POLICIES_IND, ParameterType.Builder.create("CONFG"));
            newParameter.setDescription( "Set to 'Y' to have the application ingest the default circulation policies upon next startup." );
            newParameter.setValue("N");
            parameterService.createParameter(newParameter.build());
        }

        return policies;
    }
    return Collections.emptyList();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:26,代码来源:LoadDefaultIngestProfileBean.java


示例12: unpackWorkflows

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
public void unpackWorkflows( boolean forceLoad ) {
    if ( forceLoad || parameterService.getParameterValueAsBoolean(OLEConstants.OLE_NMSPC,  OLEConstants.OLE_CMPNT,  LOAD_DEFAULT_WORKFLOW_IND, Boolean.TRUE) ) {

        LOG.info("Starting Load of Default Workflows");
        workflowFileHandler.execute();
        LOG.info("Completed Load of Default Workflows");

        Parameter existingParameter = parameterService.getParameter(OLEConstants.OLE_NMSPC,  OLEConstants.OLE_CMPNT,  LOAD_DEFAULT_WORKFLOW_IND);
        if ( existingParameter != null ) {
            Parameter.Builder updatedParameter = Parameter.Builder.create(existingParameter);
            updatedParameter.setValue("N");
            parameterService.updateParameter(updatedParameter.build());
        } else {
            Parameter.Builder newParameter = Parameter.Builder.create(OLEConstants.APPL_ID, OLEConstants.OLE_NMSPC,  OLEConstants.OLE_CMPNT,  LOAD_DEFAULT_WORKFLOW_IND, ParameterType.Builder.create("CONFG"));
            newParameter.setDescription( "Set to 'Y' to have the application ingest the default circulation policies upon next startup." );
            newParameter.setValue("N");
            parameterService.createParameter(newParameter.build());
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:21,代码来源:LoadDefaultWorkflowsBean.java


示例13: testValidateAccountingInfo

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
/**
 *
 * This method tests {@link ExpenseImportByTravelerService#validateAccountingInfo(TemProfile, AgencyStagingData)}
 */
@Test
@ConfigureContext(shouldCommitTransactions = false)
public void testValidateAccountingInfo() {
    AgencyStagingData agency = createAgencyStagingData();
    TemProfile profile = createTemProfile();
    // parameter is defaulted to 6000, but there are no valid combos that
    // will work with 6000. Set it to 5000 for testing purposes.
    Parameter param = parameterService.getParameter(TemParameterConstants.TEM_ALL.class, AgencyMatchProcessParameter.TRAVEL_CREDIT_CARD_AIRFARE_OBJECT_CODE);
    Parameter.Builder builder = Parameter.Builder.create(param);
    builder.setValue("5000");
    parameterService.updateParameter(builder.build());

    // success case
    expenseImportByTravelerService.validateAccountingInfo(agency);
    assertTrue(agency.getErrorCode().equals(AgencyStagingDataErrorCodes.AGENCY_NO_ERROR));
    assertTrue(agency.getTripAccountingInformation().size()==1);
    TripAccountingInformation accountingInfo = agency.getTripAccountingInformation().get(0);
    assertTrue(StringUtils.equals(accountingInfo.getTripAccountNumber(), profile.getDefaultAccount()));
    assertTrue(StringUtils.equals(accountingInfo.getTripSubAccountNumber(), profile.getDefaultSubAccount()));
    assertTrue(StringUtils.equals(accountingInfo.getProjectCode(), profile.getDefaultProjectCode()));
}
 
开发者ID:kuali,项目名称:kfs,代码行数:26,代码来源:ExpenseImportByTravelerServiceTest.java


示例14: lockUnlockDocuments

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
private void lockUnlockDocuments(boolean locked) {
    for(String documentType : lockedDocuments) {
        Class<? extends Document> documentClass = dataDictionaryService.getDocumentClassByTypeName(documentType);
        if(parameterService.parameterExists(documentClass , KFSConstants.DOCUMENT_LOCKOUT_PARM_NM)) {
            Parameter existingParam = parameterService.getParameter( documentClass, KFSConstants.DOCUMENT_LOCKOUT_PARM_NM );
            Parameter.Builder updatedParam = Builder.create(existingParam);
            updatedParam.setValue( locked?"Y":"N" );
            parameterService.updateParameter(updatedParam.build());
        } else {
            String namespace = KRADServiceLocatorWeb.getKualiModuleService().getNamespaceCode(documentClass);
            String detailType = KRADServiceLocatorWeb.getKualiModuleService().getComponentCode(documentClass);
            Parameter.Builder newParam = Builder.create(KFSConstants.APPLICATION_NAMESPACE_CODE, namespace, detailType, KFSConstants.DOCUMENT_LOCKOUT_PARM_NM, ParameterType.Builder.create(KfsParameterConstants.PARAMETER_CONFIG_TYPE_CODE) );
            newParam.setValue("Y");
            newParam.setDescription(KFSConstants.DOCUMENT_LOCKOUT_PARM_DESC);
            parameterService.createParameter(newParam.build());
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:19,代码来源:PdpExtractServiceImpl.java


示例15: buildRunParameterSearchKeyMap

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
/**
 * Used by setInitiatedRunParameter to build a Map of search keys to obtain the exact needed Run parameter from the database.
 * 
 * @return A Map<String,Object> where the Objects are the attributes of the Run parameter
 */
private Map<String, Object> buildRunParameterSearchKeyMap() {
    Map<String, Object> pkMapForParameter = new HashMap<String, Object>();

    // Set up a list of all the field names and values of the fields in the Parameter object.
    Map<String, Object> fieldNamesValuesForParameter = new HashMap<String, Object>();
    fieldNamesValuesForParameter.put("parameterNamespaceCode", PurapConstants.PURAP_NAMESPACE);
    fieldNamesValuesForParameter.put("parameterDetailTypeCode", RUN_INDICATOR_PARAMETER_NAMESPACE_STEP);
    fieldNamesValuesForParameter.put("parameterName", Job.STEP_RUN_PARM_NM);
    fieldNamesValuesForParameter.put("parameterConstraintCode", RUN_INDICATOR_PARAMETER_ALLOWED);
    fieldNamesValuesForParameter.put("parameterTypeCode", RUN_INDICATOR_PARAMETER_TYPE);

    // get the primary keys and assign them to values
    List<String> parameterPKFields = psService.getPrimaryKeys(Parameter.class);
    for (String pkFieldName : parameterPKFields) {
        pkMapForParameter.put(pkFieldName, fieldNamesValuesForParameter.get(pkFieldName));
    }
    return pkMapForParameter;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:PurapMassRequisitionStep.java


示例16: validateAllFieldRequirementsByChart

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
/**
 * Validates all the field requirements by chart. It obtains a List of parameters where the parameter names are like
 * "CHARTS_REQUIRING%" then loop through these parameters. If the system type is individual then invoke the
 * validateFieldRequirementByChartForIndividualSystemType for further validation, otherwise invoke the
 * validateFieldRequirementByChartForOneOrMultipleSystemType for further validation.
 *
 * @param systemState
 * @param capitalAssetSystems
 * @param capitalAssetItems
 * @param chartCode
 * @param documentType
 * @param systemType
 * @return
 */
protected boolean validateAllFieldRequirementsByChart(String systemState, List<CapitalAssetSystem> capitalAssetSystems, List<PurchasingCapitalAssetItem> capitalAssetItems, String chartCode, String documentType, String systemType) {
    boolean valid = true;
    Builder qbc = QueryByCriteria.Builder.create();
    qbc.setPredicates(and(
            equal(CabPropertyConstants.Parameter.PARAMETER_NAMESPACE_CODE, CabConstants.Parameters.NAMESPACE),
            equal(CabPropertyConstants.Parameter.PARAMETER_DETAIL_TYPE_CODE, CabConstants.Parameters.DETAIL_TYPE_DOCUMENT),
            PredicateFactory.like(CabPropertyConstants.Parameter.PARAMETER_NAME, "CHARTS_REQUIRING%" + documentType)));

    List<Parameter> results = parameterRepositoryService.findParameters(qbc.build()).getResults();
    for (Parameter parameter : results) {
        if (ObjectUtils.isNotNull(parameter)) {
            if (systemType.equals(PurapConstants.CapitalAssetSystemTypes.INDIVIDUAL)) {
                valid &= validateFieldRequirementByChartForIndividualSystemType(systemState, capitalAssetItems, chartCode, parameter.getName(), parameter.getValue());
            } else {
                valid &= validateFieldRequirementByChartForOneOrMultipleSystemType(systemType, systemState, capitalAssetSystems, capitalAssetItems, chartCode, parameter.getName(), parameter.getValue());
            }
        }
    }
    return valid;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:35,代码来源:CapitalAssetBuilderModuleServiceImpl.java


示例17: setInitiatedParameter

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
/**
 * This method sets a parameter that tells the step that it has already run and it does not need to run again.
 */
private void setInitiatedParameter() {
    // first see if we can find an existing Parameter object with this key
    ParameterService parameterService = SpringContext.getBean(ParameterService.class);
    Parameter runIndicatorParameter = parameterService.getParameter(GenesisBatchStep.class, Job.STEP_RUN_PARM_NM);
    if (runIndicatorParameter == null) {
        Parameter.Builder newParameter = Builder.create(RUN_INDICATOR_PARAMETER_APPLICATION_NAMESPACE_CODE, RUN_INDICATOR_PARAMETER_NAMESPACE_CODE, RUN_INDICATOR_PARAMETER_NAMESPACE_STEP, Job.STEP_RUN_PARM_NM, ParameterType.Builder.create(RUN_INDICATOR_PARAMETER_TYPE));
        newParameter.setValue(RUN_INDICATOR_PARAMETER_VALUE);
        newParameter.setEvaluationOperator( EvaluationOperator.ALLOW );
        newParameter.setDescription(RUN_INDICATOR_PARAMETER_DESCRIPTION);
        parameterService.createParameter(newParameter.build());
    } else {
        Parameter.Builder updatedParameter = Parameter.Builder.create(runIndicatorParameter);
        updatedParameter.setValue(GenesisBatchStep.RUN_INDICATOR_PARAMETER_VALUE);
        parameterService.updateParameter(updatedParameter.build());
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:20,代码来源:GenesisBatchStep.java


示例18: publishDocHandlerUrlPrefix

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
@Override
public void publishDocHandlerUrlPrefix() {
    ParameterType.Builder parameterType = ParameterType.Builder.create(parameterTypeCode);
    Parameter.Builder parameter = Parameter.Builder.create(parameterApplicationId, parameterNamespaceCode, parameterComponentCode, parameterName, parameterType);
    parameter.setDescription("KPME docHandler Prefix");
    parameter.setValue(parameterValue);
    parameter.setEvaluationOperator(EvaluationOperator.ALLOW);
    Parameter existingParameter = parameterService.getParameter(parameterNamespaceCode, parameterComponentCode, parameterName);
    if (existingParameter == null) {
        parameterService.createParameter(parameter.build());
    } else if(!StringUtils.equals(existingParameter.getValue(), parameterValue)) {
        parameter.setObjectId(existingParameter.getObjectId());
        parameter.setVersionNumber(existingParameter.getVersionNumber());
        parameterService.updateParameter(parameter.build());
    } 
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:17,代码来源:DocHandlerUrlPrefixPublishingServiceImpl.java


示例19: isBlankRoleQualifierVisible

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
private boolean isBlankRoleQualifierVisible(String namespaceCode) {
  	boolean showBlankQualifiers = true;

Parameter param = getParameterService().getParameter(namespaceCode, KRADConstants.DetailTypes.ALL_DETAIL_TYPE, KimConstants.ParameterKey.SHOW_BLANK_QUALIFIERS);
   if (param != null) {
   	showBlankQualifiers = "Y".equals(param.getValue());
   } else {
   	String configProperty = ConfigContext.getCurrentContextConfig().getProperty(SHOW_BLANK_QUALIFIERS);
   	if (configProperty != null) {
   		showBlankQualifiers = Boolean.valueOf(configProperty);
          }
   }

   return showBlankQualifiers;
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:UiDocumentServiceImpl.java


示例20: setKimPriorityOnDocumentTypeParameterValue

import org.kuali.rice.coreservice.api.parameter.Parameter; //导入依赖的package包/类
protected void setKimPriorityOnDocumentTypeParameterValue(String parameterValue) {
    if(CoreFrameworkServiceLocator.getParameterService().parameterExists(KewApiConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.ALL_DETAIL_TYPE, KewApiConstants.KIM_PRIORITY_ON_DOC_TYP_PERMS_IND)) {
        Parameter kimPriorityOverDocTypePolicyParameter = CoreFrameworkServiceLocator.getParameterService().getParameter(KewApiConstants.KEW_NAMESPACE, KRADConstants.DetailTypes.ALL_DETAIL_TYPE, KewApiConstants.KIM_PRIORITY_ON_DOC_TYP_PERMS_IND);
        Parameter.Builder b = Parameter.Builder.create(kimPriorityOverDocTypePolicyParameter);
        b.setValue(parameterValue);
        CoreFrameworkServiceLocator.getParameterService().updateParameter(b.build());
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:RecallActionTest.java



注:本文中的org.kuali.rice.coreservice.api.parameter.Parameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AwarenessServiceEvent类代码示例发布时间:2022-05-22
下一篇:
Java PresenceManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap