Language: Deutsch · English
Read system and nuclet parameters in rules – getSystemParameter, getNucletParameter.
REFERENZ DEVELOPER UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X
On this page
The ParameterProvider reads system and nuclet parameters. Both are created in Nuclos and generated as constants for rules (class generation).
Reads an instance-wide system parameter (e.g. SMTP/POP3 data). Constants in the NuclosSystemParameter class.
public static String getSystemParameter(SystemParameter parameter) throws BusinessException;
package org.nuclet.businessentity;
import org.nuclos.api.annotation.Rule;
import org.nuclos.api.context.UpdateContext;
import org.nuclos.api.exception.BusinessException;
import org.nuclos.api.provider.ParameterProvider;
import org.nuclos.api.rule.UpdateRule;
import org.nuclos.parameter.NuclosSystemParameter;
/** @name
* @description
* @usage
* @change
*/
@Rule(name="SendConfirmationEmail", description="SendConfirmationEmail")
public class SendConfirmationEmail implements UpdateRule {
public void update(UpdateContext context) throws BusinessException {
Auftrag a = context.getBusinessObject(Auftrag.class);
if(a.isApproved()) {
String useEmail = ParameterProvider.getSystemParameter(NuclosSystemParameter.ConfirmationEmailIsActive);
// First check, if the value of this parameter is not null
if (useEmail != null) {
if (usrEmail.equals("Y")) {
// Following method creates a NuclosEmail and sends it to the user mentioned in "Auftrag" a.
// For lack of space this method is not implemented in this example. Suppose it does exist.
sendConfirmationEmail(a);
}
}
}
}
}
Reads a nuclet-dependent parameter. Per nuclet a …NucletParameter class with all constants is generated.
public static String getNucletParameter(NucletParameter parameter) throws BusinessException;
package org.nuclet.zahlungsverkehr;
import org.nuclos.api.annotation.Rule;
import org.nuclos.api.context.UpdateContext;
import org.nuclos.api.exception.BusinessException;
import org.nuclos.api.provider.ParameterProvider;
import org.nuclos.api.rule.UpdateRule;
import org.nuclet.zahlungsverkehr.ZahlungsverkehrNucletParameter;
/** @name
* @description
* @usage
* @change
*/
@Rule(name="ValidatePayment", description="ValidatePayment")
public class ValidatePayment implements UpdateRule {
public void update(UpdateContext context) throws BusinessException {
// Dateiverzeichnis für den Eingang von MT940-Dateien
String dirMT940Files = ParameterProvider.getNucletParameter(ZahlungsverkehrNucletParameter.MT940_DIRECTORY);
}
}