diff --git a/examples/java-matter-controller/BUILD.gn b/examples/java-matter-controller/BUILD.gn index 154f75aba19227..9830b360195c1d 100644 --- a/examples/java-matter-controller/BUILD.gn +++ b/examples/java-matter-controller/BUILD.gn @@ -58,9 +58,6 @@ java_binary("java-matter-controller") { "java/src/com/matter/controller/commands/pairing/PairingModeType.java", "java/src/com/matter/controller/commands/pairing/PairingNetworkType.java", "java/src/com/matter/controller/commands/pairing/UnpairCommand.java", - "java/src/com/matter/controller/config/PersistentStorage.java", - "java/src/com/matter/controller/config/PersistentStorageOpCertStore.java", - "java/src/com/matter/controller/config/PersistentStorageOperationalKeystore.java", ] javac_flags = [ "-Xlint:deprecation" ] diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/common/MatterCommand.java b/examples/java-matter-controller/java/src/com/matter/controller/commands/common/MatterCommand.java index 5336ce8f24a991..b892c0bf678282 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/common/MatterCommand.java +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/common/MatterCommand.java @@ -19,21 +19,12 @@ package com.matter.controller.commands.common; import chip.devicecontroller.ChipDeviceController; -import com.matter.controller.config.PersistentStorage; -import com.matter.controller.config.PersistentStorageOpCertStore; -import com.matter.controller.config.PersistentStorageOperationalKeystore; import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; public abstract class MatterCommand extends Command { private final ChipDeviceController mChipDeviceController; - private final PersistentStorage mDefaultStorage = new PersistentStorage(); - private final PersistentStorage mCommissionerStorage = new PersistentStorage(); - private final PersistentStorageOperationalKeystore mOperationalKeystore = - new PersistentStorageOperationalKeystore(); - private final PersistentStorageOpCertStore mOpCertStore = new PersistentStorageOpCertStore(); - private final Optional mCredIssuerCmds; private final StringBuffer mCommissionerName = new StringBuffer(); private final StringBuffer mPaaTrustStorePath = new StringBuffer(); @@ -104,24 +95,11 @@ public ChipDeviceController currentCommissioner() { /////////// Command Interface ///////// @Override public void run() throws Exception { - // TODO: setup chip storage from Java, currently it is using example one from chip-tool - // maybeSetUpStack(); runCommand(); - // maybeTearDownStack(); } protected abstract void runCommand(); - private void maybeSetUpStack() throws Exception { - mDefaultStorage.init(); - mOperationalKeystore.init(mDefaultStorage); - mOpCertStore.init(mDefaultStorage); - } - - private void maybeTearDownStack() { - // ToDo:We need to call DeviceController::Shutdown() - } - public void setTestResult(String result) { mTestResult = Optional.of(result); } diff --git a/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorage.java b/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorage.java deleted file mode 100644 index eea19943ddf83c..00000000000000 --- a/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorage.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.matter.controller.config; - -public class PersistentStorage { - public void init() throws Exception { - throw new Exception("Failed to initialize PersistentStorage"); - } -} diff --git a/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorageOpCertStore.java b/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorageOpCertStore.java deleted file mode 100644 index 04b5617e799c39..00000000000000 --- a/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorageOpCertStore.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.matter.controller.config; - -public class PersistentStorageOpCertStore { - public int init(PersistentStorage storage) throws Exception { - throw new Exception("Failed to initialize PersistentStorageOpCertStore"); - } -} diff --git a/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorageOperationalKeystore.java b/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorageOperationalKeystore.java deleted file mode 100644 index 819a129af27448..00000000000000 --- a/examples/java-matter-controller/java/src/com/matter/controller/config/PersistentStorageOperationalKeystore.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.matter.controller.config; - -public class PersistentStorageOperationalKeystore { - public int init(PersistentStorage storage) throws Exception { - throw new Exception("Failed to initialize PersistentStorageOperationalKeystore"); - } -}