-
-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[persistence] Exclude items and groups (#4468)
Signed-off-by: Mark Herwege <[email protected]>
- Loading branch information
Showing
6 changed files
with
156 additions
and
18 deletions.
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
...ence/src/main/java/org/openhab/core/persistence/config/PersistenceGroupExcludeConfig.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* 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.openhab.core.persistence.config; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* This class represents the configuration that is used for excluding group items. | ||
* | ||
* @author Mark Herwege - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class PersistenceGroupExcludeConfig extends PersistenceConfig { | ||
|
||
private final String group; | ||
|
||
public PersistenceGroupExcludeConfig(final String group) { | ||
this.group = group; | ||
} | ||
|
||
public String getGroup() { | ||
return group; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return String.format("%s [group=%s]", getClass().getSimpleName(), group); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...tence/src/main/java/org/openhab/core/persistence/config/PersistenceItemExcludeConfig.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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* 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.openhab.core.persistence.config; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* This class represents the configuration that identify item(s) by name for exclusion. | ||
* | ||
* @author Mark Herwege - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class PersistenceItemExcludeConfig extends PersistenceConfig { | ||
final String item; | ||
|
||
public PersistenceItemExcludeConfig(final String item) { | ||
this.item = item; | ||
} | ||
|
||
public String getItem() { | ||
return item; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return String.format("%s [item=%s]", getClass().getSimpleName(), item); | ||
} | ||
} |
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