-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
review: deprecate WithSelectedFields in things model in favor in same…
… interface in base model Signed-off-by: Johannes Schneider <johannes.schneider@bosch.io>
- Loading branch information
Showing
5 changed files
with
62 additions
and
59 deletions.
There are no files selected for viewing
57 changes: 29 additions & 28 deletions
57
...model/src/main/java/org/eclipse/ditto/base/model/signals/commands/WithSelectedFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
/* | ||
* Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.ditto.base.model.signals.commands; | ||
/* | ||
* Copyright (c) 2022 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.ditto.base.model.signals.commands; | ||
|
||
import java.util.Optional; | ||
import java.util.Optional; | ||
|
||
import org.eclipse.ditto.json.JsonFieldSelector; | ||
|
||
/** | ||
* Command enabled for field selecting. | ||
* @since 2.4.0 | ||
*/ | ||
public interface WithSelectedFields { | ||
/** | ||
* Command enabled for field selecting. | ||
* | ||
* @since 2.4.0 | ||
*/ | ||
public interface WithSelectedFields { | ||
|
||
/** | ||
* Returns the selected fields which are to be included in the JSON of the retrieved entity. | ||
* | ||
* @return the selected fields. | ||
*/ | ||
default Optional<JsonFieldSelector> getSelectedFields() { | ||
return Optional.empty(); | ||
} | ||
/** | ||
* Returns the selected fields which are to be included in the JSON of the retrieved entity. | ||
* | ||
* @return the selected fields. | ||
*/ | ||
default Optional<JsonFieldSelector> getSelectedFields() { | ||
return Optional.empty(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 24 additions & 21 deletions
45
...del/src/main/java/org/eclipse/ditto/things/model/signals/commands/WithSelectedFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.ditto.things.model.signals.commands; | ||
/* | ||
* Copyright (c) 2021 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.ditto.things.model.signals.commands; | ||
|
||
import java.util.Optional; | ||
import java.util.Optional; | ||
|
||
import org.eclipse.ditto.json.JsonFieldSelector; | ||
import org.eclipse.ditto.json.JsonFieldSelector; | ||
|
||
public interface WithSelectedFields extends org.eclipse.ditto.base.model.signals.commands.WithSelectedFields { | ||
/** | ||
* @deprecated since 2.4.0 use {@link org.eclipse.ditto.base.model.signals.commands.WithSelectedFields} instead. | ||
*/ | ||
public interface WithSelectedFields extends org.eclipse.ditto.base.model.signals.commands.WithSelectedFields { | ||
|
||
@Override | ||
default Optional<JsonFieldSelector> getSelectedFields() { | ||
return Optional.empty(); | ||
} | ||
@Override | ||
default Optional<JsonFieldSelector> getSelectedFields() { | ||
return Optional.empty(); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters