instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class ShipmentScheduleAndJobSchedules { @NonNull I_M_ShipmentSchedule shipmentSchedule; @NonNull PickingJobScheduleCollection jobSchedules; @NonNull ShipmentScheduleId shipmentScheduleId; private ShipmentScheduleAndJobSchedules(@NonNull final I_M_ShipmentSchedule shipmentSchedule, @Nullable Collection<Pick...
public ShipmentScheduleAndJobScheduleIdSet toScheduleIds() { return jobSchedules.isEmpty() ? ShipmentScheduleAndJobScheduleIdSet.of(getShipmentScheduleId()) : jobSchedules.toShipmentScheduleAndJobScheduleIdSet(); } public boolean isProcessed() { return shipmentSchedule.isProcessed(); } public boolea...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\ShipmentScheduleAndJobSchedules.java
2
请完成以下Java代码
public JSONWriter object() throws JSONException { if (this.mode == 'i') { this.mode = 'o'; } if (this.mode == 'o' || this.mode == 'a') { this.append("{"); this.push(new JSONObject()); this.comma = false; return this; } t...
* Append either the value <code>true</code> or the value <code>false</code> . * * @param b * A boolean. * @return this * @throws JSONException */ public JSONWriter value(boolean b) throws JSONException { return this.append(b ? "true" : "false"); } /** * A...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\JSONWriter.java
1
请在Spring Boot框架中完成以下Java代码
public class C_Order { private final TransactionResultService transactionResultService; private final CreditPassConfigRepository creditPassConfigRepository; public C_Order(@NonNull final TransactionResultService transactionResultService, @NonNull final CreditPassConfigRepository creditPassConfigRepository) { ...
order.setCreditpassFlag(true); final ITranslatableString message = msgBL.getTranslatableMsgText(CreditPassConstants.CREDITPASS_REQUEST_NEEDED_MESSAGE_KEY); order.setCreditpassStatus(message.translate(Env.getAD_Language())); } } else { order.setCreditpassFlag(true); final ITranslatableStri...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java\de\metas\vertical\creditscore\creditpass\interceptor\C_Order.java
2
请在Spring Boot框架中完成以下Java代码
private void setResponseComposite(@NonNull final Exchange exchange) { final ExportBPartnerRouteContext routeContext = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_EXPORT_BPARTNER_CONTEXT, ExportBPartnerRouteContext.class); exchange.getIn().setBody(routeContext.getJsonRespons...
} try { return JsonObjectMapperHolder.sharedJsonObjectMapper() .readValue(exportDirSettings, JsonExportDirectorySettings.class); } catch (final JsonProcessingException e) { throw new RuntimeException("Could not read value of type JsonExportDirectorySettings!" + "ExternalSystemConfigI...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\to_grs\bpartner\GRSSignumExportBPartnerRouteBuilder.java
2
请完成以下Java代码
public class BpmnActivityBehavior implements Serializable { private static final long serialVersionUID = 1L; /** * Performs the default outgoing BPMN 2.0 behavior, which is having parallel paths of executions for the outgoing sequence flow. * * More precisely: every sequence flow that has a co...
/** * Actual implementation of leaving an activity. * * @param execution * The current execution context * @param checkConditions * Whether or not to check conditions before determining whether or not to take a transition. * @param throwExceptionIfExecutionStuck...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\BpmnActivityBehavior.java
1
请在Spring Boot框架中完成以下Java代码
public class ForecastListLineItemExtensionType { @XmlElement(name = "ForecastListLineItemExtension", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact") protected at.erpel.schemas._1p0.documents.extensions.edifact.ForecastListLineItemExtensionType forecastListLineItemExtension; @XmlElem...
* Gets the value of the erpelForecastLineItemExtension property. * * @return * possible object is * {@link CustomType } * */ public CustomType getErpelForecastLineItemExtension() { return erpelForecastLineItemExtension; } /** * Sets the value of the ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\ForecastListLineItemExtensionType.java
2
请完成以下Java代码
public void setCtrySubDvsn(String value) { this.ctrySubDvsn = value; } /** * Gets the value of the ctry property. * * @return * possible object is * {@link String } * */ public String getCtry() { return ctry; } /** * Sets the va...
* returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the adrLine property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAdrLine().add(newItem); * </pre> * * * <p> * Objects o...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\PostalAddress6.java
1
请完成以下Java代码
public class parser_dll { private NeuralNetworkParser parser; public parser_dll() { this(ConfigOption.PATH); } public parser_dll(String modelPath) { parser = GlobalObjectPool.get(modelPath); if (parser != null) return; parser = new NeuralNetworkParser(); ...
* * @param words 词语列表 * @param postags 词性列表 * @param heads 输出依存指向列表 * @param deprels 输出依存名称列表 * @return 节点的个数 */ public int parse(List<String> words, List<String> postags, List<Integer> heads, List<String> deprels) { Instance inst = new Instance(); inst.forms.ad...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\nnparser\parser_dll.java
1
请完成以下Java代码
public void setOpenAmt (final BigDecimal OpenAmt) { set_ValueNoCheck (COLUMNNAME_OpenAmt, OpenAmt); } @Override public BigDecimal getOpenAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_OpenAmt); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setPayAmt (final BigDecimal...
/** DirectDebit = D */ public static final String PAYMENTRULE_DirectDebit = "D"; /** Mixed = M */ public static final String PAYMENTRULE_Mixed = "M"; /** PayPal = L */ public static final String PAYMENTRULE_PayPal = "L"; /** PayPal Extern = V */ public static final String PAYMENTRULE_PayPalExtern = "V"; /** Kre...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaySelectionLine.java
1
请完成以下Java代码
public I_CM_Media getCM_Media() throws RuntimeException { return (I_CM_Media)MTable.get(getCtx(), I_CM_Media.Table_Name) .getPO(getCM_Media_ID(), get_TrxName()); } /** Set Media Item. @param CM_Media_ID Contains media content like images, flash movies etc. */ public void setCM_Media_ID (int CM_Media...
} /** Set Deployed. @param IsDeployed Entity is deployed */ public void setIsDeployed (boolean IsDeployed) { set_Value (COLUMNNAME_IsDeployed, Boolean.valueOf(IsDeployed)); } /** Get Deployed. @return Entity is deployed */ public boolean isDeployed () { Object oo = get_Value(COLUMNNAME_IsDepl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_MediaDeploy.java
1
请完成以下Java代码
public MGoal getMGoal() { return m_goal; } /** * * @param mgoal */ public void setMGoal(MGoal mgoal) { m_goal = mgoal; } /** * * @return X axis label */ public String getXAxisLabel() { return m_X_AxisLabel; } /** * * @param axisLabel */ public void setXAxisLabel(String axisLabel) { ...
log.warn("No Measure for " + getMGoal()); return null; } ArrayList<GraphColumn>list = measure.getGraphColumnList(getMGoal()); pieDataset = new DefaultPieDataset(); dataset = new DefaultCategoryDataset(); for (int i = 0; i < list.size(); i++){ String series = m_X_AxisLabel; if (list.get(i).getDate()...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\apps\graph\GraphBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public String getTown() { return town; } /** * Sets the value of the town property. * * @param value * allowed object is * {@link String } * */ public void setTown(String value) { this.town = value; } /** * Gets the value of the...
this.country = value; } /** * Details about the contact person at the delivery point. * * @return * possible object is * {@link ContactType } * */ public ContactType getContact() { return contact; } /** * Sets the value of the contact p...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\DeliveryPointDetails.java
2
请在Spring Boot框架中完成以下Java代码
public I_C_UOM getCommonUOM() { //validate that all qtys have the same UOM mapReduce(part -> part.getQty().getUomId()) .orElseThrow(()-> new AdempiereException("Missing I_C_UOM!") .appendParametersToMessage() .setParameter("Parts", this)); return toList().get(0).getQty().getUOM(); } @Override...
} private void addQty(final PackingItemPart part) { partsMap.compute(part.getId(), (id, existingPart) -> existingPart != null ? existingPart.addQty(part.getQty()) : part); } public void removePart(final PackingItemPart part) { partsMap.remove(part.getId(), part); } public void updatePart(@NonNull fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\PackingItemParts.java
2
请在Spring Boot框架中完成以下Java代码
public class MobileUIManufacturingConfig { @NonNull OptionalBoolean isScanResourceRequired; @NonNull OptionalBoolean isAllowIssuingAnyHU; public MobileUIManufacturingConfig fallbackTo(@NonNull final MobileUIManufacturingConfig other) { final MobileUIManufacturingConfig result = MobileUIManufacturingConfig.builde...
{ if (configs == null || configs.length <= 0) { return Optional.empty(); } MobileUIManufacturingConfig result = null; for (final MobileUIManufacturingConfig config : configs) { if (config == null) { continue; } result = result != null ? result.fallbackTo(config) : config; } return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\config\MobileUIManufacturingConfig.java
2
请完成以下Java代码
public PInstanceId createSelection(final @NonNull Collection<PPOrderCandidateId> candidateIds) { if (candidateIds.isEmpty()) { throw new AdempiereException("At least one candidateId must be specified"); } final PInstanceId selectionId = queryBL.createQueryBuilder(I_PP_Order_Candidate.class) .addOnlyAct...
.parameter(WP_AUTO_PROCESS_CANDIDATES_AFTER_PRODUCTION, request.isAutoProcessCandidatesAfterProduction()) .parameter(WP_AUTO_CLOSE_CANDIDATES_AFTER_PRODUCTION, request.isAutoCloseCandidatesAfterProduction()) .setElementsLocker(elementsLocker) .buildAndEnqueue(); final Result result = new Result(); resu...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\async\PPOrderCandidateEnqueuer.java
1
请完成以下Java代码
private final void loadItems() { final PT parentModel = getParentModel(); final IContextAware ctx = createPlainContextAware(parentModel); // // Retrieve fresh items final List<T> items = retrieveItems(ctx, parentModel); // // Update status this.ctx = ctx; this.items = items == null ? null : new Arr...
// // Retrieve fresh items final List<T> itemsRetrievedNow = retrieveItems(ctx, parentModel); if (itemsComparator != null) { Collections.sort(itemsRetrievedNow, itemsComparator); } if (!Objects.equals(this.items, itemsRetrievedNow)) { final int itemsCount = this.items == null ? 0 : this.it...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\cache\AbstractModelListCacheLocal.java
1
请完成以下Java代码
public class UserCacheObject { /** * 用户编号 */ private Integer id; /** * 昵称 */ private String name; /** * 性别 */ private Integer gender; public Integer getId() { return id; } public UserCacheObject setId(Integer id) { this.id = id; ...
} public UserCacheObject setName(String name) { this.name = name; return this; } public Integer getGender() { return gender; } public UserCacheObject setGender(Integer gender) { this.gender = gender; return this; } @Override public String toStr...
repos\SpringBoot-Labs-master\lab-11-spring-data-redis\lab-07-spring-data-redis-with-jedis\src\main\java\cn\iocoder\springboot\labs\lab10\springdatarediswithjedis\cacheobject\UserCacheObject.java
1
请完成以下Java代码
public de.metas.ui.web.base.model.I_WEBUI_Dashboard getWEBUI_Dashboard() { return get_ValueAsPO(COLUMNNAME_WEBUI_Dashboard_ID, de.metas.ui.web.base.model.I_WEBUI_Dashboard.class); } @Override public void setWEBUI_Dashboard(final de.metas.ui.web.base.model.I_WEBUI_Dashboard WEBUI_Dashboard) { set_ValueFromPO(C...
public void setWEBUI_DashboardWidgetType (final java.lang.String WEBUI_DashboardWidgetType) { set_Value (COLUMNNAME_WEBUI_DashboardWidgetType, WEBUI_DashboardWidgetType); } @Override public java.lang.String getWEBUI_DashboardWidgetType() { return get_ValueAsString(COLUMNNAME_WEBUI_DashboardWidgetType); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_DashboardItem.java
1
请在Spring Boot框架中完成以下Java代码
public class ResourceController { /** * 需要用户角色权限 * @return */ @PreAuthorize("hasRole('ROLE_USER')") @RequestMapping(value="user", method= RequestMethod.GET) public String helloUser() { return "hello user"; } /** * 需要管理角色权限 * * @return */ @PreAuthorize("hasR...
@RequestMapping(value="client", method=RequestMethod.GET) public String helloClient() { return "hello user authenticated by normal client"; } /** * 需要受信任的客户端权限 * * @return */ @PreAuthorize("hasRole('ROLE_TRUSTED_CLIENT')") @RequestMapping(value="trusted_client", method=Requ...
repos\spring-boot-quick-master\quick-oauth2\quick-oauth2-server\src\main\java\com\quick\auth\server\controller\ResourceController.java
2
请完成以下Java代码
public class OrderItem { private UUID productId; private BigDecimal price; public OrderItem(final Product product) { this.productId = product.getId(); this.price = product.getPrice(); } public UUID getProductId() { return productId; } public BigDecimal getPrice() {...
private OrderItem() { } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OrderItem orderItem = (OrderItem) o; return Objects.equals(productId, orderItem.productId) && Objects.equals(price, orde...
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\dddhexagonalspring\domain\OrderItem.java
1
请完成以下Java代码
protected int get_AccessLevel() { return accessLevel.intValue(); } /** Load Meta Data */ protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new Strin...
/** Get Container URL. @return Contains info on used URLs */ public int getCM_Container_URL_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_CM_Container_URL_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Last Result. @param Last_Result Contains data on the last check result ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Container_URL.java
1
请在Spring Boot框架中完成以下Java代码
public class MSV3PeerAuthToken { public static final String NAME = "AuthToken"; public static final MSV3PeerAuthToken TOKEN_NOT_SET = MSV3PeerAuthToken.of("missing-msv3server.peer.authToken-in-msv3server"); @JsonCreator public static MSV3PeerAuthToken of(final String value) { return new MSV3PeerAuthToken(value...
} this.valueAsString = valueAsString; } @Override public String toString() { return MoreObjects.toStringHelper(this) .addValue("********") .toString(); } @JsonValue public String toJson() { return valueAsString; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer\src\main\java\de\metas\vertical\pharma\msv3\server\peer\protocol\MSV3PeerAuthToken.java
2
请完成以下Java代码
public Date getTimeStamp() { return timeStamp; } @Override public void setTimeStamp(Date timeStamp) { this.timeStamp = timeStamp; } @Override public String getUserId() { return userId; } @Override public void setUserId(String userId) { this.userId =...
this.lockOwner = lockOwner; } @Override public String getLockTime() { return lockTime; } @Override public void setLockTime(String lockTime) { this.lockTime = lockTime; } @Override public int getProcessed() { return isProcessed; } @Override publ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\EventLogEntryEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public ContextSourceBuilder port(int port) { this.port = port; return this; } /** * Optional root suffix for the embedded LDAP server. Default is * "dc=springframework,dc=org" * @param root root suffix for the embedded LDAP server * @return the {@link ContextSourceBuilder} for further customizati...
else { throw new IllegalStateException("Embedded LDAP server is not provided"); } } private int getPort() { if (this.port == null) { this.port = getDefaultPort(); } return this.port; } private int getDefaultPort() { try (ServerSocket serverSocket = new ServerSocket(DEFAULT_PORT)) { ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configurers\ldap\LdapAuthenticationProviderConfigurer.java
2
请在Spring Boot框架中完成以下Java代码
public class Person { @GeneratedValue(strategy = GenerationType.AUTO) @Id private int id; private String username; private String email; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsername() { ...
this.email = email; } public Person(int id, @NotBlank String username, @Email String email) { super(); this.id = id; this.username = username; this.email = email; } public Person() { super(); } public String toString() { return this.id +...
repos\tutorials-master\microservices-modules\open-liberty\src\main\java\com\baeldung\openliberty\person\model\Person.java
2
请在Spring Boot框架中完成以下Java代码
public static final class Options { /** * No options. */ public static final Options NONE = new Options(Collections.emptySet()); private final Set<Option> options; private Options(Set<Option> options) { this.options = Collections.unmodifiableSet(options); } Set<Option> asSet() { return this....
* @return a new {@link Options} instance */ public static Options of(Option... options) { Assert.notNull(options, "'options' must not be null"); if (options.length == 0) { return NONE; } return new Options(EnumSet.copyOf(Arrays.asList(options))); } } /** * Option flags that can be applied. ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigData.java
2
请完成以下Java代码
public ShipperGatewayId getShipperGatewayId() { return DerKurierConstants.SHIPPER_GATEWAY_ID; } @Override public ShipperGatewayClient newClientForShipperId(@NonNull final ShipperId shipperId) { final DerKurierShipperConfig shipperConfig = derKurierShipperConfigRepository.retrieveConfigForShipperId(shipperId.g...
/** * Put JavaTimeModule into the rest template's jackson object mapper. * <b> * Note 1: there have to be better ways to achieve this, but i don't know them. * thx to https://stackoverflow.com/a/47176770/1012103 * <b> * Note 2: visible because this is the object mapper we run with; we want our unit tests to...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\DerKurierClientFactory.java
1
请完成以下Java代码
public void run(final String localTrxName) { // WORKAROUND: add subsequent methods called from here depends on source's trxName, so we are loading the candidate in this transaction InterfaceWrapperHelper.refresh(source, localTrxName); final I_C_Dunning_Candidate candidate = source.getC_Dunning_Candi...
/** * * @param candidate * @param writeOffDescription * @return true if candidate's invoice was written-off */ protected boolean writeOffDunningCandidate(final I_C_Dunning_Candidate candidate, final String writeOffDescription) { final Properties ctx = InterfaceWrapperHelper.getCtx(candidate); final Stri...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\invoice\api\impl\InvoiceSourceBL.java
1
请在Spring Boot框架中完成以下Java代码
public HttpHandler httpHandler(ApplicationContext applicationContext, WebFluxProperties properties) { HttpHandler httpHandler = WebHttpHandlerBuilder.applicationContext(applicationContext).build(); return new CloudFoundryHttpHandler(properties.getBasePath(), httpHandler); } private static final class CloudFoundr...
@Override public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response) { // Remove underlying context path first (e.g. Servlet container) String path = request.getPath().pathWithinApplication().value(); if (path.startsWith("/cloudfoundryapplication")) { return this.delegate.handle(req...
repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\actuator\cloudfoundry\customcontextpath\MyReactiveCloudFoundryConfiguration.java
2
请完成以下Java代码
public Mono<AuthorizationResult> authorize(Mono<Authentication> authentication, T object) { return authentication.filter(this::isNotAnonymous) .map(this::getAuthorizationDecision) .defaultIfEmpty(new AuthorizationDecision(false)); } private AuthorizationResult getAuthorizationDecision(Authentication authenti...
*/ private boolean isNotAnonymous(Authentication authentication) { return !this.authTrustResolver.isAnonymous(authentication); } /** * Gets an instance of {@link AuthenticatedReactiveAuthorizationManager} * @param <T> * @return */ public static <T> AuthenticatedReactiveAuthorizationManager<T> authenticat...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthenticatedReactiveAuthorizationManager.java
1
请完成以下Java代码
public static PlasticTheme getCurrentTheme() { return THEME_CURRENT; } /** * Error Feedback. * <p> * Invoked when the user attempts an invalid operation, * such as pasting into an uneditable <code>JTextField</code> * that has focus. * </p> * <p> * If the user has enabled visual error indic...
* of the active window. The user can also set the * property awt.visualbell=true to achieve the same * results. * </p> * @param component Component the error occurred in, may be * null indicating the error condition is * not directly associated with a * <code>Component</code>. */ @Override ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\plaf\AdempiereLookAndFeel.java
1
请完成以下Java代码
public boolean isEmpty() { return sections.isEmpty(); } public static final class Builder { public WindowId windowId; private ITranslatableString caption; private ITranslatableString description; private NotFoundMessages notFoundMessages; private final ArrayList<DocumentLayoutSectionDescriptor.Builder...
this.description = description; return this; } public Builder notFoundMessages(@Nullable NotFoundMessages notFoundMessages) { this.notFoundMessages = notFoundMessages; return this; } public Builder addSection(@NonNull final DocumentLayoutSectionDescriptor.Builder sectionBuilderToAdd) { section...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSingleRow.java
1
请完成以下Java代码
private void initialize() { button.setText("Click me"); handleClickEvent(); handleHoverEffect(); reuseRightClickEventHandler(); } private void handleClickEvent() { button.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(...
private void handleHoverEffect() { Effect shadow = new DropShadow(); button.setOnMouseEntered(e -> button.setEffect(shadow)); button.setOnMouseExited(e -> button.setEffect(null)); } private void reuseRightClickEventHandler() { EventHandler<MouseEvent> rightClickHandler = event -...
repos\tutorials-master\javafx\src\main\java\com\baeldung\button\eventhandler\ButtonEventHandlerController.java
1
请完成以下Java代码
private boolean isEmployee(Authentication authentication) { return (authentication .getPrincipal() .toString() .startsWith("employee")); } private AuthenticationFilter authenticationFilter() { AuthenticationFilter filter = new AuthenticationFilter( resolv...
authentication.getCredentials(), Collections.singletonList(new SimpleGrantedAuthority("ROLE_USER")) ); } throw new UsernameNotFoundException(authentication .getPrincipal() .toString()); }; } @Bean public SecurityF...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\authresolver\CustomWebSecurityConfigurer.java
1
请完成以下Java代码
public void repackage(Libraries libraries) throws IOException { repackage(getSource(), libraries); } /** * Repackage to the given destination so that it can be launched using ' * {@literal java -jar}'. * @param destination the destination file (may be the same as the source) * @param libraries the librarie...
deleteFile(workingSource); } } } private void repackage(JarFile sourceJar, File destination, Libraries libraries, @Nullable FileTime lastModifiedTime) throws IOException { try (JarWriter writer = new JarWriter(destination, lastModifiedTime)) { write(sourceJar, libraries, writer, lastModifiedTime != null...
repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\Repackager.java
1
请完成以下Java代码
public void setListener(T listener) { Assert.notNull(listener, "'listener' must not be null"); Assert.isTrue(isSupportedType(listener), "'listener' is not of a supported type"); this.listener = listener; } /** * Return the listener to be registered. * @return the listener to be registered */ public @Nul...
/** * Returns {@code true} if the specified listener is one of the supported types. * @param listener the listener to test * @return if the listener is of a supported type */ public static boolean isSupportedType(EventListener listener) { for (Class<?> type : SUPPORTED_TYPES) { if (ClassUtils.isAssignable...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletListenerRegistrationBean.java
1
请在Spring Boot框架中完成以下Java代码
public class IsAdapter implements Adapter { private static final Logger LOG = LoggerFactory.getLogger(IsAdapter.class); private final String classPath; public IsAdapter(String classPath) { this.classPath = classPath; } @Override public void loadPolicy(Model model) { if (class...
InputStream is = IsAdapter.class.getResourceAsStream(classPath); BufferedReader br = new BufferedReader(new InputStreamReader(is)); String line; try { while((line = br.readLine()) != null) { handler.accept(line, model); } is.close(); ...
repos\spring-examples-java-17\spring-jcasbin\src\main\java\itx\examples\springboot\security\config\IsAdapter.java
2
请完成以下Java代码
private BigDecimal retrieveWriteoffAmt(final org.compiere.model.I_C_Invoice invoice, final TypedAccessor<BigDecimal> amountAccessor) { BigDecimal sum = BigDecimal.ZERO; for (final I_C_AllocationLine line : retrieveAllocationLines(invoice)) { final I_C_AllocationHdr ah = line.getC_AllocationHdr(); final Big...
CurrencyConversionTypeId.ofRepoIdOrNull(invoice.getC_ConversionType_ID()), ClientId.ofRepoId(line.getAD_Client_ID()), OrgId.ofRepoId(line.getAD_Org_ID())); sum = sum.add(lineWriteOffConv); } else { sum = sum.add(lineWriteOff); } } return sum; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\allocation\api\impl\PlainAllocationDAO.java
1
请完成以下Java代码
public Builder setListNullItemCaption(@NonNull final ITranslatableString listNullItemCaption) { this.listNullItemCaption = listNullItemCaption; return this; } public Builder setEmptyFieldText(final ITranslatableString emptyFieldText) { this.emptyFieldText = emptyFieldText; return this; } publi...
private boolean isSupportZoomInto() { return supportZoomInto; } public Builder setForbidNewRecordCreation(final boolean forbidNewRecordCreation) { this.forbidNewRecordCreation = forbidNewRecordCreation; return this; } private boolean isForbidNewRecordCreation() { return forbidNewRecordCreati...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutElementFieldDescriptor.java
1
请完成以下Java代码
public TUMergeBuilder setTargetTU(final I_M_HU targetHU) { this.targetHU = targetHU; return this; } @Override public TUMergeBuilder setCUProductId(final ProductId cuProductId) { this.cuProductId = cuProductId; return this; } @Override public TUMergeBuilder setCUQty(final BigDecimal qty) { cuQty = q...
// Perform allocation HULoader.of(source, destination) .setAllowPartialUnloads(true) // force allow partial unloads when merging .setAllowPartialLoads(true) // force allow partial loads when merging .load(allocationRequest); // execute it; we don't care about the result // // Destroy HUs which had th...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\TUMergeBuilder.java
1
请完成以下Java代码
public DiagramLayout getProcessDiagramLayout(String processDefinitionId) { return commandExecutor.execute(new GetDeploymentProcessDiagramLayoutCmd(processDefinitionId)); } @Override public Model newModel() { return commandExecutor.execute(new CreateModelCmd()); } @Override publ...
} @Override public void addCandidateStarterGroup(String processDefinitionId, String groupId) { commandExecutor.execute(new AddIdentityLinkForProcessDefinitionCmd(processDefinitionId, null, groupId)); } @Override public void deleteCandidateStarterGroup(String processDefinitionId, String gro...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\RepositoryServiceImpl.java
1
请完成以下Java代码
public static OrgIdAccessList ofSet(final Set<OrgId> orgIds) { return new OrgIdAccessList(false, orgIds); } private void assertNotAny() { if (any) { throw new AdempiereException("Assumed not an ANY org access list: " + this); } } public Iterator<OrgId> iterator() {
assertNotAny(); return orgIds.iterator(); } public boolean contains(@NonNull final OrgId orgId) { return any || orgIds.contains(orgId); } public ImmutableSet<OrgId> toSet() { assertNotAny(); return orgIds; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\OrgIdAccessList.java
1
请完成以下Java代码
public class StoreRecord extends UpdatableRecordImpl<StoreRecord> { private static final long serialVersionUID = 1L; /** * Setter for <code>public.Store.id</code>. */ public void setId(Integer value) { set(0, value); } /** * Getter for <code>public.Store.id</code>. */ ...
// Constructors // ------------------------------------------------------------------------- /** * Create a detached StoreRecord */ public StoreRecord() { super(Store.STORE); } /** * Create a detached, initialised StoreRecord */ public StoreRecord(Integer id, String...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\records\StoreRecord.java
1
请在Spring Boot框架中完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getTenantIdLike() { return tenantIdLike; } public void setTenantIdLike(String tenantIdLike) { this.tenantIdLike = tenantIdLike;...
return rootScopeId; } public void setRootScopeId(String rootScopeId) { this.rootScopeId = rootScopeId; } public String getParentScopeId() { return parentScopeId; } public void setParentScopeId(String parentScopeId) { this.parentScopeId = parentScopeId; } publi...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricProcessInstanceQueryRequest.java
2
请完成以下Java代码
public Deployment selectLatestDeployment() { return deploymentConverter.from( repositoryService .createDeploymentQuery() .deploymentName("SpringAutoDeployment") .latestVersion() .singleResult() ); } public org.activiti....
); } private boolean isATaskAssigneeOrACandidate(String processInstanceId) { String authenticatedUserId = securityManager.getAuthenticatedUserId(); TaskQuery taskQuery = taskService.createTaskQuery().processInstanceId(processInstanceId); taskQuery .or() .taskCand...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\impl\ProcessRuntimeImpl.java
1
请完成以下Java代码
public class MaterialDispoGroupId { @JsonCreator public static MaterialDispoGroupId ofInt(final int value) { return new MaterialDispoGroupId(value); } public static MaterialDispoGroupId ofIntOrNull(@Nullable final Integer value) { return value != null && value > 0 ? ofInt(value) : null; } public static Ma...
private MaterialDispoGroupId(final int value) { Check.assumeGreaterThanZero(value, "value"); this.value = value; } @Override public String toString() { return String.valueOf(value); } @JsonValue public int toInt() { return value; } public static int toInt(@Nullable final MaterialDispoGroupId group...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\pporder\MaterialDispoGroupId.java
1
请完成以下Java代码
public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public Date getDob() { return dob; } public void setDob(D...
} public List<ContactDetails> getContactDetailsList() { return contactDetailsList; } public void setContactDetailsList(List<ContactDetails> contactDetailsList) { this.contactDetailsList = contactDetailsList; } @Override public String toString() { return "Customer [firs...
repos\tutorials-master\xml-modules\xstream\src\main\java\com\baeldung\pojo\Customer.java
1
请在Spring Boot框架中完成以下Java代码
public class BPSupplierApprovalId implements RepoIdAware { int repoId; @JsonCreator public static BPSupplierApprovalId ofRepoId(final int repoId) { return new BPSupplierApprovalId(repoId); } @Nullable public static BPSupplierApprovalId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null...
{ return bpSupplierApprovalId != null ? bpSupplierApprovalId.getRepoId() : defaultValue; } private BPSupplierApprovalId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_BP_SupplierApproval_ID"); } @JsonValue public int toJson() { return getRepoId(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPSupplierApprovalId.java
2
请在Spring Boot框架中完成以下Java代码
public class Customer { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; private String name; private String serviceRendered; private String address; public long getId() { return id; } public void setId(long id) { this.id = id; } pub...
this.name = name; } public String getServiceRendered() { return serviceRendered; } public void setServiceRendered(String serviceRendered) { this.serviceRendered = serviceRendered; } public String getAddress() { return address; } public void setAddress(String a...
repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-adapters\src\main\java\com\baeldung\keycloak\Customer.java
2
请完成以下Java代码
public String getMessage() { m_message = fMessage.getText(); return m_message; } // getMessage public void setAttributes(final BoilerPlateContext attributes) { this.attributes = attributes; fMessage.setAttributes(attributes); } public BoilerPlateContext getAttributes() { return attributes; } /**...
dispose(); } } // actionPerformed public void setPrintOnOK(final boolean value) { m_isPrintOnOK = value; } public boolean isPressedOK() { return m_isPressedOK; } public boolean isPrinted() { return m_isPrinted; } public File getPDF() { return fMessage.getPDF(getTitle()); } public RichTextE...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\LetterDialog.java
1
请完成以下Java代码
public boolean istaxfree() { return get_ValueAsBoolean(COLUMNNAME_taxfree); } @Override public void setUPC_CU (final @Nullable java.lang.String UPC_CU) { set_ValueNoCheck (COLUMNNAME_UPC_CU, UPC_CU); } @Override public java.lang.String getUPC_CU() { return get_ValueAsString(COLUMNNAME_UPC_CU); } @...
public java.lang.String getUPC_TU() { return get_ValueAsString(COLUMNNAME_UPC_TU); } @Override public void setValue (final @Nullable java.lang.String Value) { set_Value (COLUMNNAME_Value, Value); } @Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_invoic_500_v.java
1
请完成以下Java代码
public void setQty (final @Nullable BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUM...
public static final String STATUS_Open = "O"; /** Delivered = D */ public static final String STATUS_Delivered = "D"; /** InPicking = C */ public static final String STATUS_InPicking = "C"; /** Done = E */ public static final String STATUS_Done = "E"; /** Delayed = H */ public static final String STATUS_Delayed...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_SubscriptionProgress.java
1
请完成以下Java代码
public class EndpointMapping { private final String path; /** * Creates a new {@code EndpointMapping} using the given {@code path}. * @param path the path */ public EndpointMapping(String path) { this.path = normalizePath(path); } /** * Returns the path to which endpoints should be mapped. * @return...
public String createSubPath(String path) { return this.path + normalizePath(path); } private static String normalizePath(String path) { if (!StringUtils.hasText(path)) { return path; } String normalizedPath = path; if (!normalizedPath.startsWith("/")) { normalizedPath = "/" + normalizedPath; } if...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\EndpointMapping.java
1
请完成以下Java代码
public class SpringProcessApplicationElResolver implements ProcessApplicationElResolver { private final static Logger LOGGER = Logger.getLogger(SpringProcessApplicationElResolver.class.getName()); @Override public Integer getPrecedence() { return ProcessApplicationElResolver.SPRING_RESOLVER; } @Overrid...
LOGGER.log(Level.FINE, "WebApplicationContextUtils must be present for SpringProcessApplicationElResolver to work"); return null; } ServletContext servletContext = servletProcessApplication.getServletContext(); WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplic...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\application\SpringProcessApplicationElResolver.java
1
请完成以下Java代码
public String get_ValueAsString(final String variableName) { if (VAR_Label.equals(variableName)) { return getAttributeLabel(); } else if (VAR_Value.equals(variableName)) { final ITranslatableString valueTrl = getAttributeValueAsDisplayString(); return valueTrl != null ? valueTrl.translate(adLanguage...
} } else if (AttributeValueType.DATE.equals(valueType)) { final Date valueDate = attributeValue != null ? TimeUtil.asDate(attributeValue) : null; if (valueDate == null && !verboseDescription) { return null; } else { return ASIDescriptionBuilderCommand.formatDateValue(valueDate); } }...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeDescriptionPatternEvalCtx.java
1
请完成以下Java代码
protected Ingress desired(DeptrackResource primary, Context<DeptrackResource> context) { ObjectMeta meta = fromPrimary(primary,COMPONENT) .build(); return new IngressBuilder(template) .withMetadata(meta) .editSpec() .editDefaultBackend() .editOrN...
.endPath() // Frontend route .addNewPath() .withPath("/") .withPathType("Prefix") .withNewBackend() .withNewService() .withName(primary.getFrontendServiceName()) .withNewPort() ...
repos\tutorials-master\kubernetes-modules\k8s-operator\src\main\java\com\baeldung\operators\deptrack\resources\deptrack\DeptrackIngressResource.java
1
请完成以下Java代码
public Boolean getLocked() { return locked; } public Boolean getNotLocked() { return notLocked; } public String getExecutionId() { return executionId; } public String getProcessInstanceId() { return processInstanceId; } public String getProcessDefinitionKey() { return processDefi...
public SuspensionState getSuspensionState() { return suspensionState; } public Boolean getRetriesLeft() { return retriesLeft; } public Date getNow() { return ClockUtil.getCurrentTime(); } protected void ensureVariablesInitialized() { ProcessEngineConfigurationImpl processEngineConfigurati...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExternalTaskQueryImpl.java
1
请完成以下Java代码
private DocumentPrintOptions getDocumentPrintOptions(@NonNull final I_C_Order order) { final OptionalBoolean printTotals = getPrintTotalsOption(order); if (printTotals.isPresent()) { return DocumentPrintOptions.builder() .sourceName("Order document: C_Order_ID=" + order.getC_Order_ID()) .option(Docu...
private OptionalBoolean getPrintTotalsOption(@NonNull final I_C_Order order) { final String docSubType = order.getOrderType(); if (X_C_DocType.DOCSUBTYPE_Proposal.equals(docSubType) || X_C_DocType.DOCSUBTYPE_Quotation.equals(docSubType)) { return StringUtils.toOptionalBoolean(order.getPRINTER_OPTS_IsPrint...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderDocumentReportAdvisor.java
1
请完成以下Java代码
public class AuthorizationCreateDto { protected Integer type; protected String[] permissions; protected String userId; protected String groupId; protected Integer resourceType; protected String resourceId; // transformers /////////////////////////////////////// public static void update(Autho...
public void setPermissions(String[] permissions) { this.permissions = permissions; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getGroupId() { return groupId; } public void setGroupId(String groupId) { thi...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\authorization\AuthorizationCreateDto.java
1
请在Spring Boot框架中完成以下Java代码
public class DashboardSyncService { private final GitSyncService gitSyncService; private final ResourceService resourceService; private final ImageService imageService; private final WidgetsBundleService widgetsBundleService; private final PartitionService partitionService; private final Projec...
Stream<String> widgetsBundles = listFiles("widget_bundles").stream() .map(widgetsBundleFile -> new String(getFileContent(widgetsBundleFile.path()), StandardCharsets.UTF_8)); Stream<String> widgetTypes = listFiles("widget_types").stream() .map(widgetTypeFile -> new String(getFileC...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\dashboard\DashboardSyncService.java
2
请完成以下Java代码
public void handleEvent(@NonNull final PPOrderRequestedEvent event) { createProductionOrder(event); } /** * Creates a production order. Note that it does not fire an event, because production orders can be created and changed for many reasons,<br> * and therefore we leave the event-firing to a model intercept...
.productPlanningId(ProductPlanningId.ofRepoIdOrNull(ppOrderData.getProductPlanningId())) .materialDispoGroupId(ppOrderData.getMaterialDispoGroupId()) .plantId(ppOrderData.getPlantId()) .workstationId(ppOrderData.getWorkstationId()) .warehouseId(ppOrderData.getWare...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\event\PPOrderRequestedEventHandler.java
1
请完成以下Java代码
public void setName(String name) { this.name = name; } public void setNameLike(String nameLike) { this.nameLike = nameLike; } public String getExecutionId() { return executionId; } public String getDeploymentId() { return deploymentId; } public List<St...
public boolean isOnlySubProcessExecutions() { return onlySubProcessExecutions; } public Date getStartedBefore() { return startedBefore; } public void setStartedBefore(Date startedBefore) { this.startedBefore = startedBefore; } public Date getStartedAfter() { re...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ProcessInstanceQueryImpl.java
1
请完成以下Java代码
public int getC_Printing_Queue_ID() { return get_ValueAsInt(COLUMNNAME_C_Printing_Queue_ID); } @Override public void setDeliveryDate (final @Nullable java.sql.Timestamp DeliveryDate) { set_Value (COLUMNNAME_DeliveryDate, DeliveryDate); } @Override public java.sql.Timestamp getDeliveryDate() { return ge...
set_Value (COLUMNNAME_ItemName, ItemName); } @Override public java.lang.String getItemName() { return get_ValueAsString(COLUMNNAME_ItemName); } @Override public void setPrintingQueueAggregationKey (final @Nullable java.lang.String PrintingQueueAggregationKey) { set_Value (COLUMNNAME_PrintingQueueAggregati...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue.java
1
请完成以下Java代码
public void closing(CommandContext commandContext) {} @Override public void afterSessionsFlush(CommandContext commandContext) {} @Override public void closed(CommandContext context) { if (context.getEventDispatcher().isEnabled()) { context .getEventDispatcher() ...
commandContext.getException() ) ); } CommandConfig commandConfig = commandExecutor.getDefaultConfig().transactionRequiresNew(); FailedJobCommandFactory failedJobCommandFactory = commandContext.getFailedJobCommandFactory(); Command<Object> cmd = failed...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\jobexecutor\FailedJobListener.java
1
请完成以下Java代码
public String getTaskHadCandidateUser() { return taskHadCandidateUser; } public String[] getTaskDefinitionKeys() { return taskDefinitionKeys; } public List<TaskQueryVariableValue> getVariables() { return variables; } public Boolean getVariableNamesIgnoreCase() { return variableNamesIgnore...
public List<HistoricTaskInstanceQueryImpl> getQueries() { return queries; } public boolean isOrQueryActive() { return isOrQueryActive; } public void addOrQuery(HistoricTaskInstanceQueryImpl orQuery) { orQuery.isOrQueryActive = true; this.queries.add(orQuery); } public void setOrQueryActiv...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricTaskInstanceQueryImpl.java
1
请完成以下Java代码
public class X_M_HU_QRCode extends org.compiere.model.PO implements I_M_HU_QRCode, org.compiere.model.I_Persistent { private static final long serialVersionUID = -2052191480L; /** Standard Constructor */ public X_M_HU_QRCode (final Properties ctx, final int M_HU_QRCode_ID, @Nullable final String trxName) ...
} @Override public int getM_HU_QRCode_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_QRCode_ID); } @Override public void setRenderedQRCode (final String RenderedQRCode) { set_Value (COLUMNNAME_RenderedQRCode, RenderedQRCode); } @Override public String getRenderedQRCode() { return get_ValueAsString(CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_QRCode.java
1
请完成以下Java代码
public static void listCollectionNamesSolution() { MongoDatabase database = mongoClient.getDatabase(databaseName); boolean collectionExists = database.listCollectionNames() .into(new ArrayList<String>()) .contains(testCollectionName); System.out.println("collectionExist...
// // Check the db existence using DB class's method // collectionExistsSolution(); // // Check the db existence using the createCollection method of MongoDatabase class // createCollectionSolution(); // // Check the db existence using the listCo...
repos\tutorials-master\persistence-modules\java-mongodb-3\src\main\java\com\baeldung\mongo\collectionexistence\CollectionExistence.java
1
请在Spring Boot框架中完成以下Java代码
public byte[] getModelBytes(@ApiParam(name = "modelId") @PathVariable String modelId, HttpServletResponse response) { Model model = getModelFromRequest(modelId); byte[] editorSource = repositoryService.getModelEditorSource(model.getId()); if (editorSource == null) { throw new Flowabl...
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; if (multipartRequest.getFileMap().size() == 0) { throw new FlowableIllegalArgumentException("Multipart request with file content is required"); } MultipartFile file = multipartRequest.getFileMap()...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ModelSourceResource.java
2
请完成以下Java代码
public String getTableName() { return recordRef.getTableName(); } public DocumentId getDocumentId() { return DocumentId.of(recordRef.getRecord_ID()); } public Collection<IncludedDocumentToInvalidate> getIncludedDocuments() { return includedDocumentsByTableName.values(); }
DocumentToInvalidate combine(@NonNull final DocumentToInvalidate other) { Check.assumeEquals(this.recordRef, other.recordRef, "recordRef"); this.invalidateDocument = this.invalidateDocument || other.invalidateDocument; for (final Map.Entry<String, IncludedDocumentToInvalidate> e : other.includedDocumentsByTable...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\invalidation\DocumentToInvalidate.java
1
请完成以下Java代码
public JsonGetTransactionResponse getTransactionById(@NonNull final SumUpClientTransactionId id) { final String uri = UriComponentsBuilder.fromHttpUrl(BASE_URL) .pathSegment("me", "transactions") .queryParam("client_transaction_id", id.getAsString()) .toUriString(); final String json = httpCall(uri, H...
final String json = httpCall(uri, HttpMethod.GET, null, String.class); try { return jsonObjectMapper.readValue(json, JsonGetTransactionResponse.class) .withJson(json); } catch (JsonProcessingException ex) { throw AdempiereException.wrapIfNeeded(ex); } } public void refundTransaction(@NonNull ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\client\SumUpClient.java
1
请完成以下Java代码
public void setType(String type) { this.type = type; } public String getSource() { return source; } public void setSource(String source) { this.source = source; } /** * @deprecated since 7.4 A new instance of a sentry * does not reference the source case execution id anymore. */ pu...
return satisfied; } public void setSatisfied(boolean satisfied) { this.satisfied = satisfied; } public String getVariableEvent() { return variableEvent; } public void setVariableEvent(String variableEvent) { this.variableEvent = variableEvent; } public String getVariableName() { retu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CmmnSentryPart.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isReverseCharge(final TaxId taxId) { final Tax tax = taxBL.getTaxById(taxId); return tax.isReverseCharge(); } @NonNull public Account getTaxAccount( @NonNull final TaxId taxId, @NonNull final AcctSchemaId acctSchemaId, @NonNull final PostingSign postingSign) { final TaxAcctType taxAc...
} public Money calculateTaxAmt( @NonNull final Money lineAmt, @NonNull final TaxId taxId, final boolean isTaxIncluded) { // final CurrencyId currencyId = lineAmt.getCurrencyId(); final CurrencyPrecision precision = moneyService.getStdPrecision(currencyId); final Tax tax = taxBL.getTaxById(taxId); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalTaxProvider.java
2
请完成以下Java代码
public class ManagerRole { private static final long serialVersionUID = 1L; /** * 主键ID */ private Integer id; /** * 管理用户ID */ private Integer managerId; /** * 角色ID */ private Integer roleId; /** * 创建时间 */ private Date createdTime; /** ...
this.roleId = roleId; } /** * 获取 创建时间. * * @return 创建时间. */ public Date getCreatedTime() { return createdTime; } /** * 设置 创建时间. * * @param createdTime 创建时间. */ public void setCreatedTime(Date createdTime) { this.createdTime = createdTime;...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\dao\domain\ManagerRole.java
1
请完成以下Java代码
public static DistributionFacetId ofWarehouseFromId(@NonNull WarehouseId warehouseId) { return ofRepoId(DistributionFacetGroupType.WAREHOUSE_FROM, warehouseId); } public static DistributionFacetId ofWarehouseToId(@NonNull WarehouseId warehouseId) { return ofRepoId(DistributionFacetGroupType.WAREHOUSE_TO, wareh...
@SuppressWarnings("SameParameterValue") private static DistributionFacetId ofLocalDate(@NonNull DistributionFacetGroupType groupType, @NonNull LocalDate localDate) { final WorkflowLaunchersFacetId workflowLaunchersFacetId = WorkflowLaunchersFacetId.ofLocalDate(groupType.toWorkflowLaunchersFacetGroupId(), localDate)...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetId.java
1
请完成以下Java代码
public Esr5Type getEsr5() { return esr5; } /** * Sets the value of the esr5 property. * * @param value * allowed object is * {@link Esr5Type } * */ public void setEsr5(Esr5Type value) { this.esr5 = value; } /** * Gets the value ...
/** * Gets the value of the esrRed property. * * @return * possible object is * {@link EsrRedType } * */ public EsrRedType getEsrRed() { return esrRed; } /** * Sets the value of the esrRed property. * * @param value * allowed...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\ReimbursementType.java
1
请完成以下Java代码
public final String getName() { return m_name; } @JsonProperty("description") @JsonInclude(JsonInclude.Include.NON_EMPTY) public final String getDescription() { return m_description; } /** * Returns Key or Value as String * * @return String or null */ public abstract String getID(); /** * Com...
@Override public final int compareTo(Object o) { return compare(this, o); } // compareTo /** * Comparable Interface (based on toString value) * * @param o the Object to be compared. * @return a negative integer, zero, or a positive integer as this object * is less than, equal to, or greater ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\NamePair.java
1
请完成以下Java代码
protected VirtualFile getVirtualFileForUrl(final URL url) { try { return VFS.getChild(url.toURI()); } catch (URISyntaxException e) { throw LOG.exceptionWhileGettingVirtualFolder(url, e); } } protected void scanRoot(VirtualFile processArchiveRoot, final String[] additionalResourceSuffix...
} catch (IOException e) { LOG.cannotScanVfsRoot(processArchiveRoot, e); } } private void addResource(VirtualFile virtualFile, VirtualFile processArchiveRoot, Map<String, byte[]> resources) { String resourceName = virtualFile.getPathNameRelativeTo(processArchiveRoot); try { InputStream i...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\scanning\VfsProcessApplicationScanner.java
1
请完成以下Java代码
protected void moveExternalWorkerJobToExecutableJob(ExternalWorkerJobEntity externalWorkerJob, CommandContext commandContext) { jobServiceConfiguration.getJobManager().moveExternalWorkerJobToExecutableJob(externalWorkerJob); ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil...
ExternalWorkerJobEntityManager externalWorkerJobEntityManager = jobServiceConfiguration.getExternalWorkerJobEntityManager(); ExternalWorkerJobEntity job = externalWorkerJobEntityManager.findById(externalJobId); if (job == null) { throw new FlowableObjectNotFoundException("No External Worke...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\AbstractExternalWorkerJobCmd.java
1
请完成以下Java代码
public String getColumnSQL() { final boolean withAS = false; return gridField.getColumnSQL(withAS); } public int getDisplayType() { return gridField.getDisplayType(); } public ReferenceId getAD_Reference_Value_ID() { return gridField.getAD_Reference_Value_ID(); } public boolean isLookup() { retur...
@Override public Object convertValueToFieldType(final Object valueObj) { return UserQueryFieldHelper.parseValueObjectByColumnDisplayType(valueObj, getDisplayType(), getColumnName()); } @Override public String getValueDisplay(final Object value) { String infoDisplay = value == null ? "" : value.toString(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelSearchField.java
1
请完成以下Java代码
public String getParamName() { return paramName; } public String getApiKey() { return apiKey; } public void setApiKey(String apiKey) { this.apiKey = apiKey; } public String getApiKeyPrefix() { return apiKeyPrefix; } public void setApiKeyPrefix(String a...
if (apiKey == null) { return; } String value; if (apiKeyPrefix != null) { value = apiKeyPrefix + " " + apiKey; } else { value = apiKey; } if (location.equals("query")) { queryParams.add(paramName, value); } else if (...
repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\invoker\auth\ApiKeyAuth.java
1
请完成以下Java代码
S getSession() { return this.session; } @Override public long getCreationTime() { checkState(); return this.session.getCreationTime().toEpochMilli(); } @Override public String getId() { return this.session.getId(); } @Override public long getLastAccessedTime() { checkState(); return this.session...
} } } @Override public void removeAttribute(String name) { checkState(); Object oldValue = this.session.getAttribute(name); this.session.removeAttribute(name); if (oldValue instanceof HttpSessionBindingListener) { try { ((HttpSessionBindingListener) oldValue).valueUnbound(new HttpSessionBindingEven...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\HttpSessionAdapter.java
1
请完成以下Java代码
public class NGramDictionaryMaker { BinTrie<Integer> trie; /** * 转移矩阵 */ TMDictionaryMaker tmDictionaryMaker; public NGramDictionaryMaker() { trie = new BinTrie<Integer>(); tmDictionaryMaker = new TMDictionaryMaker(); } public void addPair(IWord first, IWord secon...
{ bw.write(entry.getKey() + " " + entry.getValue()); bw.newLine(); } bw.close(); } catch (Exception e) { Predefine.logger.warning("在保存NGram词典到" + path + "时发生异常" + e); return false; } return true; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\NGramDictionaryMaker.java
1
请完成以下Java代码
public void setPrice (BigDecimal Price) { set_Value (COLUMNNAME_Price, Price); } /** Get Price. @return Price */ public BigDecimal getPrice () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Price); if (bd == null) return Env.ZERO; return bd; } /** Set Product. @param Product Product *...
set_ValueNoCheck (COLUMNNAME_W_Basket_ID, Integer.valueOf(W_Basket_ID)); } /** Get W_Basket_ID. @return Web Basket */ public int getW_Basket_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_W_Basket_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Basket Line. @param W_BasketLi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_BasketLine.java
1
请完成以下Java代码
public class LogGrpcInterceptor implements ClientInterceptor { private static final Logger log = LoggerFactory.getLogger(LogGrpcInterceptor.class); @Override public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall( final MethodDescriptor<ReqT, RespT> method, final CallOptions ca...
super.onMessage(message); } @Override public void onHeaders(Metadata headers) { log.debug("gRPC headers: {}", headers); super.onHeaders(headers); ...
repos\grpc-spring-master\examples\cloud-grpc-client\src\main\java\net\devh\boot\grpc\examples\cloud\client\LogGrpcInterceptor.java
1
请完成以下Java代码
public ImportedValues getImportValues() { return importedValuesChild.getChild(this); } public void setImportValues(ImportedValues importedValues) { importedValuesChild.setChild(this, importedValues); } public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder...
}); expressionLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPRESSION_LANGUAGE) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); textChild = sequenceBuilder.element(Text.class) .build(); importedValuesChild = sequenceBuilder.element(ImportedValues.clas...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\LiteralExpressionImpl.java
1
请完成以下Spring Boot application配置
spring: application: name: demo-producer-application cloud: # Spring Cloud Stream 配置项,对应 BindingServiceProperties 类 stream: # Binder 配置项,对应 BinderProperties Map # binders: # Binding 配置项,对应 BindingProperties Map bindings: demo01-output: destination: DEMO-TOPIC-01 ...
acks: all # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。 # Kafka 自定义 Binding 配置项,对应 KafkaBindingProperties Map bindings: demo01-output: # Kafka Producer 配置项,对应 KafkaProducerProperties 类 producer: sync: true # 是否同步发送消息,默认为 false 异步。 server: ...
repos\SpringBoot-Labs-master\labx-11-spring-cloud-stream-kafka\labx-11-sc-stream-kafka-producer-transaction\src\main\resources\application.yml
2
请完成以下Java代码
public void setField(GridField mField) { m_mField = mField; EditorContextPopupMenu.onGridFieldSet(this); } // setField @Override public GridField getField() { return m_mField; } /** * Set Enabled * * @param enabled enabled */ @Override public void setEnabled(boolean enabled) { super.setEnab...
} @Override public void addKeyListener(final KeyListener l) { m_text.addKeyListener(l); } public int getCaretPosition() { return m_text.getCaretPosition(); } public void setCaretPosition(final int position) { m_text.setCaretPosition(position); } @Override public final ICopyPasteSupportEditor getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VDate.java
1
请在Spring Boot框架中完成以下Java代码
public void deleteIdentityLinksByScopeIdAndScopeType(String scopeId, String scopeType) { DbSqlSession dbSqlSession = getDbSqlSession(); Map<String, String> parameters = new HashMap<>(); parameters.put("scopeId", scopeId); parameters.put("scopeType", scopeType); if (ScopeTypes.C...
parameters.put("scopeType", scopeType); getDbSqlSession().delete("deleteIdentityLinksByScopeDefinitionIdAndScopeType", parameters, IdentityLinkEntityImpl.class); } @Override public void bulkDeleteIdentityLinksForScopeIdsAndScopeType(Collection<String> scopeIds, String scopeType) { Map<...
repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\persistence\entity\data\impl\MybatisIdentityLinkDataManager.java
2
请完成以下Java代码
public <T> T getParameterValueAs(@NonNull final String parameterName) { final DocumentFilterParam param = getParameterOrNull(parameterName); if (param == null) { return null; } @SuppressWarnings("unchecked") final T value = (T)param.getValue(); return value; } // // // // // public static fina...
} public DocumentFilterBuilder setFacetFilter(final boolean facetFilter) { return facetFilter(facetFilter); } public boolean hasParameters() { return !Check.isEmpty(parameters) || !Check.isEmpty(internalParameterNames); } public DocumentFilterBuilder setParameters(@NonNull final List<Documen...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilter.java
1
请完成以下Java代码
public ProcessPreconditionsResolution deriveWithCaptionOverride(@NonNull final String captionOverride) { return withCaptionMapper(new ProcessCaptionOverrideMapper(captionOverride)); } public ProcessPreconditionsResolution deriveWithCaptionOverride(@NonNull final ITranslatableString captionOverride) { return wi...
* Override default SortNo used with ordering related processes */ public ProcessPreconditionsResolution withSortNo(final int sortNo) { return !this.sortNo.isPresent() || this.sortNo.getAsInt() != sortNo ? toBuilder().sortNo(OptionalInt.of(sortNo)).build() : this; } public @NonNull OptionalInt getSortNo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessPreconditionsResolution.java
1
请完成以下Spring Boot application配置
spring: application: name: listener-demo cloud: # Consul consul: host: 127.0.0.1 port: 8500 server: port: 18080 # 随机端口,方便启动多个消费者 management: endpoints: # Actuator HTTP 配置项,对应 WebEndpointProperties 配
置类 web: exposure: include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
repos\SpringBoot-Labs-master\labx-29-spring-cloud-consul-bus\labx-29-sc-bus-consul-demo-listener-actuator\src\main\resources\application.yml
2
请完成以下Spring Boot application配置
spring.datasource.driver-class-name=com.amazonaws.secretsmanager.sql.AWSSecretsManagerMySQLDriver spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect spring.datasource.url=jdbc-secretsmanager:mysql://database-1.cwhqvgjbpgfw.eu-central-1.rds.amazonaws.com:3306/test spring.datasource.username=rds/credentials...
configuration back to default. spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=true spring.config.import=aws-secretsmanager:test/secret/
repos\tutorials-master\spring-boot-modules\spring-boot-data\src\main\resources\application-aws.properties
2
请完成以下Java代码
public class SetTaskVariablesCmd extends AbstractSetVariableCmd implements VariableInstanceLifecycleListener<VariableInstanceEntity> { private static final long serialVersionUID = 1L; protected boolean taskLocalVariablesUpdated = false; public SetTaskVariablesCmd(String taskId, Map<String, ? extends Object> v...
return getEntity().getExecution(); } protected void logVariableOperation(AbstractVariableScope scope) { TaskEntity task = (TaskEntity) scope; commandContext.getOperationLogManager().logVariableOperation(getLogEntryOperation(), null, task.getId(), PropertyChange.EMPTY_CHANGE); } protected void ch...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetTaskVariablesCmd.java
1
请完成以下Java代码
public class PrintingClient { private final transient Logger log = Logger.getLogger(getClass().getName()); private Thread clientDaemonThread; private PrintingClientDaemon clientDaemon; private final ReentrantLock threadCtrlLock = new ReentrantLock(); /** * NOTE: automatically start client thread. */ public...
} clientDaemon = null; clientDaemonThread = null; } finally { threadCtrlLock.unlock(); } } public void destroy() { stop(); } public boolean isStarted() { return clientDaemonThread != null && clientDaemonThread.isAlive(); } private Thread getCreateDaemonThread(final PrintingClientDaemon ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\PrintingClient.java
1
请完成以下Java代码
public class HibernateAnnotationUtil { private static final SessionFactory SESSION_FACTORY = buildSessionFactory(); /** * Utility class */ private HibernateAnnotationUtil() { } public static SessionFactory getSessionFactory() { return SESSION_FACTORY; } private static S...
Metadata metadata = new MetadataSources(serviceRegistry) .addAnnotatedClass(RuntimeConfiguration.class) .buildMetadata(); return metadata.buildSessionFactory(); } private static Map<String, Object> dbSettings() { Map<String, Object> dbSettings = new HashMap<>(); dbS...
repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\HibernateAnnotationUtil.java
1
请完成以下Java代码
public String[] getWhereClauses(final List<Object> params) { if (!checkbox.isEnabled() || !checkbox.isSelected()) { return null; } if (record2productId.isEmpty()) { return new String[] { "1=2" }; } final String productColumnName = org.compiere.model.I_M_Product.Table_Name + "." + org.compiere.mod...
// return new String[] { WHERECLAUSE_CLEAR_PREVIOUS, whereClause, WHERECLAUSE_STOP}; return new String[] { whereClause.toString() }; } @Override public String getText() { return null; } @Override public void prepareEditor(final CEditor editor, final Object value, final int rowIndexModel, final int columnIn...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\InfoProductQtyController.java
1
请完成以下Java代码
public ActivityImpl getParentActivity() { if (parent instanceof ActivityImpl) { return (ActivityImpl) parent; } return null; } // restricted setters /////////////////////////////////////////////////////// protected void setOutgoingTransitions(List<TransitionImpl> outgoi...
} @Override public void setY(int y) { this.y = y; } @Override public int getWidth() { return width; } @Override public void setWidth(int width) { this.width = width; } @Override public int getHeight() { return height; } @Override ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\process\ActivityImpl.java
1
请完成以下Java代码
public MessagesStats createMessagesStats(String key) { StatsCounter totalCounter = createStatsCounter(key, TOTAL_MSGS); StatsCounter successfulCounter = createStatsCounter(key, SUCCESSFUL_MSGS); StatsCounter failedCounter = createStatsCounter(key, FAILED_MSGS); return new DefaultMessages...
} return tags; } private static class StubCounter implements Counter { @Override public void increment(double amount) { } @Override public double count() { return 0; } @Override public Id getId() { return null; ...
repos\thingsboard-master\common\stats\src\main\java\org\thingsboard\server\common\stats\DefaultStatsFactory.java
1
请完成以下Java代码
public HttpServletRequestWrapper wrapRequest(HttpServletRequest req, boolean isBodyEmpty, PushbackInputStream requestBody) { return new HttpServletRequestWrapper(req) { @Override public ServletInputStream getInputStream() throws IOException { return new ServletInputStream() { final ...
} @Override public boolean markSupported() { return inputStream.markSupported(); } }; } @Override public BufferedReader getReader() throws IOException { return EmptyBodyFilter.this.getReader(this.getInputStream()); } }; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\filter\EmptyBodyFilter.java
1
请完成以下Java代码
default Supplier<SecurityContext> getDeferredContext() { return this::getContext; } /** * Sets the current context. * @param context to the new argument (should never be <code>null</code>, although * implementations must check if <code>null</code> has been passed and throw an * <code>IllegalArgumentExcepti...
* @since 5.8 */ default void setDeferredContext(Supplier<SecurityContext> deferredContext) { setContext(deferredContext.get()); } /** * Creates a new, empty context implementation, for use by * <tt>SecurityContextRepository</tt> implementations, when creating a new context for * the first time. * @retur...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\SecurityContextHolderStrategy.java
1