COMMON: MISC: Added ITizenNativeXmlStore interface for using on the hybrid package. 33/11833/1
authorTaeyoung Son <taeyoung2.son@samsung.com>
Mon, 21 Oct 2013 07:02:12 +0000 (16:02 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Wed, 6 Nov 2013 06:12:35 +0000 (15:12 +0900)
Added org.tizen.common.ITizenNativeXMLStore class

Change-Id: I8cf2f9d876d5b8524851741dc8bfc17533696060
Signed-off-by: Taeyoung Son <taeyoung2.son@samsung.com>
org.tizen.common/src/org/tizen/common/ITizenNativeXMLStore.java [new file with mode: 0644]

diff --git a/org.tizen.common/src/org/tizen/common/ITizenNativeXMLStore.java b/org.tizen.common/src/org/tizen/common/ITizenNativeXMLStore.java
new file mode 100644 (file)
index 0000000..202a9c6
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * 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.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+public interface ITizenNativeXMLStore {
+    /**
+     * extension point id for implementing this interface.
+     */
+    public static final String EXSD_STORE_EXTENSION_POINT_ID = "org.tizen.nativecommon.store";
+
+    /**
+     * Class id of NewAppXmlStore which implements this interface.
+     */
+    public static final String EXSD_APP_XML_STORE_CLASS_ID = "org.tizen.nativecpp.misc.core.NewAppXmlStore";
+
+    /**
+     * This roles same as {@link ITizenNativeXmlStore#setProject(IProject), 
+     * except that this is for CLI because CLI cannot use IProject.
+     * 
+     * @param projectPath path of project in which xml will be stored
+     */
+    public void setProject(String projectPath);
+
+    /**
+     * Sets the project of this xml store.  
+     * @param project  - project in which xml is stored.
+     */
+    public void setProject(IProject project);
+
+    /**
+     * Parses xml files and loads.
+     */
+    public boolean loadXml();
+
+    /**
+     * Merges app data.  
+     * @param refAppXml  - xml store app data of which is merged into this xml store.
+     */
+    public void mergeAppData(ITizenNativeXMLStore refAppXml);
+
+    /**
+     * Merges privilege data.  
+     * @param refManifestl  - xml store privilege data of which is merged into this xml store.
+     */
+    public void mergePrivData(ITizenNativeXMLStore refManifest);
+
+    /**
+     * This roles same as {@link IXMLStore#storeXml(IFile)}, 
+     * except that this is for CLI because CLI cannt use IFile.
+     * 
+     * @param files to store this xml store
+     * @return true if store is success, fales if not
+     */
+    boolean storeXml(File file);
+}