diff options
290 files changed, 4806 insertions, 4392 deletions
diff --git a/catalog/pom.xml b/catalog-core/catalog-mgr/pom.xml index 0bb17aa9..3ca842fd 100644 --- a/catalog/pom.xml +++ b/catalog-core/catalog-mgr/pom.xml @@ -1,68 +1,58 @@ <!--
- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ Copyright 2016 [ZTE] and others.
- 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
+ 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
+ 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.
+ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>catalog-parent</artifactId>
- <groupId>org.openo.orchestrator.nfv.catalog</groupId>
- <version>0.0.1-SNAPSHOT</version>
+ <groupId>org.openo.commontosca.catalog</groupId>
+ <artifactId>catalog-core-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
- <artifactId>catalog</artifactId>
- <name>openo/catalog/catalog</name>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>catalog-mgr</artifactId>
+ <name>openo/commontosca/catalog/catalog-mgr</name>
<packaging>jar</packaging>
- <properties>
- <dropwizard.version>0.8.0</dropwizard.version>
- <jackson-version>2.5.1</jackson-version>
- <jersey.version>2.16</jersey.version>
- <swagger.version>1.5.3</swagger.version>
- </properties>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <versionRange>[2.0,)</versionRange>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
<plugins>
<plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <versionRange>[2.0,)</versionRange>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
@@ -99,7 +89,7 @@ <transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.openo.orchestrator.nfv.catalog.catalogApp</mainClass>
+ <mainClass>org.openo.commontosca.catalog.catalogApp</mainClass>
</transformer>
</transformers>
</configuration>
@@ -133,6 +123,7 @@ </build>
<dependencies>
+ <!-- dropwizard -->
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
@@ -142,6 +133,15 @@ <artifactId>dropwizard-assets</artifactId>
</dependency>
<dependency>
+ <groupId>io.dropwizard</groupId>
+ <artifactId>dropwizard-hibernate</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.dropwizard</groupId>
+ <artifactId>dropwizard-migrations</artifactId>
+ </dependency>
+ <!-- swagger -->
+ <dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
</dependency>
@@ -150,7 +150,7 @@ <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
- <!-- Jersey -->
+ <!-- jersey -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
@@ -186,12 +186,12 @@ <!-- gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
+ <artifactId>gson</artifactId>
</dependency>
+ <!-- dom4j -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
- <version>1.6</version>
</dependency>
<!-- cometd -->
<dependency>
@@ -205,6 +205,7 @@ <dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-client</artifactId>
+ <version>${cometd.version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
@@ -223,72 +224,56 @@ <groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</dependency>
- <!-- db-->
+ <!-- mysql -->
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ </dependency>
+ <!-- http server -->
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <!-- UT -->
<dependency>
<groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-hibernate</artifactId>
+ <artifactId>dropwizard-testing</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-migrations</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.18</version>
- </dependency>
- <!-- http server -->
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.2.1</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.4</version>
- </dependency>
- <!-- UT -->
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-testing</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.4.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>1.4.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.8.2</version>
- <scope>test</scope>
-</dependency>
- <!-- UT end -->
- </dependencies>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- UT end -->
+ </dependencies>
</project>
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/CatalogApp.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/CatalogApp.java index 4181a636..0b97867d 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/CatalogApp.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/CatalogApp.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog;
+package org.openo.commontosca.catalog;
import io.dropwizard.Application;
import io.dropwizard.assets.AssetsBundle;
@@ -32,18 +32,18 @@ import javax.servlet.DispatcherType; import org.eclipse.jetty.servlets.CrossOriginFilter;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
-import org.openo.orchestrator.nfv.catalog.common.Config;
-import org.openo.orchestrator.nfv.catalog.common.HttpServerAddrConfig;
-import org.openo.orchestrator.nfv.catalog.common.HttpServerPathConfig;
-import org.openo.orchestrator.nfv.catalog.common.MsbAddrConfig;
-import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager;
-import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData;
-import org.openo.orchestrator.nfv.catalog.db.entity.PackageData;
-import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData;
-import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData;
-import org.openo.orchestrator.nfv.catalog.health.ConsoleHealthCheck;
-import org.openo.orchestrator.nfv.catalog.resources.PackageResource;
-import org.openo.orchestrator.nfv.catalog.resources.TemplateResource;
+import org.openo.commontosca.catalog.common.Config;
+import org.openo.commontosca.catalog.common.MsbAddrConfig;
+import org.openo.commontosca.catalog.db.entity.ServiceTemplateData;
+import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData;
+import org.openo.commontosca.catalog.health.ConsoleHealthCheck;
+import org.openo.commontosca.catalog.resources.PackageResource;
+import org.openo.commontosca.catalog.resources.TemplateResource;
+import org.openo.commontosca.catalog.common.HttpServerAddrConfig;
+import org.openo.commontosca.catalog.common.HttpServerPathConfig;
+import org.openo.commontosca.catalog.db.dao.DaoManager;
+import org.openo.commontosca.catalog.db.entity.NodeTemplateData;
+import org.openo.commontosca.catalog.db.entity.PackageData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -107,7 +107,7 @@ public class CatalogApp extends Application<CatalogAppConfiguration> { // environment.jersey().register(new VNFSoftwareVersionResource());
// register rest interface
- environment.jersey().packages("org.openo.orchestrator.nfv.catalog.resources");
+ environment.jersey().packages("org.openo.commontosca.catalog.resources");
// upload file by inputstream need to register MultiPartFeature
environment.jersey().register(MultiPartFeature.class);
@@ -130,7 +130,7 @@ public class CatalogApp extends Application<CatalogAppConfiguration> { BeanConfig config = new BeanConfig();
config.setTitle("Open-o Catalog Service rest API");
config.setVersion("1.0.0");
- config.setResourcePackage("org.openo.orchestrator.nfv.catalog.resources");
+ config.setResourcePackage("org.openo.commontosca.catalog.resources");
// set rest api basepath in swagger
SimpleServerFactory simpleServerFactory =
(SimpleServerFactory) configuration.getServerFactory();
@@ -161,7 +161,7 @@ public class CatalogApp extends Application<CatalogAppConfiguration> { // servlet
environment
.getApplicationContext()
- .addServlet("org.openo.orchestrator.nfv.catalog.cometd.CometdServlet",
+ .addServlet("CometdServlet",
"/api/nsoccataloguenotification/v1").setInitOrder(2);// add
// servlet
}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/CatalogAppConfiguration.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/CatalogAppConfiguration.java index 3d7dd48c..1f74f61b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/CatalogAppConfiguration.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/CatalogAppConfiguration.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog;
+package org.openo.commontosca.catalog;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdException.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdException.java index 32f52a4c..0a84ce3e 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdException.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdException.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.cometd;
+package org.openo.commontosca.catalog.cometd;
/**
* @author 10189609
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdService.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdService.java index 35a96e21..9af11450 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdService.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdService.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.cometd;
+package org.openo.commontosca.catalog.cometd;
import java.io.IOException;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdServlet.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdServlet.java index 7a9c2d06..6b69542a 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdServlet.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdServlet.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.cometd;
+package org.openo.commontosca.catalog.cometd;
import java.io.IOException;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java index 0b9ae71b..6955451c 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/cometd/CometdUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/cometd/CometdUtil.java @@ -1,17 +1,17 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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.
*/
/**
* Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
@@ -28,7 +28,7 @@ * See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.openo.orchestrator.nfv.catalog.cometd;
+package org.openo.commontosca.catalog.cometd;
import java.io.IOException;
import java.util.Map;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/CommonConstant.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/CommonConstant.java index 0c3444ce..08741619 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/CommonConstant.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/CommonConstant.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.common; +package org.openo.commontosca.catalog.common; public class CommonConstant { diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/CommonErrorResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/CommonErrorResponse.java new file mode 100644 index 00000000..c260b923 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/CommonErrorResponse.java @@ -0,0 +1,49 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.common;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @author 00164331
+ *
+ */
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class CommonErrorResponse {
+
+ private String code;
+
+ private String message;
+
+ /**
+ * @param message2
+ * @return
+ */
+ public static Object failure(String message) {
+ return message;
+ }
+
+ public CommonErrorResponse(String message) {
+ super();
+ this.message = message;
+ }
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/Config.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/Config.java new file mode 100644 index 00000000..b0799017 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/Config.java @@ -0,0 +1,31 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.common;
+
+import org.openo.commontosca.catalog.CatalogAppConfiguration;
+
+
+public class Config {
+ private static CatalogAppConfiguration configration;
+
+ public static CatalogAppConfiguration getConfigration() {
+ return configration;
+ }
+
+ public static void setConfigration(CatalogAppConfiguration config) {
+ configration = config;
+ }
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/DateTimeUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/DateTimeUtil.java new file mode 100644 index 00000000..41c38672 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/DateTimeUtil.java @@ -0,0 +1,33 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.common; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class DateTimeUtil { + public static String getCurrentTime() { + return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()); + } + + public static String getFormatTime(Date date) { + return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(date); + } + + public static String getFormatTime(Date date, String format) { + return new SimpleDateFormat(format).format(date); + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/EnumUploadStatus.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/EnumUploadStatus.java new file mode 100644 index 00000000..0c811bde --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/EnumUploadStatus.java @@ -0,0 +1,20 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.common; + +public enum EnumUploadStatus { + Create_Directory_Success, Create_Directory_Fail, File_Exist, Upload_From_Break_Success, Upload_From_Break_Failed, Upload_New_File_Success, Upload_New_File_Failed +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/FileUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/FileUtil.java index 3d8db9f9..ce90f34c 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/FileUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/FileUtil.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.common;
+package org.openo.commontosca.catalog.common;
import java.io.BufferedOutputStream;
import java.io.File;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/FtpClient.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/FtpClient.java index fdf74a32..a7a9e37b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/FtpClient.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/FtpClient.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.common; +package org.openo.commontosca.catalog.common; import java.io.FileOutputStream; import java.io.IOException; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/HttpServerAddrConfig.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/HttpServerAddrConfig.java new file mode 100644 index 00000000..e8f27b56 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/HttpServerAddrConfig.java @@ -0,0 +1,34 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.common;
+
+/**
+ * @author 00164331
+ *
+ */
+public class HttpServerAddrConfig {
+
+ protected static String httpServerAddress;
+
+ public static String getHttpServerAddress() {
+ return httpServerAddress;
+ }
+
+ public static void setHttpServerAddress(String httpServerAddress) {
+ HttpServerAddrConfig.httpServerAddress = httpServerAddress;
+ }
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/HttpServerPathConfig.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/HttpServerPathConfig.java new file mode 100644 index 00000000..6a538713 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/HttpServerPathConfig.java @@ -0,0 +1,32 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.common;
+
+/**
+ * @author 00164331
+ *
+ */
+public class HttpServerPathConfig {
+ protected static String httpServerPath;
+
+ public static String getHttpServerPath() {
+ return httpServerPath;
+ }
+
+ public static void setHttpServerPath(String httpServerPath) {
+ HttpServerPathConfig.httpServerPath = httpServerPath;
+ }
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/MSBUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/MSBUtil.java index a827604a..357d1943 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/MSBUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/MSBUtil.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.common;
+package org.openo.commontosca.catalog.common;
/**
* micro-service bus utility class;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/MsbAddrConfig.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/MsbAddrConfig.java new file mode 100644 index 00000000..5fcf6849 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/MsbAddrConfig.java @@ -0,0 +1,34 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.common;
+
+/**
+ * @author 00164331
+ *
+ */
+public class MsbAddrConfig {
+
+ protected static String msbAddress;
+
+ public static String getMsbAddress() {
+ return msbAddress;
+ }
+
+ public static void setMsbAddress(String msbAddress) {
+ MsbAddrConfig.msbAddress = msbAddress;
+ }
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/RestUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/RestUtil.java new file mode 100644 index 00000000..f754974e --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/RestUtil.java @@ -0,0 +1,35 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.common;
+
+import javax.ws.rs.core.Response;
+
+/**
+ * @author 00164331
+ *
+ */
+public class RestUtil {
+ /**
+ * @param e
+ * @return
+ */
+ public static Response getRestException(String errorMsg) {
+ String code = "001";
+ return Response.status(Response.Status.INTERNAL_SERVER_ERROR)
+ .entity(new CommonErrorResponse(code, errorMsg)).build();
+ }
+
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/ToolUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/ToolUtil.java index ed025a0b..60a08583 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/ToolUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/ToolUtil.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.common; +package org.openo.commontosca.catalog.common; import java.io.File; import java.io.FileOutputStream; @@ -25,7 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.UUID; -import org.openo.orchestrator.nfv.catalog.model.common.EnumToscaNodeTypeDefinition; +import org.openo.commontosca.catalog.model.common.EnumToscaNodeTypeDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/ZipCompressor.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/ZipCompressor.java index 53f9c1cb..8d24eac9 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/ZipCompressor.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/common/ZipCompressor.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.common;
+package org.openo.commontosca.catalog.common;
import java.io.BufferedInputStream;
import java.io.File;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/common/CatalogResuorceType.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/common/CatalogResuorceType.java new file mode 100644 index 00000000..6a12ffef --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/common/CatalogResuorceType.java @@ -0,0 +1,27 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.common; + +/** + ** @author 10159474 + */ +public enum CatalogResuorceType { + SERVICETEMPLATE, PACKAGE, NODETEMPLATE, TEMPLATE, SERVICETEMPLATEMAPPING; + + public static CatalogResuorceType getType(String type) { + return valueOf(type); + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/common/Parameters.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/common/Parameters.java new file mode 100644 index 00000000..ddd414b8 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/common/Parameters.java @@ -0,0 +1,24 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.common; + +/** + * *@author 10159474 + * + */ +public enum Parameters { + oid, name, provider, version, deletionPending, type, status, csarId, vendor, serviceTemplateId, nodeTemplateId, mappingId, nodeType; +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/BaseDao.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/BaseDao.java index 728d7333..f6b4d48b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/BaseDao.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/BaseDao.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.dao; +package org.openo.commontosca.catalog.db.dao; import java.util.List; import java.util.Map; @@ -24,8 +24,8 @@ import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.criterion.Restrictions; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.HqlFactory; import io.dropwizard.hibernate.AbstractDAO; import io.dropwizard.util.Generics; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/DaoManager.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/DaoManager.java index f5de4d27..6c9a5333 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/DaoManager.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/DaoManager.java @@ -1,22 +1,22 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.dao; +package org.openo.commontosca.catalog.db.dao; import org.hibernate.SessionFactory; -import org.openo.orchestrator.nfv.catalog.db.common.CatalogResuorceType; +import org.openo.commontosca.catalog.db.common.CatalogResuorceType; /** * DAO manager class @@ -115,5 +115,11 @@ public class DaoManager { public void setTemplateMappingDao(ServiceTemplateMappingDao templateMappingDao) { this.templateMappingDao = templateMappingDao; } - -} + public void setDaoNull() + { + this.nodeTemplateDao=null; + this.templateDao=null; + this.serviceTemplateDao=null; + this.packageDao=null; + this.templateMappingDao=null; +}} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/NodeTemplateDao.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/NodeTemplateDao.java new file mode 100644 index 00000000..41253d96 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/NodeTemplateDao.java @@ -0,0 +1,35 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.dao; + +import org.hibernate.SessionFactory; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; + + +/** + * host DAO class + * + * *@author 10159474 + * + */ +public class NodeTemplateDao extends BaseDao<NodeTemplateData> { + + public NodeTemplateDao(SessionFactory sessionFactory) { + super(sessionFactory); + } + + +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/PackageDao.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/PackageDao.java new file mode 100644 index 00000000..7f8a5036 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/PackageDao.java @@ -0,0 +1,35 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.dao; + +import org.hibernate.SessionFactory; +import org.openo.commontosca.catalog.db.entity.PackageData; + + +/** + * host DAO class + * + * *@author 10159474 + * + */ +public class PackageDao extends BaseDao<PackageData> { + + public PackageDao(SessionFactory sessionFactory) { + super(sessionFactory); + } + + +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/ServiceTemplateDao.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/ServiceTemplateDao.java new file mode 100644 index 00000000..e2a5f3c2 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/ServiceTemplateDao.java @@ -0,0 +1,37 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.dao; + +import org.hibernate.SessionFactory; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * DAO class + * + * *@author 10159474 + * + */ +public class ServiceTemplateDao extends BaseDao<ServiceTemplateData> { + private static final Logger logger = LoggerFactory.getLogger(ServiceTemplateDao.class); + + public ServiceTemplateDao(SessionFactory sessionFactory) { + super(sessionFactory); + } + + +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/ServiceTemplateMappingDao.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/ServiceTemplateMappingDao.java new file mode 100644 index 00000000..558ce13a --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/ServiceTemplateMappingDao.java @@ -0,0 +1,37 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.dao; + +import org.hibernate.SessionFactory; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * DAO class + * + * *@author 10159474 + * + */ +public class ServiceTemplateMappingDao extends BaseDao<ServiceTemplateMappingData> { + private static final Logger logger = LoggerFactory.getLogger(ServiceTemplateMappingDao.class); + + public ServiceTemplateMappingDao(SessionFactory sessionFactory) { + super(sessionFactory); + } + + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/TemplateDao.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/TemplateDao.java index bb7c0376..5c39a9e8 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/TemplateDao.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/dao/TemplateDao.java @@ -1,26 +1,26 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.dao; +package org.openo.commontosca.catalog.db.dao; import org.hibernate.HibernateException; import org.hibernate.SessionFactory; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/BaseData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/BaseData.java new file mode 100644 index 00000000..99fe14ec --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/BaseData.java @@ -0,0 +1,20 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.entity; + +public class BaseData { + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/NodeTemplateData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/NodeTemplateData.java index e060ed49..aeef00b9 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/NodeTemplateData.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/NodeTemplateData.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.entity; +package org.openo.commontosca.catalog.db.entity; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/PackageData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/PackageData.java index 3d403be5..6c4a8110 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/PackageData.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/PackageData.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.entity; +package org.openo.commontosca.catalog.db.entity; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/ServiceTemplateData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/ServiceTemplateData.java index 1e094566..6e5963aa 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/ServiceTemplateData.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/ServiceTemplateData.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.entity; +package org.openo.commontosca.catalog.db.entity; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/ServiceTemplateMappingData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/ServiceTemplateMappingData.java index f85ce627..a0a632c5 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/ServiceTemplateMappingData.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/ServiceTemplateMappingData.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.entity; +package org.openo.commontosca.catalog.db.entity; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/TemplateData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/TemplateData.java new file mode 100644 index 00000000..ff139b1e --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/entity/TemplateData.java @@ -0,0 +1,41 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.entity; + +import java.util.ArrayList; + +public class TemplateData extends BaseData { + private ServiceTemplateData serviceTemplate; + private ArrayList<NodeTemplateData> nodeTemplates = new ArrayList<NodeTemplateData>(); + + public ServiceTemplateData getServiceTemplate() { + return serviceTemplate; + } + + public void setServiceTemplate(ServiceTemplateData serviceTemplate) { + this.serviceTemplate = serviceTemplate; + } + + public ArrayList<NodeTemplateData> getNodeTemplates() { + return nodeTemplates; + } + + public void setNodeTemplates(ArrayList<NodeTemplateData> nodeTemplates) { + this.nodeTemplates = nodeTemplates; + } + + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/exception/CatalogResourceException.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/exception/CatalogResourceException.java index da10bf9a..5a858d31 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/exception/CatalogResourceException.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/exception/CatalogResourceException.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.exception; +package org.openo.commontosca.catalog.db.exception; /** * diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/exception/ErrorCodeException.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/exception/ErrorCodeException.java index ef9d2c85..33e6d9fa 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/exception/ErrorCodeException.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/exception/ErrorCodeException.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.exception; +package org.openo.commontosca.catalog.db.exception; /** diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/resource/PackageManager.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/resource/PackageManager.java index 8d6bae26..124fc358 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/resource/PackageManager.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/resource/PackageManager.java @@ -1,31 +1,31 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource; +package org.openo.commontosca.catalog.db.resource; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.common.Parameters; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; -import org.openo.orchestrator.nfv.catalog.db.wrapper.PackageHandler; +import org.openo.commontosca.catalog.db.common.Parameters; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.db.wrapper.PackageHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/resource/TemplateManager.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/resource/TemplateManager.java index 9d706649..564116d8 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/resource/TemplateManager.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/resource/TemplateManager.java @@ -1,37 +1,37 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource; +package org.openo.commontosca.catalog.db.resource; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.common.Parameters; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; -import org.openo.orchestrator.nfv.catalog.db.wrapper.NodeTemplateHandler; -import org.openo.orchestrator.nfv.catalog.db.wrapper.ServiceTemplateHandler; -import org.openo.orchestrator.nfv.catalog.db.wrapper.ServiceTemplateMappingHandler; -import org.openo.orchestrator.nfv.catalog.db.wrapper.TemplateHandler; +import org.openo.commontosca.catalog.db.common.Parameters; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.wrapper.ServiceTemplateHandler; +import org.openo.commontosca.catalog.db.wrapper.ServiceTemplateMappingHandler; +import org.openo.commontosca.catalog.db.wrapper.TemplateHandler; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.db.wrapper.NodeTemplateHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/util/CatalogDbUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/util/CatalogDbUtil.java new file mode 100644 index 00000000..6924a305 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/util/CatalogDbUtil.java @@ -0,0 +1,44 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.db.util; + +import java.util.UUID; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.gson.Gson; + +public class CatalogDbUtil { + private final static Logger logger = LoggerFactory.getLogger(CatalogDbUtil.class); + + public static String generateId() { + return UUID.randomUUID().toString(); + } + + public static boolean isNotEmpty(String s) { + return s != null && !"".equals(s) && s.length() > 0; + } + + public static String objectToString(Object obj) { + Gson gson = new Gson(); + if (obj != null) + return gson.toJson(obj); + else + return null; + } + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/util/HqlFactory.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/util/HqlFactory.java index 6e84f28e..c7db51bf 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/util/HqlFactory.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/util/HqlFactory.java @@ -1,26 +1,24 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.util; +package org.openo.commontosca.catalog.db.util; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Arrays; -import org.openo.orchestrator.nfv.catalog.db.entity.BaseData; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/BaseHandler.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/BaseHandler.java index 926694f9..d5840930 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/BaseHandler.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/BaseHandler.java @@ -1,29 +1,28 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.wrapper; +package org.openo.commontosca.catalog.db.wrapper; import java.util.List; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.dao.BaseDao; -import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager; -import org.openo.orchestrator.nfv.catalog.db.entity.BaseData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.entity.BaseData; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.dao.BaseDao; +import org.openo.commontosca.catalog.db.dao.DaoManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/NodeTemplateHandler.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/NodeTemplateHandler.java index fd01de03..a96e9371 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/NodeTemplateHandler.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/NodeTemplateHandler.java @@ -1,26 +1,26 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.wrapper; +package org.openo.commontosca.catalog.db.wrapper; import java.util.ArrayList; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.common.CatalogResuorceType; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.common.CatalogResuorceType; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/PackageHandler.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/PackageHandler.java index 2e3752a8..8fd4d04c 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/PackageHandler.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/PackageHandler.java @@ -1,29 +1,29 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.wrapper; +package org.openo.commontosca.catalog.db.wrapper; import java.util.ArrayList; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.common.CatalogResuorceType; -import org.openo.orchestrator.nfv.catalog.db.common.Parameters; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.common.CatalogResuorceType; +import org.openo.commontosca.catalog.db.common.Parameters; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.util.HqlFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/ServiceTemplateHandler.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/ServiceTemplateHandler.java index 65f539c2..4412dee3 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/ServiceTemplateHandler.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/ServiceTemplateHandler.java @@ -1,32 +1,27 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.wrapper; +package org.openo.commontosca.catalog.db.wrapper; import java.util.ArrayList; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.common.CatalogResuorceType; -import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager; -import org.openo.orchestrator.nfv.catalog.db.dao.ServiceTemplateDao; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.common.CatalogResuorceType; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/ServiceTemplateMappingHandler.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/ServiceTemplateMappingHandler.java index 0fa2e493..25f7982e 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/ServiceTemplateMappingHandler.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/ServiceTemplateMappingHandler.java @@ -1,30 +1,27 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.wrapper; +package org.openo.commontosca.catalog.db.wrapper; import java.util.ArrayList; import java.util.Map; -import org.openo.orchestrator.nfv.catalog.db.common.CatalogResuorceType; -import org.openo.orchestrator.nfv.catalog.db.common.Parameters; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.common.CatalogResuorceType; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/TemplateHandler.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/TemplateHandler.java index ff9d6885..714dd06b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/wrapper/TemplateHandler.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/db/wrapper/TemplateHandler.java @@ -1,28 +1,28 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.wrapper; +package org.openo.commontosca.catalog.db.wrapper; import java.util.ArrayList; -import org.openo.orchestrator.nfv.catalog.db.common.CatalogResuorceType; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.CatalogDbUtil; +import org.openo.commontosca.catalog.db.common.CatalogResuorceType; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/CSARPackage.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/CSARPackage.java index 0586d012..671a8514 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/CSARPackage.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/CSARPackage.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.entity; +package org.openo.commontosca.catalog.entity; public class CSARPackage { private String id; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/CSARQueryCondition.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/CSARQueryCondition.java new file mode 100644 index 00000000..a9c43e4c --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/CSARQueryCondition.java @@ -0,0 +1,38 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class CSARQueryCondition {
+
+ private String csarId;
+
+ private String name;
+
+ private String provider;
+
+ private String version;
+
+ private Boolean deletionPending;
+
+ private EnumType type;
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumOperationalState.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumOperationalState.java new file mode 100644 index 00000000..b1f16ec6 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumOperationalState.java @@ -0,0 +1,20 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity;
+
+public enum EnumOperationalState {
+ Enabled, Disabled
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumProcessState.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumProcessState.java new file mode 100644 index 00000000..62dab552 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumProcessState.java @@ -0,0 +1,24 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity;
+
+/**
+ * @author 00164331
+ *
+ */
+public enum EnumProcessState {
+ normal, onBoarding, onBoardFailed, deleting, deleteFailed
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumType.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumType.java new file mode 100644 index 00000000..7a25d748 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumType.java @@ -0,0 +1,20 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity;
+
+public enum EnumType {
+ GSAR, SSAR, NSAR, NFAR
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumUsageState.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumUsageState.java new file mode 100644 index 00000000..e2ffed13 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/EnumUsageState.java @@ -0,0 +1,20 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity;
+
+public enum EnumUsageState {
+ InUse, NotInUse
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/VnfPackage.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/VnfPackage.java index 71004912..2d3e80c4 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/VnfPackage.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/VnfPackage.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.entity;
+package org.openo.commontosca.catalog.entity;
public class VnfPackage {
private String vnfPackageId;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/request/PackageBasicInfo.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/request/PackageBasicInfo.java new file mode 100644 index 00000000..998c2121 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/request/PackageBasicInfo.java @@ -0,0 +1,38 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity.request;
+
+import org.openo.commontosca.catalog.entity.EnumType;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class PackageBasicInfo {
+
+ private String provider;
+
+ private EnumType type;
+
+ private String version;
+
+ private String format;
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/request/UploadPackageFromFtpRequest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/request/UploadPackageFromFtpRequest.java new file mode 100644 index 00000000..c3a7850b --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/request/UploadPackageFromFtpRequest.java @@ -0,0 +1,41 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity.request;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import org.openo.commontosca.catalog.entity.EnumType;
+
+/**
+ * @author 00164331
+ *
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class UploadPackageFromFtpRequest {
+
+ private String provider;
+
+ private EnumType type;
+
+ private String version;
+
+ private String ftpUrl;
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/CsarFileUriResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/CsarFileUriResponse.java new file mode 100644 index 00000000..a418cc75 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/CsarFileUriResponse.java @@ -0,0 +1,35 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity.response;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * @author 00164331
+ *
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class CsarFileUriResponse {
+
+ private String downloadUri;
+
+ private String localPath;
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/PackageMeta.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/PackageMeta.java new file mode 100644 index 00000000..e727c3e6 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/PackageMeta.java @@ -0,0 +1,61 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity.response;
+
+import org.openo.commontosca.catalog.entity.EnumProcessState;
+import org.openo.commontosca.catalog.entity.EnumOperationalState;
+import org.openo.commontosca.catalog.entity.EnumUsageState;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class PackageMeta {
+
+ private String csarId;
+
+ private String name;
+
+ private String downloadUri;
+
+ private String size;
+
+ private String version;
+
+ private String provider;
+
+ private String type;
+
+ private String format;
+
+ private boolean deletionPending;
+
+ private String createTime;
+
+ private String modifyTime;
+
+ private EnumOperationalState operationalState;
+
+ private EnumUsageState usageState;
+
+ private String onBoardState;
+
+ private EnumProcessState processState;
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/UpdatePackageResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/UpdatePackageResponse.java new file mode 100644 index 00000000..6c7beb73 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/UpdatePackageResponse.java @@ -0,0 +1,29 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity.response;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class UpdatePackageResponse {
+
+ private String usageState;
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/UploadPackageResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/UploadPackageResponse.java new file mode 100644 index 00000000..3542155f --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/entity/response/UploadPackageResponse.java @@ -0,0 +1,30 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.entity.response;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class UploadPackageResponse {
+
+ private String csarId;
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManager.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManager.java new file mode 100644 index 00000000..69870d0c --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManager.java @@ -0,0 +1,36 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.filemanage; + +import java.util.ArrayList; + +import org.openo.commontosca.catalog.filemanage.entity.FileLink; + +public interface FileManager { + /** + * @param srcPath + * @param dstPath/packageType/provider/packageName/version + * @return + */ + boolean upload(String srcPath, String dstPath); + + boolean download(String srcPath, String dstPath); + + boolean delete(String srcPath); + + ArrayList<FileLink> queryWorkFlow(String path); + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManagerFactory.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManagerFactory.java index 28db5729..b8e4ba90 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManagerFactory.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManagerFactory.java @@ -1,21 +1,21 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.filemanage; +package org.openo.commontosca.catalog.filemanage; -import org.openo.orchestrator.nfv.catalog.filemanage.http.HttpFileManagerImpl; +import org.openo.commontosca.catalog.filemanage.http.HttpFileManagerImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManagerType.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManagerType.java new file mode 100644 index 00000000..eab0ee3f --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/FileManagerType.java @@ -0,0 +1,23 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.filemanage; + +public enum FileManagerType { + ftp, http; + public static FileManagerType getType(String type) { + return valueOf(type); + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/entity/FileLink.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/entity/FileLink.java new file mode 100644 index 00000000..9149d529 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/entity/FileLink.java @@ -0,0 +1,29 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.filemanage.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class FileLink { + private String fileName; + private String downloadUri; + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/http/HttpFileManagerImpl.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/http/HttpFileManagerImpl.java index 8ce1d87b..c323f11a 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/http/HttpFileManagerImpl.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/http/HttpFileManagerImpl.java @@ -1,26 +1,26 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.filemanage.http; +package org.openo.commontosca.catalog.filemanage.http; import java.io.File; import java.io.IOException; import java.util.ArrayList; -import org.openo.orchestrator.nfv.catalog.filemanage.FileManager; -import org.openo.orchestrator.nfv.catalog.filemanage.entity.FileLink; +import org.openo.commontosca.catalog.filemanage.FileManager; +import org.openo.commontosca.catalog.filemanage.entity.FileLink; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/http/ToolUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/http/ToolUtil.java index c0ac1362..c90e6dbe 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/http/ToolUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/filemanage/http/ToolUtil.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.filemanage.http; +package org.openo.commontosca.catalog.filemanage.http; import java.io.File; import java.io.FileInputStream; @@ -23,9 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import org.openo.orchestrator.nfv.catalog.common.Config; -import org.openo.orchestrator.nfv.catalog.common.HttpServerAddrConfig; -import org.openo.orchestrator.nfv.catalog.common.HttpServerPathConfig; +import org.openo.commontosca.catalog.common.HttpServerPathConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/ftp/Ftp.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/ftp/Ftp.java new file mode 100644 index 00000000..74b30662 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/ftp/Ftp.java @@ -0,0 +1,42 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.ftp;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ * @author 00164331
+ *
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class Ftp {
+
+ private String ipAddr;
+
+ private Integer port;
+
+ private String userName;
+
+ private String pwd;
+
+ private String path;
+
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/ftp/FtpUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/ftp/FtpUtil.java index 257b4e20..cec4d30f 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/ftp/FtpUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/ftp/FtpUtil.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.ftp;
+package org.openo.commontosca.catalog.ftp;
import java.io.File;
import java.io.FileInputStream;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/health/ConsoleHealthCheck.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/health/ConsoleHealthCheck.java new file mode 100644 index 00000000..b517bc8b --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/health/ConsoleHealthCheck.java @@ -0,0 +1,35 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.health;
+
+import com.codahale.metrics.health.HealthCheck;
+
+public class ConsoleHealthCheck extends HealthCheck {
+ private final String template;
+
+ public ConsoleHealthCheck(String template) {
+ this.template = template;
+ }
+
+ @Override
+ protected Result check() throws Exception {
+ final String saying = String.format(template, "TEST");
+ if (!saying.contains("TEST")) {
+ return Result.unhealthy("template doesn't include a name");
+ }
+ return Result.healthy();
+ }
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/EnumToscaNodeTypeDefinition.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java index 06b9f29a..0627d743 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/EnumToscaNodeTypeDefinition.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaNodeTypeDefinition.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.common;
+package org.openo.commontosca.catalog.model.common;
public enum EnumToscaNodeTypeDefinition {
VNF{
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaRelationShipDefinition.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaRelationShipDefinition.java new file mode 100644 index 00000000..2aecf42c --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/EnumToscaRelationShipDefinition.java @@ -0,0 +1,46 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.common;
+
+public enum EnumToscaRelationShipDefinition {
+ VirtualBindsTo{
+ @Override
+ public String getName(){
+ return "tosca.relationships.nfv.VirtualBindsTo";
+ }
+ },
+ VirtualLinksTo{
+ @Override
+ public String getName(){
+ return "tosca.relationships.nfv.VirtualLinksTo";
+ }
+ },
+ DeployedOn{
+ @Override
+ public String getName(){
+ return "tosca.relationships.nfv.DeployedOn";
+ }
+ },
+ BelongTo{
+ @Override
+ public String getName(){
+ return "tosca.relationships.nfv.BelongTo";
+ }
+ };
+
+ public abstract String getName();
+
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/TemplateDataHelper.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateDataHelper.java index eb7274b8..859ea522 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/TemplateDataHelper.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateDataHelper.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.common; +package org.openo.commontosca.catalog.model.common; import java.util.ArrayList; import java.util.Arrays; @@ -23,17 +23,17 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import org.openo.orchestrator.nfv.catalog.common.ToolUtil; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.model.entity.InputParameter; -import org.openo.orchestrator.nfv.catalog.model.entity.NodeTemplate; -import org.openo.orchestrator.nfv.catalog.model.entity.RelationShip; -import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplate; -import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplateOperation; -import org.openo.orchestrator.nfv.catalog.model.entity.SubstitutionMapping; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.model.entity.ServiceTemplate; +import org.openo.commontosca.catalog.model.entity.ServiceTemplateOperation; +import org.openo.commontosca.catalog.model.entity.SubstitutionMapping; +import org.openo.commontosca.catalog.common.ToolUtil; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.model.entity.InputParameter; +import org.openo.commontosca.catalog.model.entity.NodeTemplate; +import org.openo.commontosca.catalog.model.entity.RelationShip; import com.google.gson.Gson; import com.google.gson.JsonElement; @@ -52,7 +52,7 @@ public class TemplateDataHelper { * @return */ public static TemplateData convert2TemplateData(ServiceTemplate st, - String rawData, List<NodeTemplate> ntList) { + String rawData, List<NodeTemplate> ntList) { TemplateData td = new TemplateData(); td.setServiceTemplate(convert2ServiceTemplateData(st, rawData)); td.setNodeTemplates(convert2NodeTemplateDataList(ntList, diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/EnumDataType.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/EnumDataType.java new file mode 100644 index 00000000..3bafbbef --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/EnumDataType.java @@ -0,0 +1,42 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; + +/** + * @author 10090474 + * + */ +@AllArgsConstructor +public enum EnumDataType { + STRING("String"), INTEGER("Integer"), FLOAT("Float"), BOOLEAN("Boolean"); + + private String value; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/InputParameter.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/InputParameter.java new file mode 100644 index 00000000..1f8a1b49 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/InputParameter.java @@ -0,0 +1,36 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author 10090474 + * + */ + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class InputParameter { + private String name; + private EnumDataType type = EnumDataType.STRING; + private String description; + private String defaultValue; + private boolean required; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/KeyValuePair.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/KeyValuePair.java new file mode 100644 index 00000000..b582b876 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/KeyValuePair.java @@ -0,0 +1,28 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class KeyValuePair { + private String key; + private String value; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/NfvTemplate.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/NfvTemplate.java new file mode 100644 index 00000000..ab606621 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/NfvTemplate.java @@ -0,0 +1,33 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class NfvTemplate { + private List<NodeTemplate> vduNodes; + private List<NodeTemplate> networkNodes; + private List<NodeTemplate> vnfcNodes; + private List<NodeTemplate> vnfNodes; + +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/NodeTemplate.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/NodeTemplate.java new file mode 100644 index 00000000..f2a8ca34 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/NodeTemplate.java @@ -0,0 +1,34 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import java.util.List; +import java.util.Map; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class NodeTemplate { + private String id; + private String name; + private String type; + private Map<String, Object> properties; + private List<RelationShip> relationShips; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/QueryRawDataCondition.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/QueryRawDataCondition.java new file mode 100644 index 00000000..6eff7437 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/QueryRawDataCondition.java @@ -0,0 +1,33 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author 10090474 + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class QueryRawDataCondition { + private String csarId; + private KeyValuePair[] inputParameters; + +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/RelationShip.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/RelationShip.java new file mode 100644 index 00000000..a65e74d4 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/RelationShip.java @@ -0,0 +1,31 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class RelationShip { + private String sourceNodeName; + private String targetNodeName; + private String sourceNodeId; + private String targetNodeId; + private String type; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplate.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplate.java new file mode 100644 index 00000000..703103b3 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplate.java @@ -0,0 +1,35 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ServiceTemplate { + private String serviceTemplateId; + private String templateName; + private String vendor; + private String version; + private String csarid; + private String type; + private String downloadUri; + private InputParameter[] inputs; + private ServiceTemplateOperation[] operations; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplateOperation.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplateOperation.java new file mode 100644 index 00000000..dab206c2 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplateOperation.java @@ -0,0 +1,30 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ServiceTemplateOperation { + private String name; + private String description; + private String processId; + private InputParameter[] inputs; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplateRawData.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplateRawData.java new file mode 100644 index 00000000..351f74e4 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/ServiceTemplateRawData.java @@ -0,0 +1,27 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ServiceTemplateRawData { + private String rawData; +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/SubstitutionMapping.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/SubstitutionMapping.java index 2218ac61..56223381 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/SubstitutionMapping.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/entity/SubstitutionMapping.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.entity; +package org.openo.commontosca.catalog.model.entity; import java.util.ArrayList; import java.util.HashMap; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerSelfServiceProvider.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerSelfServiceProvider.java index 86aecb04..e6a6423c 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerSelfServiceProvider.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerSelfServiceProvider.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import java.io.IOException; import java.io.InputStream; @@ -28,7 +28,7 @@ import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerSelfService; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerSelfService; /** diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServiceConsumer.java index c726c9a8..d6f70d0c 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServiceConsumer.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServiceConsumer.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import java.io.InputStream; import java.util.List; @@ -31,12 +31,12 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataMultiPart; import org.glassfish.jersey.media.multipart.MultiPartFeature; -import org.openo.orchestrator.nfv.catalog.common.Config; -import org.openo.orchestrator.nfv.catalog.common.ToolUtil; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerSelfService; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerSelfServiceOption; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServiceNodeTemplateList; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServiceTemplateList; +import org.openo.commontosca.catalog.common.Config; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerSelfServiceOption; +import org.openo.commontosca.catalog.common.ToolUtil; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerSelfService; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServiceNodeTemplateList; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServiceTemplateList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServiceNodeTemplateProvider.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServiceNodeTemplateProvider.java index d803b027..daf57c28 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServiceNodeTemplateProvider.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServiceNodeTemplateProvider.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import java.io.IOException; import java.io.InputStream; @@ -29,7 +29,7 @@ import javax.xml.bind.Unmarshaller; import javax.xml.transform.Source; import javax.xml.transform.sax.SAXSource; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServiceNodeTemplateList; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServiceNodeTemplateList; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.xml.sax.helpers.XMLReaderFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServicePackageProvider.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServicePackageProvider.java index 0a0198a1..5cb25499 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServicePackageProvider.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServicePackageProvider.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import java.io.IOException; import java.io.InputStream; @@ -28,7 +28,7 @@ import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServicePackageList; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServicePackageList; /** * The opentosca container service returns data to the package entity diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServiceTemplateProvider.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServiceTemplateProvider.java index f8bc8d34..38a66ddd 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/ContainerServiceTemplateProvider.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/ContainerServiceTemplateProvider.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import java.io.IOException; import java.io.InputStream; @@ -28,7 +28,7 @@ import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServiceTemplateList; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServiceTemplateList; /** * The opentosca container self service returns data to the service template entity diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerExtPackageRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerExtPackageRest.java new file mode 100644 index 00000000..e471ea16 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerExtPackageRest.java @@ -0,0 +1,48 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.container; + +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServicePackageList; + +/** + * The opentosca container interface for csar. + * @author 10189609 + * + */ +@Path("/csars") +public interface IContainerExtPackageRest { + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + public ContainerServicePackageList getToscaServicePackage(@QueryParam("csarName") String csarName); + + @POST + @Consumes(MediaType.TEXT_PLAIN) + public String uploadPackageByToscaService(@QueryParam("fileLocation") String fileLocation); + + @Path("/{csarId}") + @DELETE + public String deletePackageById(@PathParam("csarId") String csarId); +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerPortabilityRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerPortabilityRest.java new file mode 100644 index 00000000..a12c0a1b --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerPortabilityRest.java @@ -0,0 +1,33 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.container; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; + +/** + * The opentosca container interface for policy. + * @author 10189609 + * + */ +@Path("/servicetemplates") +public interface IContainerPortabilityRest { + + @Path("/{templateid}/policys") + @GET + String getToscaPolicys(@PathParam("templateid") String serviceTemplateID); +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerSelfServiceRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerSelfServiceRest.java index 9b05643d..29a59f99 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerSelfServiceRest.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerSelfServiceRest.java @@ -1,26 +1,26 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerSelfService; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerSelfService; /** * The opentosca container interface for self service. diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerTemplateRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerTemplateRest.java new file mode 100644 index 00000000..5573d996 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/IContainerTemplateRest.java @@ -0,0 +1,43 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.container; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServiceNodeTemplateList; +import org.openo.commontosca.catalog.model.externalservice.entity.containerEntity.ContainerServiceTemplateList; + +/** + * The opentosca container interface for service template. + * @author 10189609 + * + */ +@Path("/servicetemplates") +public interface IContainerTemplateRest { + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + ContainerServiceTemplateList getToscaServiceTemplate(@QueryParam("templateid") String templateId); + + @Path("/{templateid}/nodetemplates") + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + ContainerServiceNodeTemplateList getToscaServiceNodeTemplates(@PathParam("templateid") String templateId); +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/NamespaceFilter.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/NamespaceFilter.java index ba4bcbf6..4f71996e 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/NamespaceFilter.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/NamespaceFilter.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container;
+package org.openo.commontosca.catalog.model.externalservice.container;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/StringProvider.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/StringProvider.java index bb896280..6eb9b95c 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/StringProvider.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/container/StringProvider.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; +package org.openo.commontosca.catalog.model.externalservice.container; import java.io.IOException; import java.io.InputStream; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerSelfService.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerSelfService.java index d6ddaabb..c01dee6b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerSelfService.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerSelfService.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import java.util.List; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerSelfServiceOption.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerSelfServiceOption.java index 84ba5c25..ee5794df 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerSelfServiceOption.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerSelfServiceOption.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceCommonParam.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceCommonParam.java new file mode 100644 index 00000000..3be5de90 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceCommonParam.java @@ -0,0 +1,45 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; + +@XmlAccessorType(XmlAccessType.FIELD) +public class ContainerServiceCommonParam { + @XmlElement + private String key; + + @XmlElement + private String value; + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplate.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplate.java index c8955a0c..de4a6cd0 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplate.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplate.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import java.util.ArrayList; import java.util.List; @@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import org.openo.orchestrator.nfv.catalog.common.ToolUtil; +import org.openo.commontosca.catalog.common.ToolUtil; @XmlRootElement diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplateList.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplateList.java new file mode 100644 index 00000000..096da0e6 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplateList.java @@ -0,0 +1,40 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; + +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlRootElement(name="nodetemplates") +public class ContainerServiceNodeTemplateList { + @XmlElement(name="nodetemplate") + private List<ContainerServiceNodeTemplate> nodeTemplate; + + public List<ContainerServiceNodeTemplate> getNodeTemplate() { + return nodeTemplate; + } + + public void setNodeTemplate(List<ContainerServiceNodeTemplate> nodeTemplate) { + this.nodeTemplate = nodeTemplate; + } + + +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceOperationParameter.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceOperationParameter.java new file mode 100644 index 00000000..215b3ed5 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceOperationParameter.java @@ -0,0 +1,24 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; + +/** + * @author 10189609 + * + */ +public class ContainerServiceOperationParameter { + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServicePackage.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServicePackage.java index 7f1a8e39..c91b6e1e 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServicePackage.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServicePackage.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServicePackageList.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServicePackageList.java new file mode 100644 index 00000000..c3b7dd73 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServicePackageList.java @@ -0,0 +1,41 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; + +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlRootElement(name="packages") +public class ContainerServicePackageList { + public static final String NAMESPACE_OF_SELFSERVICE="http://www.eclipse.org/winery/model/selfservice"; + + @XmlElement(name="package") + private List<ContainerServicePackage> packageList; + + public List<ContainerServicePackage> getPackageList() { + return packageList; + } + + public void setPackageList(List<ContainerServicePackage> packageList) { + this.packageList = packageList; + } + +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceRelationShip.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceRelationShip.java index 5ffd290d..08b238fc 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceRelationShip.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceRelationShip.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplate.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplate.java index d839e599..f7165c12 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplate.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplate.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import java.util.List; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplateList.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplateList.java index 5864afba..81021f52 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplateList.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/containerEntity/ContainerServiceTemplateList.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.containerEntity; import java.util.List; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/lifecycleEnity/InstanceEntity.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/lifecycleEnity/InstanceEntity.java new file mode 100644 index 00000000..3d317c6d --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/lifecycleEnity/InstanceEntity.java @@ -0,0 +1,28 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.entity.lifecycleEnity; + +public class InstanceEntity { + private String serviceTemplateId; + + public String getServiceTemplateId() { + return serviceTemplateId; + } + + public void setServiceTemplateId(String serviceTemplateId) { + this.serviceTemplateId = serviceTemplateId; + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/roEntity/ResourceResponseEntity.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/roEntity/ResourceResponseEntity.java new file mode 100644 index 00000000..d98bb87c --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/roEntity/ResourceResponseEntity.java @@ -0,0 +1,42 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.externalservice.entity.roEntity; + +import java.util.ArrayList; + +public class ResourceResponseEntity +{ + ArrayList <VimEntity> data=new ArrayList<VimEntity>(); + String operationResult; + + public String getOperationResult() + { + return operationResult; + } + + public void setOperationResult(String operationResult) + { + this.operationResult = operationResult; + } + public ArrayList <VimEntity> getData() + { + return data; + } + public void setData(ArrayList <VimEntity> data) + { + this.data = data; + } +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/roEntity/VimEntity.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/roEntity/VimEntity.java index 85c14a21..98f59200 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/roEntity/VimEntity.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/entity/roEntity/VimEntity.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.roEntity; +package org.openo.commontosca.catalog.model.externalservice.entity.roEntity; public class VimEntity { diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/lifecycle/ILifeCycleServiceRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/lifecycle/ILifeCycleServiceRest.java new file mode 100644 index 00000000..df87a529 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/lifecycle/ILifeCycleServiceRest.java @@ -0,0 +1,33 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.externalservice.lifecycle;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * The lifecycle interface.
+ * @author 10189609
+ *
+ */
+@Path("/appinstances")
+public interface ILifeCycleServiceRest {
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public String getVNFInstances();
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/lifecycle/LifeCycleServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/lifecycle/LifeCycleServiceConsumer.java index b0255ffd..f3bed0a0 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/lifecycle/LifeCycleServiceConsumer.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/lifecycle/LifeCycleServiceConsumer.java @@ -1,26 +1,26 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.lifecycle;
+package org.openo.commontosca.catalog.model.externalservice.lifecycle;
import java.lang.reflect.Type;
import java.util.ArrayList;
-import org.openo.orchestrator.nfv.catalog.common.MSBUtil;
-import org.openo.orchestrator.nfv.catalog.common.ToolUtil;
-import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.lifecycleEnity.InstanceEntity;
+import org.openo.commontosca.catalog.common.MSBUtil;
+import org.openo.commontosca.catalog.common.ToolUtil;
+import org.openo.commontosca.catalog.model.externalservice.entity.lifecycleEnity.InstanceEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/ro/IResourceServiceRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/ro/IResourceServiceRest.java new file mode 100644 index 00000000..d4075abe --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/ro/IResourceServiceRest.java @@ -0,0 +1,35 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.externalservice.ro;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * The roc resource interface.
+ * @author 10189609
+ *
+ */
+@Path("/resource")
+public interface IResourceServiceRest {
+ @Path("/vims/{vim_id}")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public String getResourceVim(@PathParam("vim_id") String vimId) throws Exception;
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/ro/ResourceServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/ro/ResourceServiceConsumer.java index c71117be..65431a2b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/ro/ResourceServiceConsumer.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/externalservice/ro/ResourceServiceConsumer.java @@ -1,24 +1,24 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.ro;
+package org.openo.commontosca.catalog.model.externalservice.ro;
-import org.openo.orchestrator.nfv.catalog.common.MSBUtil;
-import org.openo.orchestrator.nfv.catalog.common.ToolUtil;
-import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.roEntity.ResourceResponseEntity;
-import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.roEntity.VimEntity;
+import org.openo.commontosca.catalog.common.MSBUtil;
+import org.openo.commontosca.catalog.common.ToolUtil;
+import org.openo.commontosca.catalog.model.externalservice.entity.roEntity.ResourceResponseEntity;
+import org.openo.commontosca.catalog.model.externalservice.entity.roEntity.VimEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/AbstractModelParser.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/AbstractModelParser.java new file mode 100644 index 00000000..22780a31 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/AbstractModelParser.java @@ -0,0 +1,30 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.parser;
+
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+
+public abstract class AbstractModelParser {
+ /**
+ * @param packageId
+ * @param fileLocation
+ * @return service template id
+ * @throws CatalogResourceException
+ */
+ public abstract String parse(String packageId, String fileLocation)
+ throws CatalogResourceException;
+
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/EnumPackageFormat.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/EnumPackageFormat.java new file mode 100644 index 00000000..10f60b99 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/EnumPackageFormat.java @@ -0,0 +1,25 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.parser;
+
+/**
+ * enum data.
+ * @author 10189609
+ *
+ */
+public enum EnumPackageFormat {
+ TOSCA_XML, TOSCA_YAML
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/EnumTemplateType.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/EnumTemplateType.java new file mode 100644 index 00000000..e84bc871 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/EnumTemplateType.java @@ -0,0 +1,20 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.parser;
+
+public enum EnumTemplateType {
+ NS, VNF
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/ModelParserFactory.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java index cdc9977d..74c2e2c1 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/ModelParserFactory.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ModelParserFactory.java @@ -1,24 +1,24 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.parser;
+package org.openo.commontosca.catalog.model.parser;
import java.util.HashMap;
import java.util.Map;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
public class ModelParserFactory {
private final static ModelParserFactory instance = new ModelParserFactory();
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/ToscaYamlModelParser.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ToscaYamlModelParser.java index 86f43f13..17932538 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/ToscaYamlModelParser.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/ToscaYamlModelParser.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.parser;
+package org.openo.commontosca.catalog.model.parser;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
@@ -30,27 +30,23 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
-import org.openo.orchestrator.nfv.catalog.common.ToolUtil;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.db.resource.TemplateManager;
-import org.openo.orchestrator.nfv.catalog.entity.response.CsarFileUriResponse;
-import org.openo.orchestrator.nfv.catalog.model.common.TemplateDataHelper;
-import org.openo.orchestrator.nfv.catalog.model.entity.EnumDataType;
-import org.openo.orchestrator.nfv.catalog.model.entity.InputParameter;
-import org.openo.orchestrator.nfv.catalog.model.entity.NodeTemplate;
-import org.openo.orchestrator.nfv.catalog.model.entity.RelationShip;
-import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplate;
-import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplateOperation;
-import org.openo.orchestrator.nfv.catalog.model.entity.SubstitutionMapping;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.YamlParseServiceConsumer;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.EnumYamlServiceTemplateInfo;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlRequestParemeter;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult.Plan;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult.Plan.PlanValue.PlanInput;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult.TopologyTemplate.Input;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult.TopologyTemplate.NodeTemplate.Relationship;
-import org.openo.orchestrator.nfv.catalog.wrapper.PackageWrapper;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.db.resource.TemplateManager;
+import org.openo.commontosca.catalog.entity.response.CsarFileUriResponse;
+import org.openo.commontosca.catalog.model.common.TemplateDataHelper;
+import org.openo.commontosca.catalog.model.entity.InputParameter;
+import org.openo.commontosca.catalog.model.entity.RelationShip;
+import org.openo.commontosca.catalog.model.entity.ServiceTemplate;
+import org.openo.commontosca.catalog.model.entity.ServiceTemplateOperation;
+import org.openo.commontosca.catalog.model.entity.SubstitutionMapping;
+import org.openo.commontosca.catalog.model.parser.yaml.entity.ParseYamlResult;
+import org.openo.commontosca.catalog.wrapper.PackageWrapper;
+import org.openo.commontosca.catalog.common.ToolUtil;
+import org.openo.commontosca.catalog.model.entity.EnumDataType;
+import org.openo.commontosca.catalog.model.entity.NodeTemplate;
+import org.openo.commontosca.catalog.model.parser.yaml.YamlParseServiceConsumer;
+import org.openo.commontosca.catalog.model.parser.yaml.entity.EnumYamlServiceTemplateInfo;
+import org.openo.commontosca.catalog.model.parser.yaml.entity.ParseYamlRequestParemeter;
public class ToscaYamlModelParser extends AbstractModelParser{
@@ -168,7 +164,7 @@ public class ToscaYamlModelParser extends AbstractModelParser{ return null;
}
- org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult.TopologyTemplate.SubstitutionMapping stm = result
+ ParseYamlResult.TopologyTemplate.SubstitutionMapping stm = result
.getTopologyTemplate().getSubstitutionMappings();
return new SubstitutionMapping(serviceTemplateId, type,
stm.getRequirementList(), stm.getCapabilityList());
@@ -198,13 +194,13 @@ public class ToscaYamlModelParser extends AbstractModelParser{ * @param planList
* @return
*/
- private ServiceTemplateOperation[] parseOperations(List<Plan> planList) {
+ private ServiceTemplateOperation[] parseOperations(List<ParseYamlResult.Plan> planList) {
if (planList == null || planList.isEmpty()) {
return new ServiceTemplateOperation[0];
}
List<ServiceTemplateOperation> opList = new ArrayList<>();
- for (Plan plan : planList) {
+ for (ParseYamlResult.Plan plan : planList) {
ServiceTemplateOperation op = new ServiceTemplateOperation();
op.setName(plan.getName());
op.setDescription(plan.getDescription());
@@ -223,13 +219,13 @@ public class ToscaYamlModelParser extends AbstractModelParser{ * @param inputList
* @return
*/
- private InputParameter[] parsePlanInputs(List<PlanInput> inputList) {
+ private InputParameter[] parsePlanInputs(List<ParseYamlResult.Plan.PlanValue.PlanInput> inputList) {
if (inputList == null || inputList.isEmpty()) {
return new InputParameter[0];
}
List<InputParameter> retList = new ArrayList<>();
- for (PlanInput input : inputList) {
+ for (ParseYamlResult.Plan.PlanValue.PlanInput input : inputList) {
retList.add(new InputParameter(input.getName(),
getEnumDataType(input.getType()), input.getDescription(),
input.getDefault(), input.isRequired()));
@@ -238,12 +234,12 @@ public class ToscaYamlModelParser extends AbstractModelParser{ }
private InputParameter[] parseInputs(ParseYamlResult result) {
- List<Input> inputList = result.getTopologyTemplate().getInputs();
+ List<ParseYamlResult.TopologyTemplate.Input> inputList = result.getTopologyTemplate().getInputs();
if(inputList == null){
return null;
}
ArrayList<InputParameter> retList = new ArrayList<InputParameter>();
- for(Input input : inputList){
+ for(ParseYamlResult.TopologyTemplate.Input input : inputList){
retList.add(new InputParameter(input.getName(),
getEnumDataType(input.getType()), input.getDescription(),
input.getDefault(), input.isRequired()));
@@ -303,14 +299,14 @@ public class ToscaYamlModelParser extends AbstractModelParser{ private List<RelationShip> parseNodeTemplateRelationShip(
- List<Relationship> relationshipList) {
+ List<ParseYamlResult.TopologyTemplate.NodeTemplate.Relationship> relationshipList) {
List<RelationShip> retList = new ArrayList<>();
if (relationshipList == null) {
return retList;
}
- for (Relationship relationship : relationshipList) {
+ for (ParseYamlResult.TopologyTemplate.NodeTemplate.Relationship relationship : relationshipList) {
RelationShip ret = new RelationShip();
ret.setSourceNodeId(relationship.getSourceNodeName());
ret.setSourceNodeName(relationship.getSourceNodeName());
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/IYamlParseRest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/IYamlParseRest.java new file mode 100644 index 00000000..8d24a606 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/IYamlParseRest.java @@ -0,0 +1,43 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.parser.yaml;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.openo.commontosca.catalog.model.parser.yaml.entity.ParseYamlRequestParemeter;
+
+/**
+ *
+ * @author 10090474
+ *
+ */
+@Path("/parse")
+public interface IYamlParseRest {
+ /**
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ String parse(ParseYamlRequestParemeter request)
+ throws Exception;
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/YamlParseServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/YamlParseServiceConsumer.java new file mode 100644 index 00000000..5942a8bd --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/YamlParseServiceConsumer.java @@ -0,0 +1,55 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.parser.yaml;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.openo.commontosca.catalog.common.MSBUtil;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.model.parser.yaml.entity.ParseYamlResult;
+import org.openo.commontosca.catalog.model.parser.yaml.entity.ParseYamlRequestParemeter;
+
+import com.eclipsesource.jaxrs.consumer.ConsumerFactory;
+import com.google.gson.Gson;
+
+/**
+ *
+ * @author 10090474
+ *
+ */
+public class YamlParseServiceConsumer {
+ /**
+ * get service template by template id from container service.
+ *
+ * @param request
+ * @return
+ * @throws CatalogResourceException
+ */
+ public static ParseYamlResult getServiceTemplates(
+ final ParseYamlRequestParemeter request)
+ throws CatalogResourceException {
+ try {
+ ClientConfig config = new ClientConfig();
+ IYamlParseRest yamlParseProxy = ConsumerFactory
+ .createConsumer(MSBUtil.getYamlParseBaseUrl(), config,
+ IYamlParseRest.class);
+ String jsonStr = yamlParseProxy.parse(request);
+ return new Gson().fromJson(jsonStr, ParseYamlResult.class);
+ } catch (Exception e) {
+ throw new CatalogResourceException("Call parser api failed.", e);
+ }
+
+ }
+}
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/EnumYamlServiceTemplateInfo.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/EnumYamlServiceTemplateInfo.java new file mode 100644 index 00000000..ea9fe998 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/EnumYamlServiceTemplateInfo.java @@ -0,0 +1,41 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.parser.yaml.entity;
+
+
+
+public enum EnumYamlServiceTemplateInfo {
+ ID{
+ @Override
+ public String getName() {
+ return "id";
+ }
+ },
+ VERSION{
+ @Override
+ public String getName() {
+ return "version";
+ }
+ },
+ PROVIDER{
+ @Override
+ public String getName() {
+ return "vendor";
+ }
+ };
+
+ public abstract String getName();
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/ParseYamlRequestParemeter.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlRequestParemeter.java index 97eca652..49d6f4cb 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/ParseYamlRequestParemeter.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlRequestParemeter.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity;
+package org.openo.commontosca.catalog.model.parser.yaml.entity;
import java.util.List;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/ParseYamlResult.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java index 2b4f9f1f..fa9cdf7b 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/ParseYamlResult.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/parser/yaml/entity/ParseYamlResult.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity;
+package org.openo.commontosca.catalog.model.parser.yaml.entity;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/IWSO2RestService.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/IWSO2RestService.java new file mode 100644 index 00000000..9f1706a3 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/IWSO2RestService.java @@ -0,0 +1,63 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.model.plan.wso2;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.glassfish.jersey.media.multipart.FormDataMultiPart;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.DeletePackageResponse;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.DeployPackageResponse;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.StartProcessResponse;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.StartProcessRequest;
+
+/**
+ *
+ * @author 10090474
+ *
+ */
+@Path("/openoapi/wso2bpel/v1")
+public interface IWSO2RestService {
+ /**
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @Path("/package")
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ DeployPackageResponse deployPackage(FormDataMultiPart request) throws Exception;
+
+ @Path("/package/{packageName}")
+ @DELETE
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ DeletePackageResponse deletePackage(
+ @PathParam("packageName") String packageName) throws Exception;
+
+ @Path("process/instance")
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ StartProcessResponse startProcess(StartProcessRequest request)
+ throws Exception;
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/WSO2ServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/WSO2ServiceConsumer.java index c7775f0d..114e9d21 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/WSO2ServiceConsumer.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/WSO2ServiceConsumer.java @@ -1,28 +1,28 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.plan.wso2;
+package org.openo.commontosca.catalog.model.plan.wso2;
import java.util.Map;
import org.glassfish.jersey.client.ClientConfig;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.DeletePackageResponse;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.DeployPackageResponse;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.StartProcessRequest;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.StartProcessResponse;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.DeletePackageResponse;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.StartProcessResponse;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.DeployPackageResponse;
+import org.openo.commontosca.catalog.model.plan.wso2.entity.StartProcessRequest;
import com.eclipsesource.jaxrs.consumer.ConsumerFactory;
@@ -103,7 +103,7 @@ public class WSO2ServiceConsumer { * @throws CatalogResourceException
*/
StartProcessResponse startProcess(String processId,
- Map<String, Object> params) throws CatalogResourceException {
+ Map<String, Object> params) throws CatalogResourceException {
try {
ClientConfig config = new ClientConfig();
IWSO2RestService wso2Proxy = ConsumerFactory.createConsumer(
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/DeletePackageResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/DeletePackageResponse.java new file mode 100644 index 00000000..b905ee61 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/DeletePackageResponse.java @@ -0,0 +1,42 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.plan.wso2.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author 10090474 + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class DeletePackageResponse { + private static final int STATUS_SUCCESS = 1; + + private int status; + private String message; + private String exception; + + public boolean isSuccess() { + return this.status == STATUS_SUCCESS; + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/DeployPackageResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/DeployPackageResponse.java new file mode 100644 index 00000000..3e171445 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/DeployPackageResponse.java @@ -0,0 +1,44 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.plan.wso2.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author 10090474 + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class DeployPackageResponse { + private static final int STATUS_SUCCESS = 1; + + private int status; + private String message; + private String packageName; + private String processId; + private String exception; + + public boolean isSuccess() { + return this.status == STATUS_SUCCESS; + } +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/StartProcessRequest.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/StartProcessRequest.java new file mode 100644 index 00000000..da9aefb5 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/StartProcessRequest.java @@ -0,0 +1,37 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.plan.wso2.entity; + +import java.util.Map; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author 10090474 + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class StartProcessRequest { + private String processId; + private Map<String, Object> params; +} diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/StartProcessResponse.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/StartProcessResponse.java new file mode 100644 index 00000000..73c9fad2 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/entity/StartProcessResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright 2016 [ZTE] and others. + * + * 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 org.openo.commontosca.catalog.model.plan.wso2.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +/** + * @author 10090474 + * + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class StartProcessResponse { + private static final int STATUS_SUCCESS = 1; + + private int status; + private String message; + private String response; + private String exception; + + public boolean isSuccess() { + return this.status == STATUS_SUCCESS; + } +} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/wrapper/ServiceTemplateWrapper.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/wrapper/ServiceTemplateWrapper.java index 77bf2129..039d64b4 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/wrapper/ServiceTemplateWrapper.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/wrapper/ServiceTemplateWrapper.java @@ -1,41 +1,41 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.model.wrapper;
+package org.openo.commontosca.catalog.model.wrapper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.openo.orchestrator.nfv.catalog.common.ToolUtil;
-import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData;
-import org.openo.orchestrator.nfv.catalog.db.entity.PackageData;
-import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData;
-import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.db.resource.TemplateManager;
-import org.openo.orchestrator.nfv.catalog.model.common.TemplateDataHelper;
-import org.openo.orchestrator.nfv.catalog.model.entity.InputParameter;
-import org.openo.orchestrator.nfv.catalog.model.entity.NfvTemplate;
-import org.openo.orchestrator.nfv.catalog.model.entity.NodeTemplate;
-import org.openo.orchestrator.nfv.catalog.model.entity.QueryRawDataCondition;
-import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplate;
-import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplateOperation;
-import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplateRawData;
-import org.openo.orchestrator.nfv.catalog.model.entity.SubstitutionMapping;
-import org.openo.orchestrator.nfv.catalog.resources.CatalogBadRequestException;
+import org.openo.commontosca.catalog.model.entity.ServiceTemplateOperation;
+import org.openo.commontosca.catalog.resources.CatalogBadRequestException;
+import org.openo.commontosca.catalog.common.ToolUtil;
+import org.openo.commontosca.catalog.db.entity.NodeTemplateData;
+import org.openo.commontosca.catalog.db.entity.PackageData;
+import org.openo.commontosca.catalog.db.entity.ServiceTemplateData;
+import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.db.resource.TemplateManager;
+import org.openo.commontosca.catalog.model.common.TemplateDataHelper;
+import org.openo.commontosca.catalog.model.entity.InputParameter;
+import org.openo.commontosca.catalog.model.entity.NfvTemplate;
+import org.openo.commontosca.catalog.model.entity.NodeTemplate;
+import org.openo.commontosca.catalog.model.entity.QueryRawDataCondition;
+import org.openo.commontosca.catalog.model.entity.ServiceTemplate;
+import org.openo.commontosca.catalog.model.entity.ServiceTemplateRawData;
+import org.openo.commontosca.catalog.model.entity.SubstitutionMapping;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/CatalogBadRequestException.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/CatalogBadRequestException.java index 9934bfcb..17ec7cd6 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/CatalogBadRequestException.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/CatalogBadRequestException.java @@ -1,21 +1,21 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.resources; +package org.openo.commontosca.catalog.resources; -import org.openo.orchestrator.nfv.catalog.db.exception.ErrorCodeException; +import org.openo.commontosca.catalog.db.exception.ErrorCodeException; /** * diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/PackageResource.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/PackageResource.java index 3fbbfbc5..0fd61f77 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/PackageResource.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/PackageResource.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.resources; +package org.openo.commontosca.catalog.resources; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -40,13 +40,10 @@ import javax.ws.rs.core.Response; import org.eclipse.jetty.http.HttpStatus; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataParam; -import org.openo.orchestrator.nfv.catalog.entity.request.PackageBasicInfo; -import org.openo.orchestrator.nfv.catalog.entity.request.UploadPackageFromFtpRequest; -import org.openo.orchestrator.nfv.catalog.entity.response.CsarFileUriResponse; -import org.openo.orchestrator.nfv.catalog.entity.response.PackageMeta; -import org.openo.orchestrator.nfv.catalog.entity.response.UploadPackageResponse; -import org.openo.orchestrator.nfv.catalog.filemanage.entity.FileLink; -import org.openo.orchestrator.nfv.catalog.wrapper.PackageWrapper; +import org.openo.commontosca.catalog.entity.response.UploadPackageResponse; +import org.openo.commontosca.catalog.wrapper.PackageWrapper; +import org.openo.commontosca.catalog.entity.response.CsarFileUriResponse; +import org.openo.commontosca.catalog.entity.response.PackageMeta; import com.codahale.metrics.annotation.Timed; diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/RestUtils.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/RestUtils.java new file mode 100644 index 00000000..62335bca --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/RestUtils.java @@ -0,0 +1,46 @@ +/**
+ * Copyright 2016 [ZTE] and others.
+ *
+ * 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 org.openo.commontosca.catalog.resources;
+
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.core.Response;
+
+import org.openo.commontosca.catalog.common.CommonErrorResponse;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+
+
+public class RestUtils {
+ /**
+ * @param e
+ * @return
+ */
+ public static InternalServerErrorException newInternalServerErrorException(
+ CatalogResourceException e) {
+ return new InternalServerErrorException(Response
+ .status(Response.Status.INTERNAL_SERVER_ERROR)
+ .entity(new CommonErrorResponse(e.getErrcode() + "", e.getMessage())).build(), e);
+ }
+
+ /**
+ * @param e
+ * @return
+ */
+ public static BadRequestException newBadRequestException(CatalogBadRequestException e) {
+ return new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
+ .entity(new CommonErrorResponse(e.getErrcode() + "", e.getMessage())).build(), e);
+ }
+}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/TemplateResource.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/TemplateResource.java index 31d06b87..ea1c21e4 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/TemplateResource.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/resources/TemplateResource.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.resources; +package org.openo.commontosca.catalog.resources; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -32,17 +32,17 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.eclipse.jetty.http.HttpStatus; -import org.openo.orchestrator.nfv.catalog.common.CommonErrorResponse; -import org.openo.orchestrator.nfv.catalog.common.ToolUtil; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.model.entity.InputParameter; -import org.openo.orchestrator.nfv.catalog.model.entity.NodeTemplate; -import org.openo.orchestrator.nfv.catalog.model.entity.QueryRawDataCondition; -import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplate; -import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplateOperation; -import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplateRawData; -import org.openo.orchestrator.nfv.catalog.model.parser.ToscaYamlModelParser; -import org.openo.orchestrator.nfv.catalog.model.wrapper.ServiceTemplateWrapper; +import org.openo.commontosca.catalog.common.CommonErrorResponse; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.model.entity.ServiceTemplateOperation; +import org.openo.commontosca.catalog.model.wrapper.ServiceTemplateWrapper; +import org.openo.commontosca.catalog.common.ToolUtil; +import org.openo.commontosca.catalog.model.entity.InputParameter; +import org.openo.commontosca.catalog.model.entity.NodeTemplate; +import org.openo.commontosca.catalog.model.entity.QueryRawDataCondition; +import org.openo.commontosca.catalog.model.entity.ServiceTemplate; +import org.openo.commontosca.catalog.model.entity.ServiceTemplateRawData; +import org.openo.commontosca.catalog.model.parser.ToscaYamlModelParser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/wrapper/PackageWrapper.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapper.java index 2e557316..8ded7bba 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/wrapper/PackageWrapper.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapper.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.wrapper;
+package org.openo.commontosca.catalog.wrapper;
import java.io.BufferedInputStream;
import java.io.File;
@@ -28,25 +28,25 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-import org.openo.orchestrator.nfv.catalog.common.CommonConstant;
-import org.openo.orchestrator.nfv.catalog.common.HttpServerPathConfig;
-import org.openo.orchestrator.nfv.catalog.common.RestUtil;
-import org.openo.orchestrator.nfv.catalog.common.ToolUtil;
-import org.openo.orchestrator.nfv.catalog.common.ZipCompressor;
-import org.openo.orchestrator.nfv.catalog.db.entity.PackageData;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.db.resource.PackageManager;
-import org.openo.orchestrator.nfv.catalog.db.resource.TemplateManager;
-import org.openo.orchestrator.nfv.catalog.entity.EnumType;
-import org.openo.orchestrator.nfv.catalog.entity.request.PackageBasicInfo;
-import org.openo.orchestrator.nfv.catalog.entity.request.UploadPackageFromFtpRequest;
-import org.openo.orchestrator.nfv.catalog.entity.response.CsarFileUriResponse;
-import org.openo.orchestrator.nfv.catalog.entity.response.PackageMeta;
-import org.openo.orchestrator.nfv.catalog.entity.response.UploadPackageResponse;
-import org.openo.orchestrator.nfv.catalog.filemanage.FileManagerFactory;
-import org.openo.orchestrator.nfv.catalog.filemanage.entity.FileLink;
-import org.openo.orchestrator.nfv.catalog.model.parser.EnumPackageFormat;
-import org.openo.orchestrator.nfv.catalog.model.parser.ModelParserFactory;
+import org.openo.commontosca.catalog.common.CommonConstant;
+import org.openo.commontosca.catalog.common.HttpServerPathConfig;
+import org.openo.commontosca.catalog.common.RestUtil;
+import org.openo.commontosca.catalog.common.ToolUtil;
+import org.openo.commontosca.catalog.common.ZipCompressor;
+import org.openo.commontosca.catalog.db.entity.PackageData;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.db.resource.PackageManager;
+import org.openo.commontosca.catalog.db.resource.TemplateManager;
+import org.openo.commontosca.catalog.entity.EnumType;
+import org.openo.commontosca.catalog.entity.request.PackageBasicInfo;
+import org.openo.commontosca.catalog.entity.request.UploadPackageFromFtpRequest;
+import org.openo.commontosca.catalog.entity.response.CsarFileUriResponse;
+import org.openo.commontosca.catalog.entity.response.PackageMeta;
+import org.openo.commontosca.catalog.entity.response.UploadPackageResponse;
+import org.openo.commontosca.catalog.filemanage.FileManagerFactory;
+import org.openo.commontosca.catalog.filemanage.entity.FileLink;
+import org.openo.commontosca.catalog.model.parser.EnumPackageFormat;
+import org.openo.commontosca.catalog.model.parser.ModelParserFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/wrapper/PackageWrapperUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java index 3fcc6260..7395ed16 100644 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/wrapper/PackageWrapperUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.wrapper;
+package org.openo.commontosca.catalog.wrapper;
import java.io.BufferedReader;
import java.io.File;
@@ -27,26 +27,26 @@ import java.util.List; import javax.ws.rs.NotFoundException;
-import org.openo.orchestrator.nfv.catalog.cometd.CometdException;
-import org.openo.orchestrator.nfv.catalog.common.CommonConstant;
-import org.openo.orchestrator.nfv.catalog.common.FileUtil;
-import org.openo.orchestrator.nfv.catalog.common.MsbAddrConfig;
-import org.openo.orchestrator.nfv.catalog.common.ToolUtil;
-import org.openo.orchestrator.nfv.catalog.db.entity.PackageData;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.db.resource.PackageManager;
-import org.openo.orchestrator.nfv.catalog.entity.CSARPackage;
-import org.openo.orchestrator.nfv.catalog.entity.EnumOperationalState;
-import org.openo.orchestrator.nfv.catalog.entity.EnumProcessState;
-import org.openo.orchestrator.nfv.catalog.entity.EnumType;
-import org.openo.orchestrator.nfv.catalog.entity.EnumUsageState;
-import org.openo.orchestrator.nfv.catalog.entity.request.PackageBasicInfo;
-import org.openo.orchestrator.nfv.catalog.entity.response.PackageMeta;
-import org.openo.orchestrator.nfv.catalog.ftp.Ftp;
-import org.openo.orchestrator.nfv.catalog.ftp.FtpUtil;
-import org.openo.orchestrator.nfv.catalog.model.entity.ServiceTemplate;
-import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.lifecycleEnity.InstanceEntity;
-import org.openo.orchestrator.nfv.catalog.model.externalservice.lifecycle.LifeCycleServiceConsumer;
+import org.openo.commontosca.catalog.cometd.CometdException;
+import org.openo.commontosca.catalog.common.CommonConstant;
+import org.openo.commontosca.catalog.common.FileUtil;
+import org.openo.commontosca.catalog.common.MsbAddrConfig;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.db.resource.PackageManager;
+import org.openo.commontosca.catalog.entity.EnumProcessState;
+import org.openo.commontosca.catalog.entity.EnumType;
+import org.openo.commontosca.catalog.entity.request.PackageBasicInfo;
+import org.openo.commontosca.catalog.ftp.Ftp;
+import org.openo.commontosca.catalog.model.entity.ServiceTemplate;
+import org.openo.commontosca.catalog.model.externalservice.lifecycle.LifeCycleServiceConsumer;
+import org.openo.commontosca.catalog.common.ToolUtil;
+import org.openo.commontosca.catalog.db.entity.PackageData;
+import org.openo.commontosca.catalog.entity.CSARPackage;
+import org.openo.commontosca.catalog.entity.EnumOperationalState;
+import org.openo.commontosca.catalog.entity.EnumUsageState;
+import org.openo.commontosca.catalog.entity.response.PackageMeta;
+import org.openo.commontosca.catalog.ftp.FtpUtil;
+import org.openo.commontosca.catalog.model.externalservice.entity.lifecycleEnity.InstanceEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/catalog/src/main/resources/api-doc/META-INF/MANIFEST.MF b/catalog-core/catalog-mgr/src/main/resources/api-doc/META-INF/MANIFEST.MF index c90621f4..c90621f4 100644 --- a/catalog/src/main/resources/api-doc/META-INF/MANIFEST.MF +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/META-INF/MANIFEST.MF diff --git a/catalog/src/main/resources/api-doc/WEB-INF/web.xml b/catalog-core/catalog-mgr/src/main/resources/api-doc/WEB-INF/web.xml index 94fc2c90..2f57e7e8 100644 --- a/catalog/src/main/resources/api-doc/WEB-INF/web.xml +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/WEB-INF/web.xml @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + Copyright 2016 [ZTE] and others. - 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 + 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 + 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. + 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. --> <web-app xmlns="http://java.sun.com/xml/ns/javaee" diff --git a/catalog/src/main/resources/api-doc/css/reset.css b/catalog-core/catalog-mgr/src/main/resources/api-doc/css/reset.css index a96abd8f..07ab2684 100644 --- a/catalog/src/main/resources/api-doc/css/reset.css +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/css/reset.css @@ -1,17 +1,17 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ html, diff --git a/catalog/src/main/resources/api-doc/css/screen.css b/catalog-core/catalog-mgr/src/main/resources/api-doc/css/screen.css index 1559de01..7b41db52 100644 --- a/catalog/src/main/resources/api-doc/css/screen.css +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/css/screen.css @@ -1,17 +1,17 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ /* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */ .swagger-section pre code { diff --git a/catalog/src/main/resources/api-doc/css/typography.css b/catalog-core/catalog-mgr/src/main/resources/api-doc/css/typography.css index ff5c9a1a..99d1ba1a 100644 --- a/catalog/src/main/resources/api-doc/css/typography.css +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/css/typography.css @@ -1,17 +1,17 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ /* droid-sans-regular - latin */ @font-face { diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot Binary files differindex 2250b71a..2250b71a 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.eot diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg index a54bbbbf..a54bbbbf 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.svg diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf Binary files differindex 523cb92d..523cb92d 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.ttf diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff Binary files differindex 67e3e25f..67e3e25f 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 Binary files differindex 1e726a7c..1e726a7c 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-700.woff2 diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot Binary files differindex ac2698e8..ac2698e8 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.eot diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg index d9f2a214..d9f2a214 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.svg diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf Binary files differindex 76aede27..76aede27 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.ttf diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff Binary files differindex abf19899..abf19899 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff diff --git a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 Binary files differindex 9f93f74c..9f93f74c 100644 --- a/catalog/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/fonts/droid-sans-v6-latin-regular.woff2 diff --git a/catalog/src/main/resources/api-doc/images/explorer_icons.png b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/explorer_icons.png Binary files differindex ed9d2fff..ed9d2fff 100644 --- a/catalog/src/main/resources/api-doc/images/explorer_icons.png +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/explorer_icons.png diff --git a/catalog/src/main/resources/api-doc/images/logo_small.png b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/logo_small.png Binary files differindex 5496a655..5496a655 100644 --- a/catalog/src/main/resources/api-doc/images/logo_small.png +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/logo_small.png diff --git a/catalog/src/main/resources/api-doc/images/pet_store_api.png b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/pet_store_api.png Binary files differindex f9f9cd4a..f9f9cd4a 100644 --- a/catalog/src/main/resources/api-doc/images/pet_store_api.png +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/pet_store_api.png diff --git a/catalog/src/main/resources/api-doc/images/throbber.gif b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/throbber.gif Binary files differindex 06393889..06393889 100644 --- a/catalog/src/main/resources/api-doc/images/throbber.gif +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/throbber.gif diff --git a/catalog/src/main/resources/api-doc/images/wordnik_api.png b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/wordnik_api.png Binary files differindex dca4f145..dca4f145 100644 --- a/catalog/src/main/resources/api-doc/images/wordnik_api.png +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/images/wordnik_api.png diff --git a/catalog/src/main/resources/api-doc/index.html b/catalog-core/catalog-mgr/src/main/resources/api-doc/index.html index 1c092305..57a3f165 100644 --- a/catalog/src/main/resources/api-doc/index.html +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/index.html @@ -1,18 +1,18 @@ <!--
- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ Copyright 2016 [ZTE] and others.
- 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
+ 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
+ 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.
+ 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.
-->
<!DOCTYPE html>
diff --git a/catalog/src/main/resources/api-doc/lib/backbone-min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/backbone-min.js index ac7d0a3b..0db8f7fc 100644 --- a/catalog/src/main/resources/api-doc/lib/backbone-min.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/backbone-min.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ // Backbone.js 1.1.2 diff --git a/catalog/src/main/resources/api-doc/lib/handlebars-2.0.0.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/handlebars-2.0.0.js index d0adff07..ada61542 100644 --- a/catalog/src/main/resources/api-doc/lib/handlebars-2.0.0.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/handlebars-2.0.0.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ /*! diff --git a/catalog/src/main/resources/api-doc/lib/highlight.7.3.pack.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/highlight.7.3.pack.js index 7e1ef111..db72e206 100644 --- a/catalog/src/main/resources/api-doc/lib/highlight.7.3.pack.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/highlight.7.3.pack.js @@ -1,16 +1,16 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
\ No newline at end of file diff --git a/catalog/src/main/resources/api-doc/lib/jquery-1.8.0.min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery-1.8.0.min.js index 9775e431..4aee7fbc 100644 --- a/catalog/src/main/resources/api-doc/lib/jquery-1.8.0.min.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery-1.8.0.min.js @@ -1,17 +1,17 @@ /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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.
*/
/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test("Â ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
\ No newline at end of file diff --git a/catalog/src/main/resources/api-doc/lib/jquery.ba-bbq.min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.ba-bbq.min.js index 0353c8c9..64e37d56 100644 --- a/catalog/src/main/resources/api-doc/lib/jquery.ba-bbq.min.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.ba-bbq.min.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ (function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this); /* diff --git a/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.slideto.min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.slideto.min.js new file mode 100644 index 00000000..e41e6d02 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.slideto.min.js @@ -0,0 +1,16 @@ +/* + * Copyright 2016 [ZTE] and others. + * + * 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. + */ +(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); diff --git a/catalog/src/main/resources/api-doc/lib/jquery.wiggle.min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.wiggle.min.js index e1e9f960..f63aa7ed 100644 --- a/catalog/src/main/resources/api-doc/lib/jquery.wiggle.min.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/jquery.wiggle.min.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ /* jQuery Wiggle diff --git a/catalog/src/main/resources/api-doc/lib/marked.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/marked.js index 37f4283f..88f91fde 100644 --- a/catalog/src/main/resources/api-doc/lib/marked.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/marked.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ ;(function() { diff --git a/catalog/src/main/resources/api-doc/lib/shred.bundle.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/shred.bundle.js index 5f8295f2..8e77b680 100644 --- a/catalog/src/main/resources/api-doc/lib/shred.bundle.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/shred.bundle.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ var require = function (file, cwd) { var resolved = require.resolve(file, cwd || '/'); diff --git a/catalog/src/main/resources/api-doc/lib/shred/content.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/shred/content.js index 37a6b554..f4e1b09f 100644 --- a/catalog/src/main/resources/api-doc/lib/shred/content.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/shred/content.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ // The purpose of the `Content` object is to abstract away the data conversions // to and from raw content entities as strings. For example, you want to be able diff --git a/catalog/src/main/resources/api-doc/lib/swagger-client.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/swagger-client.js index f7c862be..08c88e98 100644 --- a/catalog/src/main/resources/api-doc/lib/swagger-client.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/swagger-client.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ /** * swagger-client - swagger.js is a javascript client for use with swaggering APIs. diff --git a/catalog/src/main/resources/api-doc/lib/swagger-oauth.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/swagger-oauth.js index 9b4f35a5..4027bd4b 100644 --- a/catalog/src/main/resources/api-doc/lib/swagger-oauth.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/swagger-oauth.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ var appName; var popupMask; diff --git a/catalog/src/main/resources/api-doc/lib/underscore-min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/underscore-min.js index 00658b3b..a71ff084 100644 --- a/catalog/src/main/resources/api-doc/lib/underscore-min.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/lib/underscore-min.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ // Underscore.js 1.7.0 // http://underscorejs.org diff --git a/catalog-core/catalog-mgr/src/main/resources/api-doc/o2c.html b/catalog-core/catalog-mgr/src/main/resources/api-doc/o2c.html new file mode 100644 index 00000000..99561bc6 --- /dev/null +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/o2c.html @@ -0,0 +1,37 @@ +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<script> +var qp = null; +if(window.location.hash) { + qp = location.hash.substring(1); +} +else { + qp = location.search.substring(1); +} +qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}', + function(key, value) { + return key===""?value:decodeURIComponent(value) } + ):{} + +if (window.opener.swaggerUi.tokenUrl) + window.opener.processOAuthCode(qp); +else + window.opener.onOAuthComplete(qp); + +window.close(); +</script>
\ No newline at end of file diff --git a/catalog/src/main/resources/api-doc/swagger-ui.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/swagger-ui.js index 50cd6b76..53ae58a5 100644 --- a/catalog/src/main/resources/api-doc/swagger-ui.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/swagger-ui.js @@ -1,17 +1,17 @@ /*
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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.
*/
/** * swagger-ui - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API diff --git a/catalog/src/main/resources/api-doc/swagger-ui.min.js b/catalog-core/catalog-mgr/src/main/resources/api-doc/swagger-ui.min.js index 8d5aa38b..aab5ec40 100644 --- a/catalog/src/main/resources/api-doc/swagger-ui.min.js +++ b/catalog-core/catalog-mgr/src/main/resources/api-doc/swagger-ui.min.js @@ -1,17 +1,17 @@ /* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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. */ function clippyCopiedCallback(){$("#api_key_copied").fadeIn().delay(1e3).fadeOut()}$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""==$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),log=function(){log.history=log.history||[],log.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])},Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),a=n+"_content";Docs.expandOperation($("#"+a)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}};this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'>"+l((s=null!=(s=t.keyName||(null!=e?e.keyName:e))?s:r,typeof s===i?s.call(e,{name:"keyName",hash:{},data:a}):s))+'</div>\n <input placeholder="api_key" class="auth_input" id="input_apiKey_entry" name="apiKey" type="text"/>\n <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_api_key" href="#">apply</a></div>\n </div>\n</div>\n\n'},useData:!0});var SwaggerUi,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;SwaggerUi=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.dom_id="swagger_ui",t.prototype.options=null,t.prototype.api=null,t.prototype.headerView=null,t.prototype.mainView=null,t.prototype.initialize=function(e){return null==e&&(e={}),null!=e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),null==e.supportedSubmitMethods&&(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),null==$("#"+this.dom_id)&&$("body").append('<div id="'+this.dom_id+'"></div>'),this.options=e,this.options.success=function(e){return function(){return e.render()}}(this),this.options.progress=function(e){return function(t){return e.showMessage(t)}}(this),this.options.failure=function(e){return function(t){return e.onLoadFailure(t)}}(this),this.headerView=new HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return function(t){return e.updateSwaggerUi(t)}}(this))},t.prototype.setOption=function(e,t){return this.options[e]=t},t.prototype.getOption=function(e){return this.options[e]},t.prototype.updateSwaggerUi=function(e){return this.options.url=e.url,this.load()},t.prototype.load=function(){var e,t;return null!=(t=this.mainView)&&t.clear(),e=this.options.url,e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},t.prototype.collapseAll=function(){return Docs.collapseEndpointListForResource("")},t.prototype.listAll=function(){return Docs.collapseOperationsForResource("")},t.prototype.expandAll=function(){return Docs.expandOperationsForResource("")},t.prototype.render=function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}return this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(function(){return function(){return Docs.shebang()}}(this),100)},t.prototype.buildUrl=function(e,t){var n,a;return 0===t.indexOf("/")?(a=e.split("/"),e=a[0]+"//"+a[2],e+t):(n=e.length,e.indexOf("?")>-1&&(n=Math.min(n,e.indexOf("?"))),e.indexOf("#")>-1&&(n=Math.min(n,e.indexOf("#"))),e=e.substring(0,n),-1!==e.indexOf("/",e.length-1)?e+t:e+"/"+t)},t.prototype.showMessage=function(e){return null==e&&(e=""),$("#message-bar").removeClass("message-fail"),$("#message-bar").addClass("message-success"),$("#message-bar").html(e)},t.prototype.onLoadFailure=function(e){var t;return null==e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail"),t=$("#message-bar").html(e),null!=this.options.onFailure&&this.options.onFailure(e),t},t.prototype.renderGFM=function(e){return null==e&&(e=""),$(".markdown").each(function(){return $(this).html(marked($(this).html()))})},t}(Backbone.Router),window.SwaggerUi=SwaggerUi,this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(){return'<div class=\'auth_button\' id=\'basic_auth_button\'><img class=\'auth_icon\' src=\'images/password.jpeg\'></div>\n<div class=\'auth_container\' id=\'basic_auth_container\'>\n <div class=\'key_input_container\'>\n <div class="auth_label">Username</div>\n <input placeholder="username" class="auth_input" id="input_username" name="username" type="text"/>\n <div class="auth_label">Password</div>\n <input placeholder="password" class="auth_input" id="input_password" name="password" type="password"/>\n <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_basic_auth" href="#">apply</a></div>\n </div>\n</div>\n\n'},useData:!0}),Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a=' <option value="';return t=n(e,e),null!=t&&(a+=t),a+='">',t=n(e,e),null!=t&&(a+=t),a+"</option>\n"},4:function(){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='<label for="contentType"></label>\n<select name="contentType">\n';return s=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i+"</select>\n"},useData:!0});var ApiKeyButton,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ApiKeyButton=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),this},t.prototype.events={"click #apikey_button":"toggleApiKeyContainer","click #apply_api_key":"applyApiKey"},t.prototype.applyApiKey=function(){var e;return window.authorizations.add(this.model.name,new ApiKeyAuthorization(this.model.name,$("#input_apiKey_entry").val(),this.model["in"])),window.swaggerUi.load(),e=$("#apikey_container").show()},t.prototype.toggleApiKeyContainer=function(){var e;return $("#apikey_container").length>0?(e=$("#apikey_container").first(),e.is(":visible")?e.hide():($(".auth_container").hide(),e.show())):void 0},t.prototype.template=function(){return Handlebars.templates.apikey_button_view},t}(Backbone.View),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,a){var s,i=this.lambda,r=this.escapeExpression,l=' <div class="info_title">'+r(i(null!=(s=null!=e?e.info:e)?s.title:s,e))+'</div>\n <div class="info_description markdown">';return s=i(null!=(s=null!=e?e.info:e)?s.description:s,e),null!=s&&(l+=s),l+="</div>\n ",s=t["if"].call(e,null!=(s=null!=e?e.info:e)?s.termsOfServiceUrl:s,{name:"if",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n ",s=t["if"].call(e,null!=(s=null!=(s=null!=e?e.info:e)?s.contact:s)?s.name:s,{name:"if",hash:{},fn:this.program(4,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n ",s=t["if"].call(e,null!=(s=null!=(s=null!=e?e.info:e)?s.contact:s)?s.url:s,{name:"if",hash:{},fn:this.program(6,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n ",s=t["if"].call(e,null!=(s=null!=(s=null!=e?e.info:e)?s.contact:s)?s.email:s,{name:"if",hash:{},fn:this.program(8,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+="\n ",s=t["if"].call(e,null!=(s=null!=e?e.info:e)?s.license:s,{name:"if",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=s&&(l+=s),l+"\n"},2:function(e){var t,n=this.lambda,a=this.escapeExpression;return'<div class="info_tos"><a href="'+a(n(null!=(t=null!=e?e.info:e)?t.termsOfServiceUrl:t,e))+'">Terms of service</a></div>'},4:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_name'>Created by "+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.name:t,e))+"</div>"},6:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_url'>See more at <a href=\""+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.url:t,e))+'">'+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.url:t,e))+"</a></div>"},8:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_email'><a href=\"mailto:"+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.contact:t)?t.email:t,e))+"?subject="+a(n(null!=(t=null!=e?e.info:e)?t.title:t,e))+'">Contact the developer</a></div>'},10:function(e){var t,n=this.lambda,a=this.escapeExpression;return"<div class='info_license'><a href='"+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.license:t)?t.url:t,e))+"'>"+a(n(null!=(t=null!=(t=null!=e?e.info:e)?t.license:t)?t.name:t,e))+"</a></div>"},12:function(e){var t,n=this.lambda,a=this.escapeExpression;return' , <span style="font-variant: small-caps">api version</span>: '+a(n(null!=(t=null!=e?e.info:e)?t.version:t,e))+"\n "},14:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return' <span style="float:right"><a href="'+l((s=null!=(s=t.validatorUrl||(null!=e?e.validatorUrl:e))?s:r,typeof s===i?s.call(e,{name:"validatorUrl",hash:{},data:a}):s))+"/debug?url="+l((s=null!=(s=t.url||(null!=e?e.url:e))?s:r,typeof s===i?s.call(e,{name:"url",hash:{},data:a}):s))+'"><img id="validator" src="'+l((s=null!=(s=t.validatorUrl||(null!=e?e.validatorUrl:e))?s:r,typeof s===i?s.call(e,{name:"validatorUrl",hash:{},data:a}):s))+"?url="+l((s=null!=(s=t.url||(null!=e?e.url:e))?s:r,typeof s===i?s.call(e,{name:"url",hash:{},data:a}):s))+'"></a>\n </span>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<div class='info' id='api_info'>\n";return s=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+="</div>\n<div class='container' id='resources_container'>\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <br>\n <br>\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "+o((i=null!=(i=t.basePath||(null!=e?e.basePath:e))?i:l,typeof i===r?i.call(e,{name:"basePath",hash:{},data:a}):i))+"\n",s=t["if"].call(e,null!=(s=null!=e?e.info:e)?s.version:s,{name:"if",hash:{},fn:this.program(12,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+="]\n",s=t["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(14,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+" </h4>\n </div>\n</div>\n"},useData:!0});var BasicAuthButton,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;BasicAuthButton=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),this},t.prototype.events={"click #basic_auth_button":"togglePasswordContainer","click #apply_basic_auth":"applyPassword"},t.prototype.applyPassword=function(){var e,t,n;return n=$(".input_username").val(),t=$(".input_password").val(),window.authorizations.add(this.model.type,new PasswordAuthorization("basic",n,t)),window.swaggerUi.load(),e=$("#basic_auth_container").hide()},t.prototype.togglePasswordContainer=function(){var e;return $("#basic_auth_container").length>0?(e=$("#basic_auth_container").show(),e.is(":visible")?e.slideUp():($(".auth_container").hide(),e.show())):void 0},t.prototype.template=function(){return Handlebars.templates.basic_auth_button_view},t}(Backbone.View),this.Handlebars.templates.operation=Handlebars.template({1:function(){return"deprecated"},3:function(){return" <h4>Warning: Deprecated</h4>\n"},5:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=' <h4>Implementation Notes</h4>\n <p class="markdown">';return i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(o+=s),o+"</p>\n"},7:function(){return' <div class="auth">\n <span class="api-ic ic-error"></span>'},9:function(e,t,n,a){var s,i=' <div id="api_information_panel" style="top: 526px; left: 776px; display: none;">\n';return s=t.each.call(e,e,{name:"each",hash:{},fn:this.program(10,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i+" </div>\n"},10:function(e){var t,n=this.lambda,a=this.escapeExpression,s=" <div title='";return t=n(null!=e?e.description:e,e),null!=t&&(s+=t),s+"'>"+a(n(null!=e?e.scope:e,e))+"</div>\n"},12:function(){return"</div>"},14:function(){return' <div class=\'access\'>\n <span class="api-ic ic-off" title="click to authenticate"></span>\n </div>\n'},16:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <h4>Response Class (Status "+l((s=null!=(s=t.successCode||(null!=e?e.successCode:e))?s:r,typeof s===i?s.call(e,{name:"successCode",hash:{},data:a}):s))+')</h4>\n <p><span class="model-signature" /></p>\n <br/>\n <div class="response-content-type" />\n'},18:function(){return' <h4>Parameters</h4>\n <table class=\'fullwidth\'>\n <thead>\n <tr>\n <th style="width: 100px; max-width: 100px">Parameter</th>\n <th style="width: 310px; max-width: 310px">Value</th>\n <th style="width: 200px; max-width: 200px">Description</th>\n <th style="width: 100px; max-width: 100px">Parameter Type</th>\n <th style="width: 220px; max-width: 230px">Data Type</th>\n </tr>\n </thead>\n <tbody class="operation-params">\n\n </tbody>\n </table>\n'},20:function(){return" <div style='margin:0;padding:0;display:inline'></div>\n <h4>Response Messages</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th>HTTP Status Code</th>\n <th>Reason</th>\n <th>Response Model</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n \n </tbody>\n </table>\n"},22:function(){return""},24:function(){return" <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r,l="function",o=t.helperMissing,p=this.escapeExpression,u=t.blockHelperMissing,h="\n <ul class='operations' >\n <li class='"+p((i=null!=(i=t.method||(null!=e?e.method:e))?i:o,typeof i===l?i.call(e,{name:"method",hash:{},data:a}):i))+" operation' id='"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"_"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+"'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"/"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+'\' class="toggleOperation">'+p((i=null!=(i=t.method||(null!=e?e.method:e))?i:o,typeof i===l?i.call(e,{name:"method",hash:{},data:a}):i))+"</a>\n </span>\n <span class='path'>\n <a href='#!/"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"/"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+"' class=\"toggleOperation ";return s=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=s&&(h+=s),h+='">'+p((i=null!=(i=t.path||(null!=e?e.path:e))?i:o,typeof i===l?i.call(e,{name:"path",hash:{},data:a}):i))+"</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"/"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+'\' class="toggleOperation">',i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,s=typeof i===l?i.call(e,{name:"summary",hash:{},data:a}):i,null!=s&&(h+=s),h+="</a>\n </li>\n </ul>\n </div>\n <div class='content' id='"+p((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===l?i.call(e,{name:"parentId",hash:{},data:a}):i))+"_"+p((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===l?i.call(e,{name:"nickname",hash:{},data:a}):i))+"_content' style='display:none'>\n",s=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.noop,data:a}),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.noop,data:a}),null!=s&&(h+=s),i=null!=(i=t.oauth||(null!=e?e.oauth:e))?i:o,r={name:"oauth",hash:{},fn:this.program(7,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.oauth||(s=u.call(e,s,r)),null!=s&&(h+=s),h+="\n",s=t.each.call(e,null!=e?e.oauth:e,{name:"each",hash:{},fn:this.program(9,a),inverse:this.noop,data:a}),null!=s&&(h+=s),h+=" ",i=null!=(i=t.oauth||(null!=e?e.oauth:e))?i:o,r={name:"oauth",hash:{},fn:this.program(12,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.oauth||(s=u.call(e,s,r)),null!=s&&(h+=s),h+="\n",i=null!=(i=t.oauth||(null!=e?e.oauth:e))?i:o,r={name:"oauth",hash:{},fn:this.program(14,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.oauth||(s=u.call(e,s,r)),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(16,a),inverse:this.noop,data:a}),null!=s&&(h+=s),h+=" <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n",s=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(18,a),inverse:this.noop,data:a}),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(20,a),inverse:this.noop,data:a}),null!=s&&(h+=s),s=t["if"].call(e,null!=e?e.isReadOnly:e,{name:"if",hash:{},fn:this.program(22,a),inverse:this.program(24,a),data:a}),null!=s&&(h+=s),h+" </form>\n <div class='response' style='display:none'>\n <h4>Request URL</h4>\n <div class='block request_url'></div>\n <h4>Response Body</h4>\n <div class='block response_body'></div>\n <h4>Response Code</h4>\n <div class='block response_code'></div>\n <h4>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"},useData:!0});var ContentTypeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ContentTypeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),$("label[for=contentType]",$(this.el)).text("Response Content Type"),this},t.prototype.template=function(){return Handlebars.templates.content_type},t}(Backbone.View),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i},2:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return' <input type="file" name=\''+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+'\'/>\n <div class="parameter-content-type" />\n'},4:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=s&&(i+=s),i},5:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <textarea class='body-textarea' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <textarea class='body-textarea' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+'\'></textarea>\n <br />\n <div class="parameter-content-type" />\n'},9:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(10,a),data:a}),null!=s&&(i+=s),i},10:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(11,a),inverse:this.program(13,a),data:a}),null!=s&&(i+=s),i},11:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <input class='parameter' minlength='0' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='' type='text' value='"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"'/>\n"},13:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <input class='parameter' minlength='0' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='' type='text' value=''/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=s&&(p+=s),p+='\n</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td>\n <span class="model-signature"></span>\n</td>\n'},useData:!0});var HeaderView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;HeaderView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.events={"click #show-pet-store-icon":"showPetStore","click #show-wordnik-dev-icon":"showWordnikDev","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},t.prototype.initialize=function(){},t.prototype.showPetStore=function(){return this.trigger("update-swagger-ui",{url:"http://petstore.swagger.wordnik.com/api/api-docs"})},t.prototype.showWordnikDev=function(){return this.trigger("update-swagger-ui",{url:"http://api.wordnik.com/v4/resources.json"})},t.prototype.showCustomOnKeyup=function(e){return 13===e.keyCode?this.showCustom():void 0},t.prototype.showCustom=function(e){return null!=e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})},t.prototype.update=function(e,t,n){return null==n&&(n=!1),$("#input_baseUrl").val(e),n?this.trigger("update-swagger-ui",{url:e}):void 0},t}(Backbone.View),this.Handlebars.templates.param_list=Handlebars.template({1:function(){return" multiple='multiple'"},3:function(){return""},5:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.program(6,a),data:a}),null!=s&&(i+=s),i},6:function(e,t,n,a){var s,i=t.helperMissing,r="";return s=(t.isArray||e&&e.isArray||i).call(e,e,{name:"isArray",hash:{},fn:this.program(3,a),inverse:this.program(7,a),data:a}),null!=s&&(r+=s),r},7:function(){return" <option selected=\"\" value=''></option>\n"},9:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.program(12,a),data:a}),null!=s&&(i+=s),i},10:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return' <option selected="" value=\''+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+" (default)</option>\n"},12:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <option value='"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t.value||(null!=e?e.value:e))?s:r,typeof s===i?s.call(e,{name:"value",hash:{},data:a}):s))+"</option>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n <select ";return s=(t.isArray||e&&e.isArray||l).call(e,e,{name:"isArray",hash:{},fn:this.program(1,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+=" class='parameter' name='"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"'>\n",s=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(3,a),inverse:this.program(5,a),data:a}),null!=s&&(p+=s),s=t.each.call(e,null!=(s=null!=e?e.allowableValues:e)?s.descriptiveValues:s,{name:"each",hash:{},fn:this.program(9,a),inverse:this.noop,data:a}),null!=s&&(p+=s),p+=' </select>\n</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>'},useData:!0});var MainView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;MainView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}var n;return __extends(t,e),n={alpha:function(e,t){return e.path.localeCompare(t.path)},method:function(e,t){return e.method.localeCompare(t.method)}},t.prototype.initialize=function(e){var t,n,a,s;null==e&&(e={}),this.model.auths=[],s=this.model.securityDefinitions;for(n in s)a=s[n],t={name:n,type:a.type,value:a},this.model.auths.push(t);return"2.0"===this.model.swaggerVersion?this.model.validatorUrl="validatorUrl"in e.swaggerOptions?e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0?null:"http://online.swagger.io/validator":void 0},t.prototype.render=function(){var e,t,n,a,s,i,r,l,o,p;if(this.model.securityDefinitions)for(s in this.model.securityDefinitions)e=this.model.securityDefinitions[s],"apiKey"===e.type&&0===$("#apikey_button").length&&(t=new ApiKeyButton({model:e}).render().el,$(".auth_main_container").append(t)),"basicAuth"===e.type&&0===$("#basic_auth_button").length&&(t=new BasicAuthButton({model:e}).render().el,$(".auth_main_container").append(t));for($(this.el).html(Handlebars.templates.main(this.model)),r={},n=0,p=this.model.apisArray,l=0,o=p.length;o>l;l++){for(i=p[l],a=i.name;"undefined"!=typeof r[a];)a=a+"_"+n,n+=1; i.id=a,r[a]=i,this.addResource(i,this.model.auths)}return $(".propWrap").hover(function(){return $(".optionsWrapper",$(this)).show()},function(){return $(".optionsWrapper",$(this)).hide()}),this},t.prototype.addResource=function(e,t){var n;return e.id=e.id.replace(/\s/g,"_"),n=new ResourceView({model:e,tagName:"li",id:"resource_"+e.id,className:"resource",auths:t,swaggerOptions:this.options.swaggerOptions}),$("#resources").append(n.render().el)},t.prototype.clear=function(){return $(this.el).html("")},t}(Backbone.View),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <textarea class='body-textarea' readonly='readonly' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"</textarea>\n"},3:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=s&&(i+=s),i},4:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" "+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"\n"},6:function(){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=s&&(p+=s),p+='</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"</textarea>\n"},3:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,a),inverse:this.program(6,a),data:a}),null!=s&&(i+=s),i},4:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" "+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"\n"},6:function(){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code required'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(3,a),data:a}),null!=s&&(p+=s),p+='</td>\n<td class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0});var OperationView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;OperationView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.invocationUrl=null,t.prototype.events={"submit .sandbox":"submitOperation","click .submit":"submitOperation","click .response_hider":"hideResponse","click .toggleOperation":"toggleOperationContent","mouseenter .api-ic":"mouseEnter","mouseout .api-ic":"mouseExit"},t.prototype.initialize=function(e){return null==e&&(e={}),this.auths=e.auths,this.parentId=this.model.parentId,this.nickname=this.model.nickname,this},t.prototype.mouseEnter=function(e){var t,n,a,s,i,r,l,o,p,u;return t=$(this.el).find(".content"),p=e.pageX,u=e.pageY,r=$(window).scrollLeft(),l=$(window).scrollTop(),s=r+$(window).width(),i=l+$(window).height(),o=t.width(),n=t.height(),p+o>s&&(p=s-o),r>p&&(p=r),u+n>i&&(u=i-n),l>u&&(u=l),a={},a.top=u,a.left=p,t.css(a),$(e.currentTarget.parentNode).find("#api_information_panel").show()},t.prototype.mouseExit=function(e){return $(e.currentTarget.parentNode).find("#api_information_panel").hide()},t.prototype.render=function(){var e,t,n,a,s,i,r,l,o,p,u,h,c,d,m,f,y,g,v,_,w,b,x,k,O,C,S,P,T,D,H,M,E,R,V,N,U,A;if(i=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,i||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.description&&(this.model.description=this.model.description.replace(/(?:\r\n|\r|\n)/g,"<br />")),this.model.oauth=null,o=this.model.authorizations||this.model.security)if(Array.isArray(o))for(k=0,P=o.length;P>k;k++){n=o[k];for(l in n){t=n[l];for(e in this.auths)if(t=this.auths[e],"oauth2"===t.type){this.model.oauth={},this.model.oauth.scopes=[],R=t.value.scopes;for(r in R)b=R[r],y=n[l].indexOf(r),y>=0&&(p={scope:r,description:b},this.model.oauth.scopes.push(p))}}}else for(r in o)if(b=o[r],"oauth2"===r)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),O=0,T=b.length;T>O;O++)p=b[O],this.model.oauth.scopes.push(p);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],V=this.model.responses;for(a in V)x=V[a],m=null,f=this.model.responses[a].schema,f&&f.$ref&&(m=f.$ref,0===m.indexOf("#/definitions/")&&(m=m.substring("#/definitions/".length))),this.model.responseMessages.push({code:a,message:x.description,responseModel:m})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),g=null,this.model.successResponse){_=this.model.successResponse;for(l in _)x=_[l],this.model.successCode=l,"object"==typeof x&&"function"==typeof x.createJSONSample&&(g={sampleJSON:JSON.stringify(x.createJSONSample(),void 0,2),isParam:!1,signature:x.getMockSignature()})}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(g={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),g?(d=new SignatureView({model:g,tagName:"div"}),$(".model-signature",$(this.el)).append(d.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),s={isParam:!1},s.consumes=this.model.consumes,s.produces=this.model.produces,N=this.model.parameters,C=0,D=N.length;D>C;C++)u=N[C],w=u.type||u.dataType||"","undefined"==typeof w&&(m=u.schema,m&&m.$ref&&(h=m.$ref,w=0===h.indexOf("#/definitions/")?h.substring("#/definitions/".length):h)),w&&"file"===w.toLowerCase()&&(s.consumes||(s.consumes="multipart/form-data")),u.type=w;for(c=new ResponseContentTypeView({model:s}),$(".response-content-type",$(this.el)).append(c.render().el),U=this.model.parameters,S=0,H=U.length;H>S;S++)u=U[S],this.addParameter(u,s.consumes);for(A=this.model.responseMessages,E=0,M=A.length;M>E;E++)v=A[E],this.addStatusCode(v);return this},t.prototype.addParameter=function(e,t){var n;return e.consumes=t,n=new ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly}),$(".operation-params",$(this.el)).append(n.render().el)},t.prototype.addStatusCode=function(e){var t;return t=new StatusCodeView({model:e,tagName:"tr"}),$(".operation-status",$(this.el)).append(t.render().el)},t.prototype.submitOperation=function(e){var t,n,a,s,i,r,l,o,p,u,h,c,d,m,f,y;if(null!=e&&e.preventDefault(),n=$(".sandbox",$(this.el)),t=!0,n.find("input.required").each(function(){return $(this).removeClass("error"),""===jQuery.trim($(this).val())?($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1):void 0}),n.find("textarea.required").each(function(){return $(this).removeClass("error"),""===jQuery.trim($(this).val())?($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1):void 0}),t){for(s={},r={parent:this},a=!1,m=n.find("input"),o=0,h=m.length;h>o;o++)i=m[o],null!=i.value&&jQuery.trim(i.value).length>0&&(s[i.name]=i.value),"file"===i.type&&(s[i.name]=i.files[0],a=!0);for(f=n.find("textarea"),p=0,c=f.length;c>p;p++)i=f[p],null!=i.value&&jQuery.trim(i.value).length>0&&(s[i.name]=i.value);for(y=n.find("select"),u=0,d=y.length;d>u;u++)i=y[u],l=this.getSelectedValue(i),null!=l&&jQuery.trim(l).length>0&&(s[i.name]=l);return r.responseContentType=$("div select[name=responseContentType]",$(this.el)).val(),r.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val(),$(".response_throbber",$(this.el)).show(),a?this.handleFileUpload(s,n):this.model["do"](s,r,this.showCompleteStatus,this.showErrorStatus,this)}},t.prototype.success=function(e,t){return t.showCompleteStatus(e)},t.prototype.handleFileUpload=function(e,t){var n,a,s,i,r,l,o,p,u,h,c,d,m,f,y,g,v,_,w;for(g=t.serializeArray(),p=0,d=g.length;d>p;p++)i=g[p],null!=i.value&&jQuery.trim(i.value).length>0&&(e[i.name]=i.value);for(n=new FormData,o=0,v=this.model.parameters,u=0,m=v.length;m>u;u++)l=v[u],("form"===l.paramType||"formData"===l["in"])&&"file"!==l.type.toLowerCase()&&void 0!==e[l.name]&&n.append(l.name,e[l.name]);for(s={},_=this.model.parameters,h=0,f=_.length;f>h;h++)l=_[h],"header"===l.paramType&&(s[l.name]=e[l.name]);for(w=t.find('input[type~="file"]'),c=0,y=w.length;y>c;c++)a=w[c],"undefined"!=typeof a.files[0]&&(n.append($(a).attr("name"),a.files[0]),o+=1);return this.invocationUrl=this.model.supportHeaderParams()?(s=this.model.getHeaderParams(e),delete s["Content-Type"],this.model.urlify(e,!1)):this.model.urlify(e,!0),$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(this.invocationUrl),r={type:this.model.method,url:this.invocationUrl,headers:s,data:n,dataType:"json",contentType:!1,processData:!1,error:function(e){return function(t){return e.showErrorStatus(e.wrap(t),e)}}(this),success:function(e){return function(t){return e.showResponse(t,e)}}(this),complete:function(e){return function(t){return e.showCompleteStatus(e.wrap(t),e)}}(this)},window.authorizations&&window.authorizations.apply(r),0===o&&r.data.append("fake","true"),jQuery.ajax(r),!1},t.prototype.wrap=function(e){var t,n,a,s,i,r,l;for(a={},n=e.getAllResponseHeaders().split("\r"),r=0,l=n.length;l>r;r++)s=n[r],t=s.match(/^([^:]*?):(.*)$/),t||(t=[]),t.shift(),void 0!==t[0]&&void 0!==t[1]&&(a[t[0].trim()]=t[1].trim());return i={},i.content={},i.content.data=e.responseText,i.headers=a,i.request={},i.request.url=this.invocationUrl,i.status=e.status,i},t.prototype.getSelectedValue=function(e){var t,n,a,s,i;if(e.multiple){for(n=[],i=e.options,a=0,s=i.length;s>a;a++)t=i[a],t.selected&&n.push(t.value);return n.length>0?n:null}return e.value},t.prototype.hideResponse=function(e){return null!=e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},t.prototype.showResponse=function(e){var t;return t=JSON.stringify(e,null," ").replace(/\n/g,"<br>"),$(".response_body",$(this.el)).html(escape(t))},t.prototype.showErrorStatus=function(e,t){return t.showStatus(e)},t.prototype.showCompleteStatus=function(e,t){return t.showStatus(e)},t.prototype.formatXml=function(e){var t,n,a,s,i,r,l,o,p,u,h,c,d;for(o=/(>)(<)(\/*)/g,u=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(o,"$1\n$2$3").replace(u,"$1\n").replace(t,"$1\n$2"),l=0,n="",i=e.split("\n"),a=0,s="other",p={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},h=function(e){var t,i,r,l,o,u,h;return u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},o=function(){var e;e=[];for(r in u)h=u[r],h&&e.push(r);return e}()[0],o=void 0===o?"other":o,t=s+"->"+o,s=o,l="",a+=p[t],l=function(){var e,t,n;for(n=[],i=e=0,t=a;t>=0?t>e:e>t;i=t>=0?++e:--e)n.push(" ");return n}().join(""),"opening->closing"===t?n=n.substr(0,n.length-1)+e+"\n":n+=l+e+"\n"},c=0,d=i.length;d>c;c++)r=i[c],h(r);return n},t.prototype.showStatus=function(e){var t,n,a,s,i,r,l,o,p,u,h;if(void 0===e.content?(n=e.data,h=e.url):(n=e.content.data,h=e.request.url),i=e.headers,a=null,i&&(a=i["Content-Type"]||i["content-type"],a&&(a=a.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml"),n)if("application/json"===a||/\+json$/.test(a)){r=null;try{r=JSON.stringify(JSON.parse(n),null," ")}catch(c){s=c,r="can't parse JSON. Raw result:\n\n"+n}t=$("<code />").text(r),o=$('<pre class="json" />').append(t)}else"application/xml"===a||/\+xml$/.test(a)?(t=$("<code />").text(this.formatXml(n)),o=$('<pre class="xml" />').append(t)):"text/html"===a?(t=$("<code />").html(_.escape(n)),o=$('<pre class="xml" />').append(t)):/^image\//.test(a)?o=$("<img>").attr("src",h):(t=$("<code />").text(n),o=$('<pre class="json" />').append(t));else t=$("<code />").text("no content"),o=$('<pre class="json" />').append(t);return p=o,$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(h),$(".response_code",$(this.el)).html("<pre>"+e.status+"</pre>"),$(".response_body",$(this.el)).html(p),$(".response_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(e.headers,null," ")).replace(/\n/g,"<br>")+"</pre>"),$(".response",$(this.el)).slideDown(),$(".response_hider",$(this.el)).show(),$(".response_throbber",$(this.el)).hide(),u=$(".response_body",$(this.el))[0],l=this.options.swaggerOptions,l.highlightSizeThreshold&&e.data.length>l.highlightSizeThreshold?u:hljs.highlightBlock(u)},t.prototype.toggleOperationContent=function(){var e;return e=$("#"+Docs.escapeResourceName(this.parentId+"_"+this.nickname+"_content")),e.is(":visible")?Docs.collapseOperation(e):Docs.expandOperation(e)},t}(Backbone.View);var ParameterContentTypeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ParameterContentTypeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),$("label[for=parameterContentType]",$(this.el)).text("Parameter content type:"),this},t.prototype.template=function(){return Handlebars.templates.parameter_content_type},t}(Backbone.View),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i},2:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return' <input type="file" name=\''+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'/>\n"},4:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,a),inverse:this.program(7,a),data:a}),null!=s&&(i+=s),i},5:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <textarea class='body-textarea required' placeholder='(required)' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'>"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <textarea class='body-textarea required' placeholder='(required)' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+'\'></textarea>\n <br />\n <div class="parameter-content-type" />\n'},9:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,a),inverse:this.program(12,a),data:a}),null!=s&&(i+=s),i},10:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <input class='parameter' class='required' type='file' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"'/>\n"},12:function(e,t,n,a){var s,i="";return s=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(13,a),inverse:this.program(15,a),data:a}),null!=s&&(i+=s),i},13:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <input class='parameter required' minlength='1' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='(required)' type='text' value='"+l((s=null!=(s=t["default"]||(null!=e?e["default"]:e))?s:r,typeof s===i?s.call(e,{name:"default",hash:{},data:a}):s))+"'/>\n"},15:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return" <input class='parameter required' minlength='1' name='"+l((s=null!=(s=t.name||(null!=e?e.name:e))?s:r,typeof s===i?s.call(e,{name:"name",hash:{},data:a}):s))+"' placeholder='(required)' type='text' value=''/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td class='code required'>"+o((i=null!=(i=t.name||(null!=e?e.name:e))?i:l,typeof i===r?i.call(e,{name:"name",hash:{},data:a}):i))+"</td>\n<td>\n";return s=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(9,a),data:a}),null!=s&&(p+=s),p+='</td>\n<td>\n <strong><span class="markdown">',i=null!=(i=t.description||(null!=e?e.description:e))?i:l,s=typeof i===r?i.call(e,{name:"description",hash:{},data:a}):i,null!=s&&(p+=s),p+="</span></strong>\n</td>\n<td>",i=null!=(i=t.paramType||(null!=e?e.paramType:e))?i:l,s=typeof i===r?i.call(e,{name:"paramType",hash:{},data:a}):i,null!=s&&(p+=s),p+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a=' <option value="';return t=n(e,e),null!=t&&(a+=t),a+='">',t=n(e,e),null!=t&&(a+=t),a+"</option>\n"},4:function(){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='<label for="parameterContentType"></label>\n<select name="parameterContentType">\n';return s=t["if"].call(e,null!=e?e.consumes:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i+"</select>\n"},useData:!0});var ParameterView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ParameterView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){return Handlebars.registerHelper("isArray",function(e,t){return"array"===e.type.toLowerCase()||e.allowMultiple?t.fn(this):t.inverse(this)})},t.prototype.render=function(){var e,t,n,a,s,i,r,l,o,p;return p=this.model.type||this.model.dataType,"undefined"==typeof p&&(i=this.model.schema,i&&i.$ref&&(a=i.$ref,p=0===a.indexOf("#/definitions/")?a.substring("#/definitions/".length):a)),this.model.type=p,this.model.paramType=this.model["in"]||this.model.paramType,("body"===this.model.paramType||"body"===this.model["in"])&&(this.model.isBody=!0),p&&"file"===p.toLowerCase()&&(this.model.isFile=!0),this.model["default"]=this.model["default"]||this.model.defaultValue,this.model.allowableValues&&(this.model.isList=!0),o=this.template(),$(this.el).html(o(this.model)),r={sampleJSON:this.model.sampleJSON,isParam:!0,signature:this.model.signature},this.model.sampleJSON?(l=new SignatureView({model:r,tagName:"div"}),$(".model-signature",$(this.el)).append(l.render().el)):$(".model-signature",$(this.el)).html(this.model.signature),t=!1,this.model.isBody&&(t=!0),e={isParam:t},e.consumes=this.model.consumes,t?(n=new ParameterContentTypeView({model:e}),$(".parameter-content-type",$(this.el)).append(n.render().el)):(s=new ResponseContentTypeView({model:e}),$(".response-content-type",$(this.el)).append(s.render().el)),this},t.prototype.template=function(){return this.model.isList?Handlebars.templates.param_list:this.options.readOnly?this.model.required?Handlebars.templates.param_readonly_required:Handlebars.templates.param_readonly:this.model.required?Handlebars.templates.param_required:Handlebars.templates.param},t}(Backbone.View);var ResourceView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ResourceView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(e){return null==e&&(e={}),this.auths=e.auths,""===this.model.description&&(this.model.description=null),null!=this.model.description?this.model.summary=this.model.description:void 0},t.prototype.render=function(){var e,t,n,a,s,i,r;for(n={},$(this.el).html(Handlebars.templates.resource(this.model)),r=this.model.operationsArray,s=0,i=r.length;i>s;s++){for(a=r[s],e=0,t=a.nickname;"undefined"!=typeof n[t];)t=t+"_"+e,e+=1;n[t]=a,a.nickname=t,a.parentId=this.model.id,this.addOperation(a)}return $(".toggleEndpointList",this.el).click(this.callDocs.bind(this,"toggleEndpointListForResource")),$(".collapseResource",this.el).click(this.callDocs.bind(this,"collapseOperationsForResource")),$(".expandResource",this.el).click(this.callDocs.bind(this,"expandOperationsForResource")),this},t.prototype.addOperation=function(e){var t;return e.number=this.number,t=new OperationView({model:e,tagName:"li",className:"endpoint",swaggerOptions:this.options.swaggerOptions,auths:this.auths}),$(".endpoints",$(this.el)).append(t.render().el),this.number++},t.prototype.callDocs=function(e,t){return t.preventDefault(),Docs[e](t.currentTarget.getAttribute("data-id"))},t}(Backbone.View),this.Handlebars.templates.resource=Handlebars.template({1:function(){return" : "},3:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"<li>\n <a href='"+l((s=null!=(s=t.url||(null!=e?e.url:e))?s:r,typeof s===i?s.call(e,{name:"url",hash:{},data:a}):s))+"'>Raw</a>\n </li>"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r,l="function",o=t.helperMissing,p=this.escapeExpression,u=t.blockHelperMissing,h="<div class='heading'>\n <h2>\n <a href='#!/"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'\' class="toggleEndpointList" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">'+p((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===l?i.call(e,{name:"name",hash:{},data:a}):i))+"</a> ";return i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,r={name:"summary",hash:{},fn:this.program(1,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.summary||(s=u.call(e,s,r)),null!=s&&(h+=s),i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,s=typeof i===l?i.call(e,{name:"summary",hash:{},data:a}):i,null!=s&&(h+=s),h+="\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+"' id='endpointListTogger_"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'\' class="toggleEndpointList" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">Show/Hide</a>\n </li>\n <li>\n <a href=\'#\' class="collapseResource" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">\n List Operations\n </a>\n </li>\n <li>\n <a href=\'#\' class="expandResource" data-id="'+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+'">\n Expand Operations\n </a>\n </li>\n ',i=null!=(i=t.url||(null!=e?e.url:e))?i:o,r={name:"url",hash:{},fn:this.program(3,a),inverse:this.noop,data:a},s=typeof i===l?i.call(e,r):i,t.url||(s=u.call(e,s,r)),null!=s&&(h+=s),h+"\n </ul>\n</div>\n<ul class='endpoints' id='"+p((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===l?i.call(e,{name:"id",hash:{},data:a}):i))+"_endpoint_list' style='display:none'>\n\n</ul>\n"},useData:!0});var ResponseContentTypeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;ResponseContentTypeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),$("label[for=responseContentType]",$(this.el)).text("Response Content Type"),this},t.prototype.template=function(){return Handlebars.templates.response_content_type},t}(Backbone.View),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a=' <option value="';return t=n(e,e),null!=t&&(a+=t),a+='">',t=n(e,e),null!=t&&(a+=t),a+"</option>\n"},4:function(){return' <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='<label for="responseContentType"></label>\n<select name="responseContentType">\n';return s=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,a),inverse:this.program(4,a),data:a}),null!=s&&(i+=s),i+"</select>\n"},useData:!0});var SignatureView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;SignatureView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.events={"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet":"snippetToTextArea"},t.prototype.initialize=function(){},t.prototype.render=function(){var e;return e=this.template(),$(this.el).html(e(this.model)),this.switchToSnippet(),this.isParam=this.model.isParam,this.isParam&&$(".notice",$(this.el)).text("Click to set as parameter value"),this},t.prototype.template=function(){return Handlebars.templates.signature},t.prototype.switchToDescription=function(e){return null!=e&&e.preventDefault(),$(".snippet",$(this.el)).hide(),$(".description",$(this.el)).show(),$(".description-link",$(this.el)).addClass("selected"),$(".snippet-link",$(this.el)).removeClass("selected")},t.prototype.switchToSnippet=function(e){return null!=e&&e.preventDefault(),$(".description",$(this.el)).hide(),$(".snippet",$(this.el)).show(),$(".snippet-link",$(this.el)).addClass("selected"),$(".description-link",$(this.el)).removeClass("selected")},t.prototype.snippetToTextArea=function(e){var t;return this.isParam&&(null!=e&&e.preventDefault(),t=$("textarea",$(this.el.parentNode.parentNode.parentNode)),""===$.trim(t.val()))?t.val(this.model.sampleJSON):void 0},t}(Backbone.View),this.Handlebars.templates.signature=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p='<div>\n<ul class="signature-nav">\n <li><a class="description-link" href="#">Model</a></li>\n <li><a class="snippet-link" href="#">Model Schema</a></li>\n</ul>\n<div>\n\n<div class="signature-container">\n <div class="description">\n ';return i=null!=(i=t.signature||(null!=e?e.signature:e))?i:l,s=typeof i===r?i.call(e,{name:"signature",hash:{},data:a}):i,null!=s&&(p+=s),p+'\n </div>\n\n <div class="snippet">\n <pre><code>'+o((i=null!=(i=t.sampleJSON||(null!=e?e.sampleJSON:e))?i:l,typeof i===r?i.call(e,{name:"sampleJSON",hash:{},data:a}):i))+'</code></pre>\n <small class="notice"></small>\n </div>\n</div>\n\n'},useData:!0});var StatusCodeView,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;StatusCodeView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.initialize=function(){},t.prototype.render=function(){var e,t,n;return n=this.template(),$(this.el).html(n(this.model)),swaggerUi.api.models.hasOwnProperty(this.model.responseModel)?(e={sampleJSON:JSON.stringify(swaggerUi.api.models[this.model.responseModel].createJSONSample(),null,2),isParam:!1,signature:swaggerUi.api.models[this.model.responseModel].getMockSignature()},t=new SignatureView({model:e,tagName:"div"}),$(".model-signature",this.$el).append(t.render().el)):$(".model-signature",this.$el).html(""),this},t.prototype.template=function(){return Handlebars.templates.status_code},t}(Backbone.View),this.Handlebars.templates.status_code=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i,r="function",l=t.helperMissing,o=this.escapeExpression,p="<td width='15%' class='code'>"+o((i=null!=(i=t.code||(null!=e?e.code:e))?i:l,typeof i===r?i.call(e,{name:"code",hash:{},data:a}):i))+"</td>\n<td>";return i=null!=(i=t.message||(null!=e?e.message:e))?i:l,s=typeof i===r?i.call(e,{name:"message",hash:{},data:a}):i,null!=s&&(p+=s),p+"</td>\n<td width='50%'><span class=\"model-signature\" /></td>"},useData:!0});
\ No newline at end of file diff --git a/catalog/src/main/resources/migrations.xml b/catalog-core/catalog-mgr/src/main/resources/migrations.xml index f6791098..41231d6e 100644 --- a/catalog/src/main/resources/migrations.xml +++ b/catalog-core/catalog-mgr/src/main/resources/migrations.xml @@ -1,12 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + Copyright 2016 [ZTE] and others. 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 + 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, @@ -15,40 +16,20 @@ limitations under the License. --> - -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - - 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. - ---> - <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> - <changeSet id="org.openo.orchestrator.nfv.catalog.createObj" author="db_resource" runAlways = "true"> + <changeSet id="org.openo.commontosca.catalog.createObj" author="db_resource" runAlways = "true"> <sqlFile path="./conf/catalog-resource-createObj-mysql.sql"/> </changeSet> - - <changeSet id="org.openo.orchestrator.nfv.catalog.insert" author="db_resource" runAlways = "true"> + + <changeSet id="org.openo.commontosca.catalog.insert" author="db_resource" runAlways = "true"> <sqlFile path="./conf/catalog-resource-insert-mysql.sql"/> </changeSet> - - <changeSet id="org.openo.orchestrator.nfv.catalog.extend.insert" author="db_resource" runAlways = "true"> + + <changeSet id="org.openo.commontosca.catalog.extend.insert" author="db_resource" runAlways = "true"> <sqlFile path="./conf/catalog-resource-insert-extend-mysql.sql"/> </changeSet> diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/IntegrationManager.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/IntegrationManager.java index 789aa225..8e212103 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/IntegrationManager.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/IntegrationManager.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource; +package org.openo.commontosca.catalog.db.resource; import java.util.ArrayList; @@ -23,14 +23,14 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.H2DbServer; -import org.openo.orchestrator.nfv.catalog.db.util.HibernateSession; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.dao.DaoManager; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.db.util.H2DbServer; +import org.openo.commontosca.catalog.db.util.HibernateSession; public class IntegrationManager { private static PackageManager packageManager; @@ -47,7 +47,8 @@ public class IntegrationManager { @AfterClass public static void tearDownAfterClass() throws Exception { try { - HibernateSession.destory(); + HibernateSession.destory(); + DaoManager.getInstance().setDaoNull(); H2DbServer.shutDown(); } catch (Exception e) { Assert.fail("Exception" + e.getMessage()); diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/PackageManagerTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/PackageManagerTest.java index d811dd5f..52ec701f 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/PackageManagerTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/PackageManagerTest.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource; +package org.openo.commontosca.catalog.db.resource; import static org.junit.Assert.assertTrue; @@ -27,12 +27,12 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.openo.orchestrator.nfv.catalog.db.common.Parameters; -import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.H2DbServer; -import org.openo.orchestrator.nfv.catalog.db.util.HibernateSession; +import org.openo.commontosca.catalog.db.common.Parameters; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.dao.DaoManager; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.util.H2DbServer; +import org.openo.commontosca.catalog.db.util.HibernateSession; public class PackageManagerTest { private static PackageManager manager; @@ -48,6 +48,7 @@ public class PackageManagerTest { public static void tearDownAfterClass() throws Exception { try { HibernateSession.destory(); + DaoManager.getInstance().setPackageDao(null); H2DbServer.shutDown(); } catch (Exception e) { Assert.fail("Exception" + e.getMessage()); diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/TemplateManagerTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/TemplateManagerTest.java index 44bc3ea0..66b25048 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/TemplateManagerTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/TemplateManagerTest.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource; +package org.openo.commontosca.catalog.db.resource; import java.util.ArrayList; @@ -23,13 +23,13 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.H2DbServer; -import org.openo.orchestrator.nfv.catalog.db.util.HibernateSession; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.dao.DaoManager; +import org.openo.commontosca.catalog.db.entity.NodeTemplateData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.db.entity.TemplateData; +import org.openo.commontosca.catalog.db.util.H2DbServer; +import org.openo.commontosca.catalog.db.util.HibernateSession; public class TemplateManagerTest { private static TemplateManager manager; @@ -45,6 +45,9 @@ public class TemplateManagerTest { public static void tearDownAfterClass() throws Exception { try { HibernateSession.destory(); + DaoManager.getInstance().setTemplateDao(null); + DaoManager.getInstance().setServiceTemplateDao(null); + DaoManager.getInstance().setNodeTemplateDao(null); H2DbServer.shutDown(); } catch (Exception e) { Assert.fail("Exception" + e.getMessage()); diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/TemplateMappingManagerTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/TemplateMappingManagerTest.java index 36045a02..4f952e47 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/TemplateMappingManagerTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/TemplateMappingManagerTest.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource; +package org.openo.commontosca.catalog.db.resource; import java.util.ArrayList; @@ -23,14 +23,11 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData; -import org.openo.orchestrator.nfv.catalog.db.entity.TemplateData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.H2DbServer; -import org.openo.orchestrator.nfv.catalog.db.util.HibernateSession; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.dao.DaoManager; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData; +import org.openo.commontosca.catalog.db.util.H2DbServer; +import org.openo.commontosca.catalog.db.util.HibernateSession; public class TemplateMappingManagerTest { private static TemplateManager manager; @@ -46,6 +43,7 @@ public class TemplateMappingManagerTest { public static void tearDownAfterClass() throws Exception { try { HibernateSession.destory(); + DaoManager.getInstance().setTemplateDao(null); H2DbServer.shutDown(); } catch (Exception e) { Assert.fail("Exception" + e.getMessage()); diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/dao/PackageDaoTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/dao/PackageDaoTest.java index 6c2a3d23..b61fde9e 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/resource/dao/PackageDaoTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/resource/dao/PackageDaoTest.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.resource.dao; +package org.openo.commontosca.catalog.db.resource.dao; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -28,13 +28,13 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.openo.orchestrator.nfv.catalog.db.common.Parameters; -import org.openo.orchestrator.nfv.catalog.db.dao.PackageDao; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException; -import org.openo.orchestrator.nfv.catalog.db.util.H2DbServer; -import org.openo.orchestrator.nfv.catalog.db.util.HibernateSession; -import org.openo.orchestrator.nfv.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.common.Parameters; +import org.openo.commontosca.catalog.db.dao.PackageDao; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.db.util.HqlFactory; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.util.H2DbServer; +import org.openo.commontosca.catalog.db.util.HibernateSession; public class PackageDaoTest { diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/CatalogDbUtilTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/CatalogDbUtilTest.java index 51d70288..cd923160 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/CatalogDbUtilTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/CatalogDbUtilTest.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.util; +package org.openo.commontosca.catalog.db.util; import static org.junit.Assert.*; diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/H2DbServer.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/H2DbServer.java index 5e55d918..ceb3c7c0 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/H2DbServer.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/H2DbServer.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.util; +package org.openo.commontosca.catalog.db.util; import java.sql.SQLException; diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/H2DbServerUtil.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/H2DbServerUtil.java index 81e66bdf..033e49f2 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/H2DbServerUtil.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/H2DbServerUtil.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.util; +package org.openo.commontosca.catalog.db.util; import java.io.File; import java.net.URISyntaxException; diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/HibernateSession.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/HibernateSession.java index e2a6e398..0b031a7a 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/HibernateSession.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/HibernateSession.java @@ -1,19 +1,19 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.util; +package org.openo.commontosca.catalog.db.util; import java.io.File; import java.net.URISyntaxException; diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/HqlFactoryTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/HqlFactoryTest.java index ee69f762..d1070180 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/db/util/HqlFactoryTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/db/util/HqlFactoryTest.java @@ -1,25 +1,25 @@ /** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + * Copyright 2016 [ZTE] and others. * - * 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 + * 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 + * 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. + * 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 org.openo.orchestrator.nfv.catalog.db.util; +package org.openo.commontosca.catalog.db.util; import static org.junit.Assert.*; import org.junit.Test; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; +import org.openo.commontosca.catalog.db.entity.PackageData; +import org.openo.commontosca.catalog.db.entity.ServiceTemplateData; public class HqlFactoryTest { diff --git a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/wrapper/PackageWrapperTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java index 0f637328..066710c4 100644 --- a/catalog/src/test/java/org/openo/orchestrator/nfv/catalog/wrapper/PackageWrapperTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java @@ -1,19 +1,19 @@ /**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ * Copyright 2016 [ZTE] and others.
*
- * 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
+ * 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
+ * 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.
+ * 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 org.openo.orchestrator.nfv.catalog.wrapper;
+package org.openo.commontosca.catalog.wrapper;
import java.io.File;
import java.io.FileInputStream;
@@ -32,23 +32,23 @@ import org.junit.Before; import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
-import org.openo.orchestrator.nfv.catalog.CatalogAppConfiguration;
-import org.openo.orchestrator.nfv.catalog.common.Config;
-import org.openo.orchestrator.nfv.catalog.common.HttpServerAddrConfig;
-import org.openo.orchestrator.nfv.catalog.common.HttpServerPathConfig;
-import org.openo.orchestrator.nfv.catalog.common.MsbAddrConfig;
-import org.openo.orchestrator.nfv.catalog.db.dao.DaoManager;
-import org.openo.orchestrator.nfv.catalog.db.entity.PackageData;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.db.resource.PackageManager;
-import org.openo.orchestrator.nfv.catalog.db.util.H2DbServer;
-import org.openo.orchestrator.nfv.catalog.db.util.HibernateSession;
-import org.openo.orchestrator.nfv.catalog.entity.EnumOperationalState;
-import org.openo.orchestrator.nfv.catalog.entity.EnumProcessState;
-import org.openo.orchestrator.nfv.catalog.entity.EnumUsageState;
-import org.openo.orchestrator.nfv.catalog.entity.response.CsarFileUriResponse;
-import org.openo.orchestrator.nfv.catalog.entity.response.PackageMeta;
-import org.openo.orchestrator.nfv.catalog.filemanage.entity.FileLink;
+import org.openo.commontosca.catalog.CatalogAppConfiguration;
+import org.openo.commontosca.catalog.common.Config;
+import org.openo.commontosca.catalog.common.MsbAddrConfig;
+import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
+import org.openo.commontosca.catalog.db.resource.PackageManager;
+import org.openo.commontosca.catalog.filemanage.entity.FileLink;
+import org.openo.commontosca.catalog.common.HttpServerAddrConfig;
+import org.openo.commontosca.catalog.common.HttpServerPathConfig;
+import org.openo.commontosca.catalog.db.dao.DaoManager;
+import org.openo.commontosca.catalog.db.entity.PackageData;
+import org.openo.commontosca.catalog.db.util.H2DbServer;
+import org.openo.commontosca.catalog.db.util.HibernateSession;
+import org.openo.commontosca.catalog.entity.EnumOperationalState;
+import org.openo.commontosca.catalog.entity.EnumProcessState;
+import org.openo.commontosca.catalog.entity.EnumUsageState;
+import org.openo.commontosca.catalog.entity.response.CsarFileUriResponse;
+import org.openo.commontosca.catalog.entity.response.PackageMeta;
import static org.junit.Assert.*;
@@ -258,6 +258,7 @@ public class PackageWrapperTest { public static void tearDownAfterClass() {
try {
HibernateSession.destory();
+ DaoManager.getInstance().setDaoNull();
H2DbServer.shutDown();
} catch (Exception e) {
Assert.fail("Exception" + e.getMessage());
diff --git a/catalog-core/catalog-mgr/src/test/resources/Hibernate.cfg.xml b/catalog-core/catalog-mgr/src/test/resources/Hibernate.cfg.xml new file mode 100644 index 00000000..e0b13c51 --- /dev/null +++ b/catalog-core/catalog-mgr/src/test/resources/Hibernate.cfg.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<!DOCTYPE hibernate-configuration PUBLIC +"-//Hibernate/Hibernate Configuration DTD 3.0//EN" +"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> +<session-factory> + <property name="show_sql">true</property> + <property name="dialect">org.hibernate.dialect.H2Dialect</property> + <property name="hibernate.connection.driver_class">org.h2.Driver</property> + <property name="hibernate.connection.url">jdbc:h2:tcp://localhost:8205/./db/catalog</property> + <property name="hibernate.connection.username">catalog</property> + <property name="hibernate.connection.password">catalog</property> + <property name="hbm2ddl">update</property> + <property name="current_session_context_class">thread</property> + <mapping class="org.openo.commontosca.catalog.db.entity.NodeTemplateData"/> + <mapping class="org.openo.commontosca.catalog.db.entity.PackageData"/> + <mapping class="org.openo.commontosca.catalog.db.entity.ServiceTemplateData"/> + <mapping class="org.openo.commontosca.catalog.db.entity.ServiceTemplateMappingData"/> +</session-factory> +</hibernate-configuration>
\ No newline at end of file diff --git a/catalog/src/test/resources/NanocellGW.csar b/catalog-core/catalog-mgr/src/test/resources/NanocellGW.csar Binary files differindex d9efb502..d9efb502 100644 --- a/catalog/src/test/resources/NanocellGW.csar +++ b/catalog-core/catalog-mgr/src/test/resources/NanocellGW.csar diff --git a/catalog/src/test/resources/db/catalog.mv.db b/catalog-core/catalog-mgr/src/test/resources/db/catalog.mv.db Binary files differindex b1d596f4..b1d596f4 100644 --- a/catalog/src/test/resources/db/catalog.mv.db +++ b/catalog-core/catalog-mgr/src/test/resources/db/catalog.mv.db diff --git a/catalog/src/test/resources/sql/catalog-resource-createObj-mysql.sql b/catalog-core/catalog-mgr/src/test/resources/sql/catalog-resource-createObj-mysql.sql index 66d8406a..3966c7dc 100644 --- a/catalog/src/test/resources/sql/catalog-resource-createObj-mysql.sql +++ b/catalog-core/catalog-mgr/src/test/resources/sql/catalog-resource-createObj-mysql.sql @@ -1,17 +1,17 @@ -- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +-- Copyright 2016 [ZTE] and others. -- --- 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 +-- 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 +-- 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. +-- 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. -- DROP TABLE IF EXISTS catalog_package_table; diff --git a/catalog-all/pom.xml b/catalog-core/distribution/catalog-all/pom.xml index 4f397a21..3fa414af 100644 --- a/catalog-all/pom.xml +++ b/catalog-core/distribution/catalog-all/pom.xml @@ -1,40 +1,40 @@ <!-- - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + Copyright 2016 [ZTE] and others. - 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 + 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 + 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. + 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>catalog-parent</artifactId> - <groupId>org.openo.orchestrator.nfv.catalog</groupId> - <version>0.0.1-SNAPSHOT</version> + <parent> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>distribution</artifactId> + <version>1.0.0-SNAPSHOT</version> </parent> + + <modelVersion>4.0.0</modelVersion> <artifactId>catalog-all</artifactId> - <name>openo/catalog/catalog-all</name> + <name>openo/commontosca/catalog/distribution/catalog-all</name> <packaging>pom</packaging> - <properties> - <packagename>catalog-all</packagename> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + + <properties> + <packagename>openo-commontosca-catalog</packagename> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <version>2.8</version> <executions> <execution> <id>unpack-catalog</id> @@ -43,30 +43,30 @@ <goal>unpack-dependencies</goal> </goals> <configuration> - <includeGroupIds>org.openo.orchestrator.nfv.catalog</includeGroupIds> + <includeGroupIds>org.openo.commontosca.catalog</includeGroupIds> <includeArtifactIds>catalog-standalone</includeArtifactIds> <outputDirectory> target/assembly/catalog </outputDirectory> </configuration> </execution> - <execution> + <execution> <id>unpack-httpserver</id> <phase>package</phase> <goals> <goal>unpack-dependencies</goal> </goals> <configuration> - <includeGroupIds>org.openo.orchestrator.nfv.catalog</includeGroupIds> - <includeArtifactIds>httpserver-standalone</includeArtifactIds> + <includeGroupIds>org.openo.commontosca.catalog</includeGroupIds> + <includeArtifactIds>httpserver</includeArtifactIds> <outputDirectory> target/assembly/ </outputDirectory> </configuration> </execution> </executions> - </plugin> - <plugin> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> @@ -77,8 +77,8 @@ <goal>run</goal> </goals> <configuration> - <tasks name="${project.artifactId}"> - <zip destfile="target/${packagename}-${project.version}.zip" update="true"> + <tasks name="${project.artifactId}"> + <zip destfile="target/${packagename}-${project.version}.zip" update="true"> <zipfileset dir="target/assembly" includes="**" /> </zip> </tasks> @@ -86,7 +86,7 @@ </execution> </executions> </plugin> - <plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -106,21 +106,21 @@ </configuration> </execution> </executions> - </plugin> + </plugin> </plugins> </build> <dependencies> <dependency> - <groupId>org.openo.orchestrator.nfv.catalog</groupId> + <groupId>org.openo.commontosca.catalog</groupId> <artifactId>catalog-standalone</artifactId> <version>${project.version}</version> - <type>zip</type> + <type>zip</type> </dependency> - <dependency> - <groupId>org.openo.orchestrator.nfv.catalog</groupId> - <artifactId>httpserver-standalone</artifactId> + <dependency> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>httpserver</artifactId> <version>${project.version}</version> - <type>zip</type> + <type>zip</type> </dependency> </dependencies> </project>
\ No newline at end of file diff --git a/catalog-standalone/pom.xml b/catalog-core/distribution/catalog-standalone/pom.xml index 32249e72..d6e86117 100644 --- a/catalog-standalone/pom.xml +++ b/catalog-core/distribution/catalog-standalone/pom.xml @@ -1,29 +1,30 @@ <!--
- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ Copyright 2016 [ZTE] and others.
- 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
+ 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
+ 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.
+ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>catalog-parent</artifactId>
- <groupId>org.openo.orchestrator.nfv.catalog</groupId>
- <version>0.0.1-SNAPSHOT</version>
+ <groupId>org.openo.commontosca.catalog</groupId>
+ <artifactId>distribution</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
+
+ <modelVersion>4.0.0</modelVersion>
<artifactId>catalog-standalone</artifactId>
- <name>openo/catalog/catalog-standalone</name>
+ <name>openo/commontosca/catalog/distribution/catalog-standalone</name>
<packaging>pom</packaging>
<properties>
@@ -70,8 +71,8 @@ <configuration>
<artifactItems>
<artifactItem>
- <groupId>org.openo.orchestrator.nfv.catalog</groupId>
- <artifactId>catalog</artifactId>
+ <groupId>org.openo.commontosca.catalog</groupId>
+ <artifactId>catalog-mgr</artifactId>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>target/assembly/</outputDirectory>
@@ -128,8 +129,8 @@ <dependencies>
<dependency>
- <groupId>org.openo.orchestrator.nfv.catalog</groupId>
- <artifactId>catalog</artifactId>
+ <groupId>org.openo.commontosca.catalog</groupId>
+ <artifactId>catalog-mgr</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql index 482d6cb5..9b7ed341 100644 --- a/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-db-createdb-mysql.sql @@ -1,17 +1,17 @@ -- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +-- Copyright 2016 [ZTE] and others. -- --- 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 +-- 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 +-- 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. +-- 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. -- /******************drop old database and user***************************/ diff --git a/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql index 8039a715..d49e60ba 100644 --- a/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-createObj-mysql.sql @@ -1,17 +1,17 @@ -- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) +-- Copyright 2016 [ZTE] and others. -- --- 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 +-- 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 +-- 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. +-- 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. -- use catalog; diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql new file mode 100644 index 00000000..50b0c190 --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql @@ -0,0 +1,17 @@ +-- +-- Copyright 2016 [ZTE] and others. +-- +-- 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. +-- + +--
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql new file mode 100644 index 00000000..d0bd6180 --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql @@ -0,0 +1,20 @@ +-- +-- Copyright 2016 [ZTE] and others. +-- +-- 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. +-- + +SET autocommit = 0; + +COMMIT; +SET autocommit = 1;
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/conf/catalog.yml b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml index 3785c38b..14deab79 100644 --- a/catalog-standalone/src/main/assembly/conf/catalog.yml +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/conf/catalog.yml @@ -1,17 +1,17 @@ #
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+# Copyright 2016 [ZTE] and others.
#
-# 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
+# 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
+# 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.
+# 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.
#
template: Hello, %s!
@@ -75,7 +75,7 @@ logging: loggers:
# Sets the level for 'com.example.app' to DEBUG.
- org.openo.orchestrator.nfv.catalog.CatalogApp: INFO
+ org.openo.commontosca.catalog.catalog.CatalogApp: INFO
appenders:
- type: console
diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat new file mode 100644 index 00000000..e3644ddf --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/find_kill_process.bat @@ -0,0 +1,24 @@ +@REM
+@REM Copyright 2016 [ZTE] and others.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+
+echo %1 | findstr %2 >NUL
+echo ERRORLEVEL=%ERRORLEVEL%
+IF ERRORLEVEL 1 goto findend
+for /f "tokens=1" %%a in (%1) do (
+ echo kill %1
+ taskkill /F /pid %%a
+)
+:findend
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat new file mode 100644 index 00000000..61a00e69 --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.bat @@ -0,0 +1,42 @@ +@REM +@REM Copyright 2016 [ZTE] and others. +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM + +@echo off +title init catalog db + +set RUNHOME=%~dp0 +echo ### RUNHOME: %RUNHOME% + +echo ### init catalog db +rem cd /d %RUNHOME% + +set JAVA="%JAVA_HOME%\bin\java.exe" +set port=8777 +set jvm_opts=-Xms50m -Xmx128m +rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n +set class_path=%RUNHOME%;%RUNHOME%catalog-service.jar +echo ### jvm_opts: %jvm_opts% +echo ### class_path: %class_path% + +%JAVA% -classpath %class_path% %jvm_opts% org.openo.commontosca.catalog.CatalogApp db migrate %RUNHOME%conf\catalog.yml + +IF ERRORLEVEL 1 goto showerror +exit +:showerror +echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check! +echo After checking, press any key to close +pause +exit
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh new file mode 100644 index 00000000..b950f88c --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/initDB.sh @@ -0,0 +1,31 @@ +# +# Copyright 2016 [ZTE] and others. +# +# 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. +# + +DIRNAME=`dirname $0` +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $RUNHOME + +title catalog Database setup + +echo ### Starting catalog Database setup +echo @JAVA_HOME@ $JAVA_HOME +JAVA="$JAVA_HOME/bin/java" +echo @JAVA@ $JAVA + +class_path="$RUNHOME/:$RUNHOME/catalog-service.jar" +echo @class_path@ $class_path + +"$JAVA" -classpath "$class_path" org.openo.commontosca.catalog.CatalogApp db migrate "$RUNHOME/conf/catalog.yml" diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat new file mode 100644 index 00000000..7dbcab0e --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.bat @@ -0,0 +1,40 @@ +@REM
+@REM Copyright 2016 [ZTE] and others.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+@REM
+
+@echo off
+title catalog-service
+
+set RUNHOME=%~dp0
+echo ### RUNHOME: %RUNHOME%
+echo ### Starting catalog-service
+
+set JAVA="%JAVA_HOME%\bin\java.exe"
+set port=8312
+set jvm_opts=-Xms50m -Xmx128m
+rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n
+set class_path=%RUNHOME%;%RUNHOME%catalog-service.jar
+echo ### jvm_opts: %jvm_opts%
+echo ### class_path: %class_path%
+
+%JAVA% -classpath %class_path% %jvm_opts% org.openo.commontosca.catalog.CatalogApp server %RUNHOME%conf/catalog.yml
+
+IF ERRORLEVEL 1 goto showerror
+exit
+:showerror
+echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
+echo After checking, press any key to close
+pause
+exit
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh new file mode 100644 index 00000000..4eda12c4 --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/run.sh @@ -0,0 +1,34 @@ +# +# Copyright 2016 [ZTE] and others. +# +# 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. +# + +DIRNAME=`dirname $0` +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $RUNHOME + +echo @JAVA_HOME@ $JAVA_HOME +JAVA="$JAVA_HOME/bin/java" +echo @JAVA@ $JAVA + +JAVA_OPTS="-Xms50m -Xmx128m" +port=8312 +#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n" +echo @JAVA_OPTS@ $JAVA_OPTS + +class_path="$RUNHOME/:$RUNHOME/catalog-service.jar" +echo @class_path@ $class_path + +"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.commontosca.catalog.CatalogApp server "$RUNHOME/conf/catalog.yml" + diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat new file mode 100644 index 00000000..f3e7c08f --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.bat @@ -0,0 +1,34 @@ +@REM +@REM Copyright 2016 [ZTE] and others. +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM + +@echo off +title stopping catalog-service + +set HOME=%~dp0 +set Main_Class="org.openo.commontosca.catalog.CatalogApp" + +echo ================== catalog-service info ============================================= +echo HOME=$HOME +echo Main_Class=%Main_Class% +echo =============================================================================== + +echo ### Stopping catalog-service +cd /d %HOME% + +for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do ( + call find_kill_process "%%i" %Main_Class% +) +exit
\ No newline at end of file diff --git a/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.sh b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.sh new file mode 100644 index 00000000..40ae2dad --- /dev/null +++ b/catalog-core/distribution/catalog-standalone/src/main/assembly/stop.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright 2016 [ZTE] and others. +# +# 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. +# + +DIRNAME=`dirname $0` +HOME=`cd $DIRNAME/; pwd` +Main_Class="org.openo.commontosca.catalog.CatalogApp" + +echo ================== catalog-service info ============================================= +echo HOME=$HOME +echo Main_Class=$Main_Class +echo =============================================================================== +cd $HOME; pwd + +echo @WORK_DIR@ $HOME + +function save_service_pid(){ + service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` + echo @service_pid@ $service_pid +} + +function kill_service_process(){ + ps -p $service_pid + if [ $? == 0 ]; then + kill -9 $service_pid + fi +} + +save_service_pid; +echo @C_CMD@ kill -9 $service_pid +kill_service_process;
\ No newline at end of file diff --git a/catalog-core/distribution/pom.xml b/catalog-core/distribution/pom.xml new file mode 100644 index 00000000..c7c22908 --- /dev/null +++ b/catalog-core/distribution/pom.xml @@ -0,0 +1,34 @@ +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalog-core-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>distribution</artifactId> + <name>openo/commontosca/catalog/distribution</name> + <packaging>pom</packaging> + + <modules> + <module>catalog-standalone</module> + <module>catalog-all</module> + </modules> +</project> diff --git a/httpserver-standalone/pom.xml b/catalog-core/httpserver/pom.xml index 251cf9ff..b1ead67a 100644 --- a/httpserver-standalone/pom.xml +++ b/catalog-core/httpserver/pom.xml @@ -1,41 +1,42 @@ <!-- - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + Copyright 2016 [ZTE] and others. - 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 + 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 + 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. + 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <artifactId>catalog-parent</artifactId> - <groupId>org.openo.orchestrator.nfv.catalog</groupId> - <version>0.0.1-SNAPSHOT</version> + <parent> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalog-core-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> </parent> - <artifactId>httpserver-standalone</artifactId> - <name>openo/catalog/httpserver-standalone</name> + + <modelVersion>4.0.0</modelVersion> + <artifactId>httpserver</artifactId> + <name>openo/commontosca/catalog/httpserver</name> <packaging>pom</packaging> + <properties> <tomcat.version>7.0.62</tomcat.version> - <packagename>http-server</packagename> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <packagename>http-server</packagename> </properties> + <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <version>2.8</version> <executions> <execution> <id>unpack-tomcat</id> @@ -52,8 +53,8 @@ </configuration> </execution> </executions> - </plugin> - <plugin> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> @@ -64,12 +65,12 @@ <goal>run</goal> </goals> <configuration> - <tasks name="${project.artifactId}"> - <move todir="target/assembly/tomcat"> - <fileset dir="target/assembly/apache-tomcat-${tomcat.version}"/> - </move> - <copydir src="src/main/assembly/" dest="target/assembly"/> - <zip destfile="target/${packagename}-${project.version}.zip" update="true"> + <tasks name="${project.artifactId}"> + <move todir="target/assembly/tomcat"> + <fileset dir="target/assembly/apache-tomcat-${tomcat.version}"/> + </move> + <copydir src="src/main/assembly/" dest="target/assembly"/> + <zip destfile="target/${packagename}-${project.version}.zip" update="true"> <zipfileset dir="target/assembly" includes="**" /> </zip> </tasks> @@ -77,7 +78,7 @@ </execution> </executions> </plugin> - <plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> diff --git a/httpserver-standalone/src/main/assembly/tomcat/conf/web.xml b/catalog-core/httpserver/src/main/assembly/tomcat/conf/web.xml index e1736353..af6dd7c9 100644 --- a/httpserver-standalone/src/main/assembly/tomcat/conf/web.xml +++ b/catalog-core/httpserver/src/main/assembly/tomcat/conf/web.xml @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) + Copyright 2016 [ZTE] and others. - 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 + 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 + 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. + 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. --> <web-app xmlns="http://java.sun.com/xml/ns/javaee" diff --git a/catalog-core/pom.xml b/catalog-core/pom.xml new file mode 100644 index 00000000..65150e85 --- /dev/null +++ b/catalog-core/pom.xml @@ -0,0 +1,35 @@ +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalog-root</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>catalog-core-parent</artifactId> + <name>openo/commontosca/catalog/catalog-core-parent</name> + <packaging>pom</packaging> + + <modules> + <module>catalog-mgr</module> + <module>httpserver</module> + <module>distribution</module> + </modules> +</project> diff --git a/catalog-parent/catalogparent-lite/pom.xml b/catalog-parent/catalogparent-lite/pom.xml new file mode 100644 index 00000000..01c023d4 --- /dev/null +++ b/catalog-parent/catalogparent-lite/pom.xml @@ -0,0 +1,115 @@ +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <!--parent> + <groupId>org.openo.oparent</groupId> + <artifactId>oparent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent--> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalogparent-lite</artifactId> + <version>1.0.0-SNAPSHOT</version> + <name>openo/commontosca/catalog/catalogparent-lite</name> + <packaging>pom</packaging> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <verbose>true</verbose> + <fork>true</fork> + <compilerVersion>1.7</compilerVersion> + <source>1.7</source> + <target>1.7</target> + <encoding>UTF-8</encoding> + <debug>true</debug> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.6</version> + <configuration> + <archive> + <addMavenDescriptor>false</addMavenDescriptor> + </archive> + <forceCreation>true</forceCreation> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>2.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.10</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.7</version> + <configuration> + <encoding>UTF-8</encoding> + <nonFilteredFileExtensions> + <nonFilteredFileExtension>pdf</nonFilteredFileExtension> + <nonFilteredFileExtension>swf</nonFilteredFileExtension> + <nonFilteredFileExtension>exe</nonFilteredFileExtension> + <nonFilteredFileExtension>png</nonFilteredFileExtension> + <nonFilteredFileExtension>gif</nonFilteredFileExtension> + <nonFilteredFileExtension>jpg</nonFilteredFileExtension> + <nonFilteredFileExtension>jpeg</nonFilteredFileExtension> + <nonFilteredFileExtension>bmp</nonFilteredFileExtension> + <nonFilteredFileExtension>eot</nonFilteredFileExtension> + <nonFilteredFileExtension>ttf</nonFilteredFileExtension> + <nonFilteredFileExtension>svg</nonFilteredFileExtension> + <nonFilteredFileExtension>woff</nonFilteredFileExtension> + <nonFilteredFileExtension>woff2</nonFilteredFileExtension> + <nonFilteredFileExtension>mso</nonFilteredFileExtension> + <nonFilteredFileExtension>wmz</nonFilteredFileExtension> + <nonFilteredFileExtension>emz</nonFilteredFileExtension> + <nonFilteredFileExtension>otf</nonFilteredFileExtension> + </nonFilteredFileExtensions> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.10</version> + </plugin> + <plugin> + <groupId>com.mycila</groupId> + <artifactId>license-maven-plugin</artifactId> + <version>3.0.rc1</version> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/catalog-parent/catalogparent/pom.xml b/catalog-parent/catalogparent/pom.xml new file mode 100644 index 00000000..8ae32bcf --- /dev/null +++ b/catalog-parent/catalogparent/pom.xml @@ -0,0 +1,231 @@ +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalogparent-lite</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>../catalogparent-lite</relativePath> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>catalogparent</artifactId> + <name>openo/commontosca/catalog/catalogparent</name> + <packaging>pom</packaging> + + <properties> + <dropwizard.version>0.8.0</dropwizard.version> + <swagger.version>1.5.3</swagger.version> + <lombok.version>1.16.4</lombok.version> + <jersey.version>2.16</jersey.version> + <jaxrs.consumer.version>5.0</jaxrs.consumer.version> + <jackson-version>2.5.1</jackson-version> + <gson.version>2.2.4</gson.version> + <dom4j.version>1.6</dom4j.version> + <cometd.version>3.0.7</cometd.version> + <commons-net.version>3.3</commons-net.version> + <mysql-connector-java.version>5.1.18</mysql-connector-java.version> + <commons-fileupload.version>1.2.1</commons-fileupload.version> + <commons-io.version>1.4</commons-io.version> + <junit.version>4.10</junit.version> + <org.powermock.version>1.4.10</org.powermock.version> + <org.mockito.version>1.9.5</org.mockito.version> + <h2database.version>1.4.182</h2database.version> + <org.apache.ant.version>1.8.2</org.apache.ant.version> + <tomcat.version>7.0.62</tomcat.version> + </properties> + + <dependencyManagement> + <dependencies> + <!-- dropwizard --> + <dependency> + <groupId>io.dropwizard</groupId> + <artifactId>dropwizard-core</artifactId> + <version>${dropwizard.version}</version> + </dependency> + <dependency> + <groupId>io.dropwizard</groupId> + <artifactId>dropwizard-assets</artifactId> + <version>${dropwizard.version}</version> + </dependency> + <dependency> + <groupId>io.dropwizard</groupId> + <artifactId>dropwizard-hibernate</artifactId> + <version>${dropwizard.version}</version> + </dependency> + <dependency> + <groupId>io.dropwizard</groupId> + <artifactId>dropwizard-migrations</artifactId> + <version>${dropwizard.version}</version> + </dependency> + <!-- swagger --> + <dependency> + <groupId>io.swagger</groupId> + <artifactId>swagger-jersey2-jaxrs</artifactId> + <version>${swagger.version}</version> + </dependency> + <!-- lombok --> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>${lombok.version}</version> + </dependency> + <!-- jersey --> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${jersey.version}</version> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-multipart</artifactId> + <version>${jersey.version}</version> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet-core</artifactId> + <version>${jersey.version}</version> + </dependency> + <!-- consumer --> + <dependency> + <groupId>com.eclipsesource.jaxrs</groupId> + <artifactId>consumer</artifactId> + <version>${jaxrs.consumer.version}</version> + </dependency> + <!-- jackson --> + <dependency> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-xml</artifactId> + <version>${jackson-version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>${jackson-version}</version> + </dependency> + <!-- gson --> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>${gson.version}</version> + </dependency> + <!-- dom4j --> + <dependency> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + <version>${dom4j.version}</version> + </dependency> + <!-- cometd --> + <dependency> + <groupId>org.cometd.java</groupId> + <artifactId>bayeux-api</artifactId> + <version>${cometd.version}</version> + </dependency> + <dependency> + <groupId>org.cometd.java</groupId> + <artifactId>cometd-java-annotations</artifactId> + <version>${cometd.version}</version> + </dependency> + <dependency> + <groupId>org.cometd.java</groupId> + <artifactId>cometd-java-client</artifactId> + <version>${cometd.version}</version> + </dependency> + <dependency> + <groupId>org.cometd.java</groupId> + <artifactId>cometd-java-common</artifactId> + <version>${cometd.version}</version> + </dependency> + <dependency> + <groupId>org.cometd.java</groupId> + <artifactId>cometd-java-oort</artifactId> + <version>${cometd.version}</version> + </dependency> + <dependency> + <groupId>org.cometd.java</groupId> + <artifactId>cometd-java-server</artifactId> + <version>${cometd.version}</version> + </dependency> + <!-- ftp --> + <dependency> + <groupId>commons-net</groupId> + <artifactId>commons-net</artifactId> + <version>${commons-net.version}</version> + </dependency> + <!-- mysql --> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>${mysql-connector-java.version}</version> + </dependency> + <!-- http server --> + <dependency> + <groupId>commons-fileupload</groupId> + <artifactId>commons-fileupload</artifactId> + <version>${commons-fileupload.version}</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commons-io.version}</version> + </dependency> + <!-- UT --> + <dependency> + <groupId>io.dropwizard</groupId> + <artifactId>dropwizard-testing</artifactId> + <version>${dropwizard.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit.version}</version> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <version>${org.powermock.version}</version> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito</artifactId> + <version>${org.powermock.version}</version> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-all</artifactId> + <version>${org.mockito.version}</version> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <version>${h2database.version}</version> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant</artifactId> + <version>${org.apache.ant.version}</version> + </dependency> + <!-- UT end --> + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat</artifactId> + <version>${tomcat.version}</version> + </dependency> + </dependencies> + </dependencyManagement> +</project> diff --git a/catalog-parent/pom.xml b/catalog-parent/pom.xml new file mode 100644 index 00000000..36a7adb5 --- /dev/null +++ b/catalog-parent/pom.xml @@ -0,0 +1,36 @@ +<!-- + + Copyright 2016 [ZTE] and others. + + 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalogparent-lite</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>catalogparent-lite</relativePath> + </parent> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.openo.commontosca.catalog</groupId> + <artifactId>catalogparent-aggregator</artifactId> + <name>openo/commontosca/catalog/catalogparent-aggregator</name> + <packaging>pom</packaging> + + <modules> + <module>catalogparent</module> + <module>catalogparent-lite</module> + </modules> +</project> diff --git a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql b/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql deleted file mode 100644 index e3d0522e..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-extend-mysql.sql +++ /dev/null @@ -1,17 +0,0 @@ --- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) --- --- 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. --- - ---
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql b/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql deleted file mode 100644 index 41fd7a18..00000000 --- a/catalog-standalone/src/main/assembly/conf/catalog-resource-insert-mysql.sql +++ /dev/null @@ -1,20 +0,0 @@ --- --- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) --- --- 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. --- - -SET autocommit = 0; - -COMMIT; -SET autocommit = 1;
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/find_kill_process.bat b/catalog-standalone/src/main/assembly/find_kill_process.bat deleted file mode 100644 index 728eec53..00000000 --- a/catalog-standalone/src/main/assembly/find_kill_process.bat +++ /dev/null @@ -1,24 +0,0 @@ -@REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-echo %1 | findstr %2 >NUL
-echo ERRORLEVEL=%ERRORLEVEL%
-IF ERRORLEVEL 1 goto findend
-for /f "tokens=1" %%a in (%1) do (
- echo kill %1
- taskkill /F /pid %%a
-)
-:findend
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/initDB.bat b/catalog-standalone/src/main/assembly/initDB.bat deleted file mode 100644 index bafc036f..00000000 --- a/catalog-standalone/src/main/assembly/initDB.bat +++ /dev/null @@ -1,42 +0,0 @@ -@REM -@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM - -@echo off -title init catalog db - -set RUNHOME=%~dp0 -echo ### RUNHOME: %RUNHOME% - -echo ### init catalog db -rem cd /d %RUNHOME% - -set JAVA="%JAVA_HOME%\bin\java.exe" -set port=8777 -set jvm_opts=-Xms50m -Xmx128m -rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n -set class_path=%RUNHOME%;%RUNHOME%catalog-service.jar -echo ### jvm_opts: %jvm_opts% -echo ### class_path: %class_path% - -%JAVA% -classpath %class_path% %jvm_opts% org.openo.orchestrator.nfv.catalog.CatalogApp db migrate %RUNHOME%conf\catalog.yml - -IF ERRORLEVEL 1 goto showerror -exit -:showerror -echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check! -echo After checking, press any key to close -pause -exit
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/initDB.sh b/catalog-standalone/src/main/assembly/initDB.sh deleted file mode 100644 index 109d119f..00000000 --- a/catalog-standalone/src/main/assembly/initDB.sh +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# 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. -# - -DIRNAME=`dirname $0` -RUNHOME=`cd $DIRNAME/; pwd` -echo @RUNHOME@ $RUNHOME - -title catalog Database setup - -echo ### Starting catalog Database setup -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA - -class_path="$RUNHOME/:$RUNHOME/catalog-service.jar" -echo @class_path@ $class_path - -"$JAVA" -classpath "$class_path" org.openo.orchestrator.nfv.catalog.CatalogApp db migrate "$RUNHOME/conf/catalog.yml" diff --git a/catalog-standalone/src/main/assembly/run.bat b/catalog-standalone/src/main/assembly/run.bat deleted file mode 100644 index 4d389704..00000000 --- a/catalog-standalone/src/main/assembly/run.bat +++ /dev/null @@ -1,40 +0,0 @@ -@REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-
-@echo off
-title catalog-service
-
-set RUNHOME=%~dp0
-echo ### RUNHOME: %RUNHOME%
-echo ### Starting catalog-service
-
-set JAVA="%JAVA_HOME%\bin\java.exe"
-set port=8312
-set jvm_opts=-Xms50m -Xmx128m
-rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n
-set class_path=%RUNHOME%;%RUNHOME%catalog-service.jar
-echo ### jvm_opts: %jvm_opts%
-echo ### class_path: %class_path%
-
-%JAVA% -classpath %class_path% %jvm_opts% org.openo.orchestrator.nfv.catalog.CatalogApp server %RUNHOME%conf/catalog.yml
-
-IF ERRORLEVEL 1 goto showerror
-exit
-:showerror
-echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
-echo After checking, press any key to close
-pause
-exit
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/run.sh b/catalog-standalone/src/main/assembly/run.sh deleted file mode 100644 index c3849fa0..00000000 --- a/catalog-standalone/src/main/assembly/run.sh +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# 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. -# - -DIRNAME=`dirname $0` -RUNHOME=`cd $DIRNAME/; pwd` -echo @RUNHOME@ $RUNHOME - -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA - -JAVA_OPTS="-Xms50m -Xmx128m" -port=8312 -#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n" -echo @JAVA_OPTS@ $JAVA_OPTS - -class_path="$RUNHOME/:$RUNHOME/catalog-service.jar" -echo @class_path@ $class_path - -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.orchestrator.nfv.catalog.CatalogApp server "$RUNHOME/conf/catalog.yml" - diff --git a/catalog-standalone/src/main/assembly/stop.bat b/catalog-standalone/src/main/assembly/stop.bat deleted file mode 100644 index 82f65a52..00000000 --- a/catalog-standalone/src/main/assembly/stop.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM -@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM - -@echo off -title stopping catalog-service - -set HOME=%~dp0 -set Main_Class="org.openo.orchestrator.nfv.catalog.CatalogApp" - -echo ================== catalog-service info ============================================= -echo HOME=$HOME -echo Main_Class=%Main_Class% -echo =============================================================================== - -echo ### Stopping catalog-service -cd /d %HOME% - -for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do ( - call find_kill_process "%%i" %Main_Class% -) -exit
\ No newline at end of file diff --git a/catalog-standalone/src/main/assembly/stop.sh b/catalog-standalone/src/main/assembly/stop.sh deleted file mode 100644 index f66e77b7..00000000 --- a/catalog-standalone/src/main/assembly/stop.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# 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. -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -Main_Class="org.openo.orchestrator.nfv.catalog.CatalogApp" - -echo ================== catalog-service info ============================================= -echo HOME=$HOME -echo Main_Class=$Main_Class -echo =============================================================================== -cd $HOME; pwd - -echo @WORK_DIR@ $HOME - -function save_service_pid(){ - service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` - echo @service_pid@ $service_pid -} - -function kill_service_process(){ - ps -p $service_pid - if [ $? == 0 ]; then - kill -9 $service_pid - fi -} - -save_service_pid; -echo @C_CMD@ kill -9 $service_pid -kill_service_process;
\ No newline at end of file diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/CommonErrorResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/CommonErrorResponse.java deleted file mode 100644 index 96e6cdc3..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/CommonErrorResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.common;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * @author 00164331
- *
- */
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class CommonErrorResponse {
-
- private String code;
-
- private String message;
-
- /**
- * @param message2
- * @return
- */
- public static Object failure(String message) {
- return message;
- }
-
- public CommonErrorResponse(String message) {
- super();
- this.message = message;
- }
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/Config.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/Config.java deleted file mode 100644 index a2cd9d3d..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/Config.java +++ /dev/null @@ -1,31 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.common;
-
-import org.openo.orchestrator.nfv.catalog.CatalogAppConfiguration;
-
-
-public class Config {
- private static CatalogAppConfiguration configration;
-
- public static CatalogAppConfiguration getConfigration() {
- return configration;
- }
-
- public static void setConfigration(CatalogAppConfiguration config) {
- configration = config;
- }
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/DateTimeUtil.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/DateTimeUtil.java deleted file mode 100644 index 6838e3d3..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/DateTimeUtil.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.common; - -import java.text.SimpleDateFormat; -import java.util.Date; - -public class DateTimeUtil { - public static String getCurrentTime() { - return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()); - } - - public static String getFormatTime(Date date) { - return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(date); - } - - public static String getFormatTime(Date date, String format) { - return new SimpleDateFormat(format).format(date); - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/EnumUploadStatus.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/EnumUploadStatus.java deleted file mode 100644 index c0944d0f..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/EnumUploadStatus.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.common; - -public enum EnumUploadStatus { - Create_Directory_Success, Create_Directory_Fail, File_Exist, Upload_From_Break_Success, Upload_From_Break_Failed, Upload_New_File_Success, Upload_New_File_Failed -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/HttpServerAddrConfig.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/HttpServerAddrConfig.java deleted file mode 100644 index ed5fcb71..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/HttpServerAddrConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.common;
-
-/**
- * @author 00164331
- *
- */
-public class HttpServerAddrConfig {
-
- protected static String httpServerAddress;
-
- public static String getHttpServerAddress() {
- return httpServerAddress;
- }
-
- public static void setHttpServerAddress(String httpServerAddress) {
- HttpServerAddrConfig.httpServerAddress = httpServerAddress;
- }
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/HttpServerPathConfig.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/HttpServerPathConfig.java deleted file mode 100644 index 2e791cf5..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/HttpServerPathConfig.java +++ /dev/null @@ -1,32 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.common;
-
-/**
- * @author 00164331
- *
- */
-public class HttpServerPathConfig {
- protected static String httpServerPath;
-
- public static String getHttpServerPath() {
- return httpServerPath;
- }
-
- public static void setHttpServerPath(String httpServerPath) {
- HttpServerPathConfig.httpServerPath = httpServerPath;
- }
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/MsbAddrConfig.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/MsbAddrConfig.java deleted file mode 100644 index 33428efa..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/MsbAddrConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.common;
-
-/**
- * @author 00164331
- *
- */
-public class MsbAddrConfig {
-
- protected static String msbAddress;
-
- public static String getMsbAddress() {
- return msbAddress;
- }
-
- public static void setMsbAddress(String msbAddress) {
- MsbAddrConfig.msbAddress = msbAddress;
- }
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/RestUtil.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/RestUtil.java deleted file mode 100644 index f515d73e..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/common/RestUtil.java +++ /dev/null @@ -1,35 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.common;
-
-import javax.ws.rs.core.Response;
-
-/**
- * @author 00164331
- *
- */
-public class RestUtil {
- /**
- * @param e
- * @return
- */
- public static Response getRestException(String errorMsg) {
- String code = "001";
- return Response.status(Response.Status.INTERNAL_SERVER_ERROR)
- .entity(new CommonErrorResponse(code, errorMsg)).build();
- }
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/common/CatalogResuorceType.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/common/CatalogResuorceType.java deleted file mode 100644 index 2a351731..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/common/CatalogResuorceType.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.common; - -/** - ** @author 10159474 - */ -public enum CatalogResuorceType { - SERVICETEMPLATE, PACKAGE, NODETEMPLATE, TEMPLATE, SERVICETEMPLATEMAPPING; - - public static CatalogResuorceType getType(String type) { - return valueOf(type); - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/common/Parameters.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/common/Parameters.java deleted file mode 100644 index e75b46b4..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/common/Parameters.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.common; - -/** - * *@author 10159474 - * - */ -public enum Parameters { - oid, name, provider, version, deletionPending, type, status, csarId, vendor, serviceTemplateId, nodeTemplateId, mappingId, nodeType; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/NodeTemplateDao.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/NodeTemplateDao.java deleted file mode 100644 index 514dff0f..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/NodeTemplateDao.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.dao; - -import org.hibernate.SessionFactory; -import org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData; - - -/** - * host DAO class - * - * *@author 10159474 - * - */ -public class NodeTemplateDao extends BaseDao<NodeTemplateData> { - - public NodeTemplateDao(SessionFactory sessionFactory) { - super(sessionFactory); - } - - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/PackageDao.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/PackageDao.java deleted file mode 100644 index 90c4f5e1..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/PackageDao.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.dao; - -import org.hibernate.SessionFactory; -import org.openo.orchestrator.nfv.catalog.db.entity.PackageData; - - -/** - * host DAO class - * - * *@author 10159474 - * - */ -public class PackageDao extends BaseDao<PackageData> { - - public PackageDao(SessionFactory sessionFactory) { - super(sessionFactory); - } - - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/ServiceTemplateDao.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/ServiceTemplateDao.java deleted file mode 100644 index 794ac9f0..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/ServiceTemplateDao.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.dao; - -import org.hibernate.SessionFactory; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * DAO class - * - * *@author 10159474 - * - */ -public class ServiceTemplateDao extends BaseDao<ServiceTemplateData> { - private static final Logger logger = LoggerFactory.getLogger(ServiceTemplateDao.class); - - public ServiceTemplateDao(SessionFactory sessionFactory) { - super(sessionFactory); - } - - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/ServiceTemplateMappingDao.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/ServiceTemplateMappingDao.java deleted file mode 100644 index d2c28a42..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/dao/ServiceTemplateMappingDao.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.dao; - -import org.hibernate.SessionFactory; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData; -import org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * DAO class - * - * *@author 10159474 - * - */ -public class ServiceTemplateMappingDao extends BaseDao<ServiceTemplateMappingData> { - private static final Logger logger = LoggerFactory.getLogger(ServiceTemplateMappingDao.class); - - public ServiceTemplateMappingDao(SessionFactory sessionFactory) { - super(sessionFactory); - } - - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/BaseData.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/BaseData.java deleted file mode 100644 index 07a64ea4..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/BaseData.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.entity; - -public class BaseData { - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/TemplateData.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/TemplateData.java deleted file mode 100644 index e1f72ab5..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/entity/TemplateData.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.entity; - -import java.util.ArrayList; - -public class TemplateData extends BaseData { - private ServiceTemplateData serviceTemplate; - private ArrayList<NodeTemplateData> nodeTemplates = new ArrayList<NodeTemplateData>(); - - public ServiceTemplateData getServiceTemplate() { - return serviceTemplate; - } - - public void setServiceTemplate(ServiceTemplateData serviceTemplate) { - this.serviceTemplate = serviceTemplate; - } - - public ArrayList<NodeTemplateData> getNodeTemplates() { - return nodeTemplates; - } - - public void setNodeTemplates(ArrayList<NodeTemplateData> nodeTemplates) { - this.nodeTemplates = nodeTemplates; - } - - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/util/CatalogDbUtil.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/util/CatalogDbUtil.java deleted file mode 100644 index a792e925..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/db/util/CatalogDbUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.db.util; - -import java.util.UUID; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.gson.Gson; - -public class CatalogDbUtil { - private final static Logger logger = LoggerFactory.getLogger(CatalogDbUtil.class); - - public static String generateId() { - return UUID.randomUUID().toString(); - } - - public static boolean isNotEmpty(String s) { - return s != null && !"".equals(s) && s.length() > 0; - } - - public static String objectToString(Object obj) { - Gson gson = new Gson(); - if (obj != null) - return gson.toJson(obj); - else - return null; - } - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/CSARQueryCondition.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/CSARQueryCondition.java deleted file mode 100644 index 36972def..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/CSARQueryCondition.java +++ /dev/null @@ -1,38 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class CSARQueryCondition {
-
- private String csarId;
-
- private String name;
-
- private String provider;
-
- private String version;
-
- private Boolean deletionPending;
-
- private EnumType type;
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumOperationalState.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumOperationalState.java deleted file mode 100644 index dafe7f8b..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumOperationalState.java +++ /dev/null @@ -1,20 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity;
-
-public enum EnumOperationalState {
- Enabled, Disabled
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumProcessState.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumProcessState.java deleted file mode 100644 index 9f2ab76b..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumProcessState.java +++ /dev/null @@ -1,24 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity;
-
-/**
- * @author 00164331
- *
- */
-public enum EnumProcessState {
- normal, onBoarding, onBoardFailed, deleting, deleteFailed
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumType.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumType.java deleted file mode 100644 index 23165f51..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumType.java +++ /dev/null @@ -1,20 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity;
-
-public enum EnumType {
- GSAR, SSAR, NSAR, NFAR
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumUsageState.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumUsageState.java deleted file mode 100644 index 966a264c..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/EnumUsageState.java +++ /dev/null @@ -1,20 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity;
-
-public enum EnumUsageState {
- InUse, NotInUse
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/request/PackageBasicInfo.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/request/PackageBasicInfo.java deleted file mode 100644 index ec16434d..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/request/PackageBasicInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity.request;
-
-import org.openo.orchestrator.nfv.catalog.entity.EnumType;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class PackageBasicInfo {
-
- private String provider;
-
- private EnumType type;
-
- private String version;
-
- private String format;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/request/UploadPackageFromFtpRequest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/request/UploadPackageFromFtpRequest.java deleted file mode 100644 index 8bc45994..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/request/UploadPackageFromFtpRequest.java +++ /dev/null @@ -1,41 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity.request;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import org.openo.orchestrator.nfv.catalog.entity.EnumType;
-
-/**
- * @author 00164331
- *
- */
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class UploadPackageFromFtpRequest {
-
- private String provider;
-
- private EnumType type;
-
- private String version;
-
- private String ftpUrl;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/CsarFileUriResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/CsarFileUriResponse.java deleted file mode 100644 index 6ce9b3fe..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/CsarFileUriResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity.response;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-
-/**
- * @author 00164331
- *
- */
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class CsarFileUriResponse {
-
- private String downloadUri;
-
- private String localPath;
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/PackageMeta.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/PackageMeta.java deleted file mode 100644 index d9077684..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/PackageMeta.java +++ /dev/null @@ -1,61 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity.response;
-
-import org.openo.orchestrator.nfv.catalog.entity.EnumOperationalState;
-import org.openo.orchestrator.nfv.catalog.entity.EnumProcessState;
-import org.openo.orchestrator.nfv.catalog.entity.EnumUsageState;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class PackageMeta {
-
- private String csarId;
-
- private String name;
-
- private String downloadUri;
-
- private String size;
-
- private String version;
-
- private String provider;
-
- private String type;
-
- private String format;
-
- private boolean deletionPending;
-
- private String createTime;
-
- private String modifyTime;
-
- private EnumOperationalState operationalState;
-
- private EnumUsageState usageState;
-
- private String onBoardState;
-
- private EnumProcessState processState;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/UpdatePackageResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/UpdatePackageResponse.java deleted file mode 100644 index dba488bd..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/UpdatePackageResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity.response;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class UpdatePackageResponse {
-
- private String usageState;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/UploadPackageResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/UploadPackageResponse.java deleted file mode 100644 index 57add55f..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/entity/response/UploadPackageResponse.java +++ /dev/null @@ -1,30 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.entity.response;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class UploadPackageResponse {
-
- private String csarId;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManager.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManager.java deleted file mode 100644 index d9fdd2c9..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManager.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.filemanage; - -import java.util.ArrayList; - -import org.openo.orchestrator.nfv.catalog.filemanage.entity.FileLink; - -public interface FileManager { - /** - * @param srcPath - * @param dstPath/packageType/provider/packageName/version - * @return - */ - boolean upload(String srcPath, String dstPath); - - boolean download(String srcPath, String dstPath); - - boolean delete(String srcPath); - - ArrayList<FileLink> queryWorkFlow(String path); - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManagerType.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManagerType.java deleted file mode 100644 index ec65c189..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/FileManagerType.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.filemanage; - -public enum FileManagerType { - ftp, http; - public static FileManagerType getType(String type) { - return valueOf(type); - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/entity/FileLink.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/entity/FileLink.java deleted file mode 100644 index 9f70a623..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/filemanage/entity/FileLink.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.filemanage.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class FileLink { - private String fileName; - private String downloadUri; - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/ftp/Ftp.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/ftp/Ftp.java deleted file mode 100644 index f4212408..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/ftp/Ftp.java +++ /dev/null @@ -1,42 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.ftp;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-
-/**
- * @author 00164331
- *
- */
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class Ftp {
-
- private String ipAddr;
-
- private Integer port;
-
- private String userName;
-
- private String pwd;
-
- private String path;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/health/ConsoleHealthCheck.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/health/ConsoleHealthCheck.java deleted file mode 100644 index bc1569c0..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/health/ConsoleHealthCheck.java +++ /dev/null @@ -1,35 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.health;
-
-import com.codahale.metrics.health.HealthCheck;
-
-public class ConsoleHealthCheck extends HealthCheck {
- private final String template;
-
- public ConsoleHealthCheck(String template) {
- this.template = template;
- }
-
- @Override
- protected Result check() throws Exception {
- final String saying = String.format(template, "TEST");
- if (!saying.contains("TEST")) {
- return Result.unhealthy("template doesn't include a name");
- }
- return Result.healthy();
- }
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/EnumToscaRelationShipDefinition.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/EnumToscaRelationShipDefinition.java deleted file mode 100644 index de19ba35..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/common/EnumToscaRelationShipDefinition.java +++ /dev/null @@ -1,46 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.common;
-
-public enum EnumToscaRelationShipDefinition {
- VirtualBindsTo{
- @Override
- public String getName(){
- return "tosca.relationships.nfv.VirtualBindsTo";
- }
- },
- VirtualLinksTo{
- @Override
- public String getName(){
- return "tosca.relationships.nfv.VirtualLinksTo";
- }
- },
- DeployedOn{
- @Override
- public String getName(){
- return "tosca.relationships.nfv.DeployedOn";
- }
- },
- BelongTo{
- @Override
- public String getName(){
- return "tosca.relationships.nfv.BelongTo";
- }
- };
-
- public abstract String getName();
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/EnumDataType.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/EnumDataType.java deleted file mode 100644 index fb8f2b39..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/EnumDataType.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; - -/** - * @author 10090474 - * - */ -@AllArgsConstructor -public enum EnumDataType { - STRING("String"), INTEGER("Integer"), FLOAT("Float"), BOOLEAN("Boolean"); - - private String value; - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/InputParameter.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/InputParameter.java deleted file mode 100644 index 783fa1bb..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/InputParameter.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @author 10090474 - * - */ - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class InputParameter { - private String name; - private EnumDataType type = EnumDataType.STRING; - private String description; - private String defaultValue; - private boolean required; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/KeyValuePair.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/KeyValuePair.java deleted file mode 100644 index 60548d33..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/KeyValuePair.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class KeyValuePair { - private String key; - private String value; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/NfvTemplate.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/NfvTemplate.java deleted file mode 100644 index ab038a90..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/NfvTemplate.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import java.util.List; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class NfvTemplate { - private List<NodeTemplate> vduNodes; - private List<NodeTemplate> networkNodes; - private List<NodeTemplate> vnfcNodes; - private List<NodeTemplate> vnfNodes; - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/NodeTemplate.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/NodeTemplate.java deleted file mode 100644 index 3ffd68f1..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/NodeTemplate.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import java.util.List; -import java.util.Map; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class NodeTemplate { - private String id; - private String name; - private String type; - private Map<String, Object> properties; - private List<RelationShip> relationShips; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/QueryRawDataCondition.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/QueryRawDataCondition.java deleted file mode 100644 index 090c17e0..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/QueryRawDataCondition.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @author 10090474 - * - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class QueryRawDataCondition { - private String csarId; - private KeyValuePair[] inputParameters; - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/RelationShip.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/RelationShip.java deleted file mode 100644 index d8cbe8df..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/RelationShip.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class RelationShip { - private String sourceNodeName; - private String targetNodeName; - private String sourceNodeId; - private String targetNodeId; - private String type; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplate.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplate.java deleted file mode 100644 index 86efe196..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplate.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ServiceTemplate { - private String serviceTemplateId; - private String templateName; - private String vendor; - private String version; - private String csarid; - private String type; - private String downloadUri; - private InputParameter[] inputs; - private ServiceTemplateOperation[] operations; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplateOperation.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplateOperation.java deleted file mode 100644 index ba66b6ed..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplateOperation.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ServiceTemplateOperation { - private String name; - private String description; - private String processId; - private InputParameter[] inputs; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplateRawData.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplateRawData.java deleted file mode 100644 index 37cfab4e..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/entity/ServiceTemplateRawData.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ServiceTemplateRawData { - private String rawData; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerExtPackageRest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerExtPackageRest.java deleted file mode 100644 index 692c13b0..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerExtPackageRest.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; - -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServicePackageList; - -/** - * The opentosca container interface for csar. - * @author 10189609 - * - */ -@Path("/csars") -public interface IContainerExtPackageRest { - @GET - @Produces(MediaType.APPLICATION_OCTET_STREAM) - public ContainerServicePackageList getToscaServicePackage(@QueryParam("csarName") String csarName); - - @POST - @Consumes(MediaType.TEXT_PLAIN) - public String uploadPackageByToscaService(@QueryParam("fileLocation") String fileLocation); - - @Path("/{csarId}") - @DELETE - public String deletePackageById(@PathParam("csarId") String csarId); -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerPortabilityRest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerPortabilityRest.java deleted file mode 100644 index 5086684f..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerPortabilityRest.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -/** - * The opentosca container interface for policy. - * @author 10189609 - * - */ -@Path("/servicetemplates") -public interface IContainerPortabilityRest { - - @Path("/{templateid}/policys") - @GET - String getToscaPolicys(@PathParam("templateid") String serviceTemplateID); -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerTemplateRest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerTemplateRest.java deleted file mode 100644 index f2957101..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/container/IContainerTemplateRest.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.container; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; - -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServiceNodeTemplateList; -import org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity.ContainerServiceTemplateList; - -/** - * The opentosca container interface for service template. - * @author 10189609 - * - */ -@Path("/servicetemplates") -public interface IContainerTemplateRest { - @GET - @Produces(MediaType.APPLICATION_OCTET_STREAM) - ContainerServiceTemplateList getToscaServiceTemplate(@QueryParam("templateid") String templateId); - - @Path("/{templateid}/nodetemplates") - @GET - @Produces(MediaType.APPLICATION_OCTET_STREAM) - ContainerServiceNodeTemplateList getToscaServiceNodeTemplates(@PathParam("templateid") String templateId); -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceCommonParam.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceCommonParam.java deleted file mode 100644 index 6ae91afc..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceCommonParam.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -@XmlAccessorType(XmlAccessType.FIELD) -public class ContainerServiceCommonParam { - @XmlElement - private String key; - - @XmlElement - private String value; - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplateList.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplateList.java deleted file mode 100644 index fdc8fd43..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceNodeTemplateList.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name="nodetemplates") -public class ContainerServiceNodeTemplateList { - @XmlElement(name="nodetemplate") - private List<ContainerServiceNodeTemplate> nodeTemplate; - - public List<ContainerServiceNodeTemplate> getNodeTemplate() { - return nodeTemplate; - } - - public void setNodeTemplate(List<ContainerServiceNodeTemplate> nodeTemplate) { - this.nodeTemplate = nodeTemplate; - } - - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceOperationParameter.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceOperationParameter.java deleted file mode 100644 index 380d3fab..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServiceOperationParameter.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; - -/** - * @author 10189609 - * - */ -public class ContainerServiceOperationParameter { - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServicePackageList.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServicePackageList.java deleted file mode 100644 index fd53d3dc..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/containerEntity/ContainerServicePackageList.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.containerEntity; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name="packages") -public class ContainerServicePackageList { - public static final String NAMESPACE_OF_SELFSERVICE="http://www.eclipse.org/winery/model/selfservice"; - - @XmlElement(name="package") - private List<ContainerServicePackage> packageList; - - public List<ContainerServicePackage> getPackageList() { - return packageList; - } - - public void setPackageList(List<ContainerServicePackage> packageList) { - this.packageList = packageList; - } - -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/lifecycleEnity/InstanceEntity.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/lifecycleEnity/InstanceEntity.java deleted file mode 100644 index ad46d7df..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/lifecycleEnity/InstanceEntity.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.lifecycleEnity; - -public class InstanceEntity { - private String serviceTemplateId; - - public String getServiceTemplateId() { - return serviceTemplateId; - } - - public void setServiceTemplateId(String serviceTemplateId) { - this.serviceTemplateId = serviceTemplateId; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/roEntity/ResourceResponseEntity.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/roEntity/ResourceResponseEntity.java deleted file mode 100644 index 834f8262..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/entity/roEntity/ResourceResponseEntity.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.entity.roEntity; - -import java.util.ArrayList; - -public class ResourceResponseEntity -{ - ArrayList <VimEntity> data=new ArrayList<VimEntity>(); - String operationResult; - - public String getOperationResult() - { - return operationResult; - } - - public void setOperationResult(String operationResult) - { - this.operationResult = operationResult; - } - public ArrayList <VimEntity> getData() - { - return data; - } - public void setData(ArrayList <VimEntity> data) - { - this.data = data; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/lifecycle/ILifeCycleServiceRest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/lifecycle/ILifeCycleServiceRest.java deleted file mode 100644 index 0a3eb830..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/lifecycle/ILifeCycleServiceRest.java +++ /dev/null @@ -1,33 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.lifecycle;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-/**
- * The lifecycle interface.
- * @author 10189609
- *
- */
-@Path("/appinstances")
-public interface ILifeCycleServiceRest {
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public String getVNFInstances();
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/ro/IResourceServiceRest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/ro/IResourceServiceRest.java deleted file mode 100644 index 44ec792f..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/externalservice/ro/IResourceServiceRest.java +++ /dev/null @@ -1,35 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.externalservice.ro;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-/**
- * The roc resource interface.
- * @author 10189609
- *
- */
-@Path("/resource")
-public interface IResourceServiceRest {
- @Path("/vims/{vim_id}")
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- public String getResourceVim(@PathParam("vim_id") String vimId) throws Exception;
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/AbstractModelParser.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/AbstractModelParser.java deleted file mode 100644 index f1788c8b..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/AbstractModelParser.java +++ /dev/null @@ -1,30 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.parser;
-
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-
-public abstract class AbstractModelParser {
- /**
- * @param packageId
- * @param fileLocation
- * @return service template id
- * @throws CatalogResourceException
- */
- public abstract String parse(String packageId, String fileLocation)
- throws CatalogResourceException;
-
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/EnumPackageFormat.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/EnumPackageFormat.java deleted file mode 100644 index 3010c602..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/EnumPackageFormat.java +++ /dev/null @@ -1,25 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.parser;
-
-/**
- * enum data.
- * @author 10189609
- *
- */
-public enum EnumPackageFormat {
- TOSCA_XML, TOSCA_YAML
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/EnumTemplateType.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/EnumTemplateType.java deleted file mode 100644 index 9254faf3..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/EnumTemplateType.java +++ /dev/null @@ -1,20 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.parser;
-
-public enum EnumTemplateType {
- NS, VNF
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/IYamlParseRest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/IYamlParseRest.java deleted file mode 100644 index 20decb49..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/IYamlParseRest.java +++ /dev/null @@ -1,43 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.parser.yaml;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlRequestParemeter;
-
-/**
- *
- * @author 10090474
- *
- */
-@Path("/parse")
-public interface IYamlParseRest {
- /**
- * @param request
- * @return
- * @throws Exception
- */
- @POST
- @Consumes(MediaType.APPLICATION_JSON)
- @Produces(MediaType.APPLICATION_JSON)
- String parse(ParseYamlRequestParemeter request)
- throws Exception;
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/YamlParseServiceConsumer.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/YamlParseServiceConsumer.java deleted file mode 100644 index c1f758ef..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/YamlParseServiceConsumer.java +++ /dev/null @@ -1,55 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.parser.yaml;
-
-import org.glassfish.jersey.client.ClientConfig;
-import org.openo.orchestrator.nfv.catalog.common.MSBUtil;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlRequestParemeter;
-import org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity.ParseYamlResult;
-
-import com.eclipsesource.jaxrs.consumer.ConsumerFactory;
-import com.google.gson.Gson;
-
-/**
- *
- * @author 10090474
- *
- */
-public class YamlParseServiceConsumer {
- /**
- * get service template by template id from container service.
- *
- * @param request
- * @return
- * @throws CatalogResourceException
- */
- public static ParseYamlResult getServiceTemplates(
- final ParseYamlRequestParemeter request)
- throws CatalogResourceException {
- try {
- ClientConfig config = new ClientConfig();
- IYamlParseRest yamlParseProxy = ConsumerFactory
- .createConsumer(MSBUtil.getYamlParseBaseUrl(), config,
- IYamlParseRest.class);
- String jsonStr = yamlParseProxy.parse(request);
- return new Gson().fromJson(jsonStr, ParseYamlResult.class);
- } catch (Exception e) {
- throw new CatalogResourceException("Call parser api failed.", e);
- }
-
- }
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/EnumYamlServiceTemplateInfo.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/EnumYamlServiceTemplateInfo.java deleted file mode 100644 index 50149774..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/parser/yaml/entity/EnumYamlServiceTemplateInfo.java +++ /dev/null @@ -1,41 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.parser.yaml.entity;
-
-
-
-public enum EnumYamlServiceTemplateInfo {
- ID{
- @Override
- public String getName() {
- return "id";
- }
- },
- VERSION{
- @Override
- public String getName() {
- return "version";
- }
- },
- PROVIDER{
- @Override
- public String getName() {
- return "vendor";
- }
- };
-
- public abstract String getName();
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/IWSO2RestService.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/IWSO2RestService.java deleted file mode 100644 index 83902cac..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/IWSO2RestService.java +++ /dev/null @@ -1,63 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.model.plan.wso2;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.DeletePackageResponse;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.DeployPackageResponse;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.StartProcessRequest;
-import org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity.StartProcessResponse;
-
-/**
- *
- * @author 10090474
- *
- */
-@Path("/openoapi/wso2bpel/v1")
-public interface IWSO2RestService {
- /**
- * @param request
- * @return
- * @throws Exception
- */
- @Path("/package")
- @POST
- @Consumes(MediaType.APPLICATION_JSON)
- @Produces(MediaType.APPLICATION_JSON)
- DeployPackageResponse deployPackage(FormDataMultiPart request) throws Exception;
-
- @Path("/package/{packageName}")
- @DELETE
- @Consumes(MediaType.APPLICATION_JSON)
- @Produces(MediaType.APPLICATION_JSON)
- DeletePackageResponse deletePackage(
- @PathParam("packageName") String packageName) throws Exception;
-
- @Path("process/instance")
- @POST
- @Consumes(MediaType.APPLICATION_JSON)
- @Produces(MediaType.APPLICATION_JSON)
- StartProcessResponse startProcess(StartProcessRequest request)
- throws Exception;
-}
diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/DeletePackageResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/DeletePackageResponse.java deleted file mode 100644 index 87ca8ea5..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/DeletePackageResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -/** - * @author 10090474 - * - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@JsonIgnoreProperties(ignoreUnknown = true) -public class DeletePackageResponse { - private static final int STATUS_SUCCESS = 1; - - private int status; - private String message; - private String exception; - - public boolean isSuccess() { - return this.status == STATUS_SUCCESS; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/DeployPackageResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/DeployPackageResponse.java deleted file mode 100644 index d28b896a..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/DeployPackageResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -/** - * @author 10090474 - * - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@JsonIgnoreProperties(ignoreUnknown = true) -public class DeployPackageResponse { - private static final int STATUS_SUCCESS = 1; - - private int status; - private String message; - private String packageName; - private String processId; - private String exception; - - public boolean isSuccess() { - return this.status == STATUS_SUCCESS; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/StartProcessRequest.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/StartProcessRequest.java deleted file mode 100644 index 7c914862..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/StartProcessRequest.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity; - -import java.util.Map; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -/** - * @author 10090474 - * - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@JsonIgnoreProperties(ignoreUnknown = true) -public class StartProcessRequest { - private String processId; - private Map<String, Object> params; -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/StartProcessResponse.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/StartProcessResponse.java deleted file mode 100644 index df6d057d..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/model/plan/wso2/entity/StartProcessResponse.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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 org.openo.orchestrator.nfv.catalog.model.plan.wso2.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -/** - * @author 10090474 - * - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@JsonIgnoreProperties(ignoreUnknown = true) -public class StartProcessResponse { - private static final int STATUS_SUCCESS = 1; - - private int status; - private String message; - private String response; - private String exception; - - public boolean isSuccess() { - return this.status == STATUS_SUCCESS; - } -} diff --git a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/RestUtils.java b/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/RestUtils.java deleted file mode 100644 index b361cce1..00000000 --- a/catalog/src/main/java/org/openo/orchestrator/nfv/catalog/resources/RestUtils.java +++ /dev/null @@ -1,46 +0,0 @@ -/**
- * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 org.openo.orchestrator.nfv.catalog.resources;
-
-import javax.ws.rs.BadRequestException;
-import javax.ws.rs.InternalServerErrorException;
-import javax.ws.rs.core.Response;
-
-import org.openo.orchestrator.nfv.catalog.common.CommonErrorResponse;
-import org.openo.orchestrator.nfv.catalog.db.exception.CatalogResourceException;
-
-
-public class RestUtils {
- /**
- * @param e
- * @return
- */
- public static InternalServerErrorException newInternalServerErrorException(
- CatalogResourceException e) {
- return new InternalServerErrorException(Response
- .status(Response.Status.INTERNAL_SERVER_ERROR)
- .entity(new CommonErrorResponse(e.getErrcode() + "", e.getMessage())).build(), e);
- }
-
- /**
- * @param e
- * @return
- */
- public static BadRequestException newBadRequestException(CatalogBadRequestException e) {
- return new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
- .entity(new CommonErrorResponse(e.getErrcode() + "", e.getMessage())).build(), e);
- }
-}
diff --git a/catalog/src/main/resources/api-doc/lib/jquery.slideto.min.js b/catalog/src/main/resources/api-doc/lib/jquery.slideto.min.js deleted file mode 100644 index 188f4f06..00000000 --- a/catalog/src/main/resources/api-doc/lib/jquery.slideto.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - * - * 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. - */ -(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); diff --git a/catalog/src/main/resources/api-doc/o2c.html b/catalog/src/main/resources/api-doc/o2c.html deleted file mode 100644 index 4f23dfb4..00000000 --- a/catalog/src/main/resources/api-doc/o2c.html +++ /dev/null @@ -1,37 +0,0 @@ -<!-- - - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - - 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. - ---> -<script> -var qp = null; -if(window.location.hash) { - qp = location.hash.substring(1); -} -else { - qp = location.search.substring(1); -} -qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}', - function(key, value) { - return key===""?value:decodeURIComponent(value) } - ):{} - -if (window.opener.swaggerUi.tokenUrl) - window.opener.processOAuthCode(qp); -else - window.opener.onOAuthComplete(qp); - -window.close(); -</script>
\ No newline at end of file diff --git a/catalog/src/test/resources/Hibernate.cfg.xml b/catalog/src/test/resources/Hibernate.cfg.xml deleted file mode 100644 index 170d6b87..00000000 --- a/catalog/src/test/resources/Hibernate.cfg.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) - - 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. - ---> -<!DOCTYPE hibernate-configuration PUBLIC -"-//Hibernate/Hibernate Configuration DTD 3.0//EN" -"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> -<hibernate-configuration> -<session-factory> - <property name="show_sql">true</property> - <property name="dialect">org.hibernate.dialect.H2Dialect</property> - <property name="hibernate.connection.driver_class">org.h2.Driver</property> - <property name="hibernate.connection.url">jdbc:h2:tcp://localhost:8205/./db/catalog</property> - <property name="hibernate.connection.username">catalog</property> - <property name="hibernate.connection.password">catalog</property> - <property name="hbm2ddl">update</property> - <property name="current_session_context_class">thread</property> - <mapping class="org.openo.orchestrator.nfv.catalog.db.entity.NodeTemplateData"/> - <mapping class="org.openo.orchestrator.nfv.catalog.db.entity.PackageData"/> - <mapping class="org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateData"/> - <mapping class="org.openo.orchestrator.nfv.catalog.db.entity.ServiceTemplateMappingData"/> -</session-factory> -</hibernate-configuration>
\ No newline at end of file @@ -1,38 +1,44 @@ <!--
- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+ Copyright 2016 [ZTE] and others.
- 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
+ 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
+ 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.
+ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
- <groupId>org.openo.orchestrator</groupId>
- <artifactId>openoparentpom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <groupId>org.openo.commontosca.catalog</groupId>
+ <artifactId>catalogparent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>catalog-parent/catalogparent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openo.orchestrator.nfv.catalog</groupId>
- <artifactId>catalog-parent</artifactId>
- <name>openo/catalog</name>
+ <artifactId>catalog-root</artifactId>
+ <name>openo/commontosca/catalog/catalog-root</name>
<packaging>pom</packaging>
- <build/>
-
+
<modules>
- <module>catalog</module>
- <module>catalog-standalone</module>
- <module>httpserver-standalone</module>
- <module>catalog-all</module>
+ <module>catalog-parent</module>
+ <module>catalog-core</module>
</modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.mycila</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
|