Initial import.
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/service-endpoint-editor@81571 82a268e6-3cf1-43bd-a215-b396298e98cf
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" output="target/service-endpoint-editor-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry including="**/*.java" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources"/>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||||
|
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER/GWT (5)"/>
|
||||||
|
<classpathentry kind="output" path="target/service-endpoint-editor-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>service-endpoint-editor</name>
|
||||||
|
<comment>service-endpoint-editor project</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.maven.ide.eclipse.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
|
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src/main/webapp" />
|
||||||
|
<classpathentry kind="con"
|
||||||
|
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER" />
|
||||||
|
<classpathentry kind="con"
|
||||||
|
path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="hide" value="true" />
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="con"
|
||||||
|
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary" />
|
||||||
|
<classpathentry kind="output" path="" />
|
||||||
|
</classpath>
|
|
@ -0,0 +1,3 @@
|
||||||
|
#Thu Jun 16 10:18:26 CEST 2011
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
filesCopiedToWebInfLib=
|
|
@ -0,0 +1,5 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
jarsExcludedFromWebInfLib=
|
||||||
|
lastWarOutDir=/Users/massi/Documents/workspace/service-endpoint-editor/target/service-endpoint-editor-1.0.0-SNAPSHOT
|
||||||
|
warSrcDir=src/main/webapp
|
||||||
|
warSrcDirIsOutput=false
|
|
@ -0,0 +1,4 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
entryPointModules=org.gcube.portlets.admin.sepeditor.RuntimeResourceCreator
|
||||||
|
filesCopiedToWebInfLib=gwt-servlet.jar
|
||||||
|
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgc3JjL21haW4vd2ViYXBwXV0+PC9leHRyYS1hcmdzPjx2bS1hcmdzPjwhW0NEQVRBWy1YbXg1MTJtXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLmNvbXBhbnkuU29tZU1vZHVsZTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
|
|
@ -0,0 +1,6 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/main/java=UTF-8
|
||||||
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
|
encoding//src/test/resources=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
|
@ -0,0 +1,8 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,4 @@
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
|
<wb-module deploy-name="${module}">
|
||||||
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<dependent-module archiveName="rmp-common-library-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/rmp-common-library/rmp-common-library">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
|
<property name="context-root" value="service-endpoint-editor"/>
|
||||||
|
</wb-module>
|
||||||
|
</project-modules>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faceted-project>
|
||||||
|
<fixed facet="wst.jsdt.web"/>
|
||||||
|
<installed facet="jst.web" version="2.5"/>
|
||||||
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
|
<installed facet="java" version="1.6"/>
|
||||||
|
</faceted-project>
|
|
@ -0,0 +1 @@
|
||||||
|
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1,2 @@
|
||||||
|
disabled=06target
|
||||||
|
eclipse.preferences.version=1
|
|
@ -0,0 +1,9 @@
|
||||||
|
#Thu Sep 02 10:42:12 CEST 2010
|
||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
fullBuildGoals=process-test-resources
|
||||||
|
includeModules=false
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
resourceFilterGoals=process-resources resources\\:testResources
|
||||||
|
skipCompilerPlugin=true
|
||||||
|
version=1
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
|
||||||
|
<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
|
||||||
|
<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="false"/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/service-endpoint-editor/src/test/java/org/gcube/portlets/admin/sepeditor/client/GwtTestRuntimeResourceCreator.java"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="1"/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.gcube.portlets.admin.sepeditor.client.GwtTestRuntimeResourceCreator"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="service-endpoint-editor"/>
|
||||||
|
</launchConfiguration>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="com.google.gwt.eclipse.core.launch.gwtJUnit">
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.LOG_LEVEL" value="INFO"/>
|
||||||
|
<booleanAttribute key="com.google.gwt.eclipse.core.NOT_HEADLESS" value="false"/>
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.OUT_DIR" value="www-test"/>
|
||||||
|
<booleanAttribute key="com.google.gwt.eclipse.core.STANDARDS_MODE" value="false"/>
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.STYLE" value="OBFUSCATED"/>
|
||||||
|
<stringAttribute key="com.google.gwt.eclipse.core.WEB_MODE" value="true"/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/service-endpoint-editor/src/test/java/org/gcube/portlets/admin/sepeditor/client/GwtTestRuntimeResourceCreator.java"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="1"/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.gcube.portlets.admin.sepeditor.client.GwtTestRuntimeResourceCreator"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="service-endpoint-editor"/>
|
||||||
|
</launchConfiguration>
|
|
@ -0,0 +1 @@
|
||||||
|
Use the respective war file of this component
|
|
@ -0,0 +1,7 @@
|
||||||
|
gCube System - License
|
||||||
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
The software and documentation is provided by its authors/distributors "as is" and no expressed or
|
||||||
|
implied warranty is given for its use, quality or fitness for a particular case.
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Mantainers
|
||||||
|
-------
|
||||||
|
|
||||||
|
* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa,
|
||||||
|
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
|
|
@ -0,0 +1,51 @@
|
||||||
|
The gCube System - Portlets - Resource Management Portlet
|
||||||
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
This work has been partially supported by the following European projects:
|
||||||
|
DILIGENT (FP6-2003-IST-2), D4Science (FP7-INFRA-2007-1.2.2), D4Science-II (FP7-INFRA-2008-1.2.2),
|
||||||
|
iMarine (FP7-INFRASTRUCTURES-2011-2), and EUBrazilOpenBio (FP7-ICT-2011-EU-Brazil).
|
||||||
|
|
||||||
|
|
||||||
|
Authors
|
||||||
|
-------
|
||||||
|
* Massimiliano Assante (massimiliano.assante@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
|
||||||
|
* Daniele Strollo
|
||||||
|
|
||||||
|
|
||||||
|
Version and Release Date
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
v. 2.1.0, September 21st 2012
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
EXT-GWT based portlet application to manage resources and their related operations
|
||||||
|
|
||||||
|
Download information
|
||||||
|
--------------------
|
||||||
|
Source code is available from SVN:
|
||||||
|
https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/ResourceManagementPortlet
|
||||||
|
|
||||||
|
Binaries can be downloaded from:
|
||||||
|
http://software.d4science.research-infrastructures.eu/
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
Documentation is available on-line from the Projects Documentation Wiki:
|
||||||
|
|
||||||
|
https://gcube.wiki.gcube-system.org/gcube/index.php/Developer%27s_Guide
|
||||||
|
|
||||||
|
|
||||||
|
Licensing
|
||||||
|
---------
|
||||||
|
|
||||||
|
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
|
||||||
|
|
||||||
|
On OSX
|
||||||
|
---------
|
||||||
|
If having troubles with xerces:
|
||||||
|
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
|
||||||
|
|
||||||
|
With jdk1.5 use sax.jar provided in the lib dir in behalf of $GLOBUS_LOCATION/lib/xercesImpl.jar
|
||||||
|
and xml-apis.jar.
|
|
@ -0,0 +1,11 @@
|
||||||
|
<ReleaseNotes>
|
||||||
|
<Changeset component="org.gcube.portlets-admin.runtime-resource-creator.1-3-0" date="2013-05-29">
|
||||||
|
<Change>Fix for Encrypted fields Lost #1748</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset component="org.gcube.portlets-admin.runtime-resource-creator.1-2-0" date="2013-04-19">
|
||||||
|
<Change>Removed password re entering feature, see #990</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset component="org.gcube.portlets-admin.runtime-resource-creator.1-1-0" date="2012-05-04">
|
||||||
|
<Change>Edit feature added</Change>
|
||||||
|
</Changeset>
|
||||||
|
</ReleaseNotes>
|
|
@ -0,0 +1,48 @@
|
||||||
|
<assembly
|
||||||
|
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||||
|
<id>servicearchive</id>
|
||||||
|
<formats>
|
||||||
|
<format>tar.gz</format>
|
||||||
|
</formats>
|
||||||
|
<baseDirectory>/</baseDirectory>
|
||||||
|
<fileSets>
|
||||||
|
<fileSet>
|
||||||
|
<directory>${distroDirectory}</directory>
|
||||||
|
<outputDirectory>/</outputDirectory>
|
||||||
|
<useDefaultExcludes>true</useDefaultExcludes>
|
||||||
|
<includes>
|
||||||
|
<include>README</include>
|
||||||
|
<include>LICENSE</include>
|
||||||
|
<include>INSTALL</include>
|
||||||
|
<include>MAINTAINERS</include>
|
||||||
|
<include>changelog.xml</include>
|
||||||
|
</includes>
|
||||||
|
<fileMode>755</fileMode>
|
||||||
|
<filtered>true</filtered>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>target/apidocs</directory>
|
||||||
|
<outputDirectory>/${artifactId}/doc/api</outputDirectory>
|
||||||
|
<useDefaultExcludes>true</useDefaultExcludes>
|
||||||
|
<fileMode>755</fileMode>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
<files>
|
||||||
|
<file>
|
||||||
|
<source>${distroDirectory}/profile.xml</source>
|
||||||
|
<outputDirectory>./</outputDirectory>
|
||||||
|
<filtered>true</filtered>
|
||||||
|
</file>
|
||||||
|
<file>
|
||||||
|
<source>target/${build.finalName}.war</source>
|
||||||
|
<outputDirectory>/${artifactId}</outputDirectory>
|
||||||
|
</file>
|
||||||
|
<file>
|
||||||
|
<source>${distroDirectory}/svnpath.txt</source>
|
||||||
|
<outputDirectory>/${artifactId}</outputDirectory>
|
||||||
|
<filtered>true</filtered>
|
||||||
|
</file>
|
||||||
|
</files>
|
||||||
|
</assembly>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<ID></ID>
|
||||||
|
<Type>Service</Type>
|
||||||
|
<Profile>
|
||||||
|
<Description>${description}</Description>
|
||||||
|
<Class>PortletAdmin</Class>
|
||||||
|
<Name>${artifactId}</Name>
|
||||||
|
<Version>${version}</Version>
|
||||||
|
<Packages>
|
||||||
|
<Software>
|
||||||
|
<Name>${artifactId}</Name>
|
||||||
|
<Version>${version}</Version>
|
||||||
|
<MavenCoordinates>
|
||||||
|
<groupId>${groupId}</groupId>
|
||||||
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
<version>${version}</version>
|
||||||
|
</MavenCoordinates>
|
||||||
|
<Files>
|
||||||
|
<File>target/${build.finalName}.war</File>
|
||||||
|
</Files>
|
||||||
|
</Software>
|
||||||
|
</Packages>
|
||||||
|
</Profile>
|
||||||
|
</Resource>
|
|
@ -0,0 +1 @@
|
||||||
|
${scm.url}
|
|
@ -0,0 +1,240 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<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/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>maven-parent</artifactId>
|
||||||
|
<groupId>org.gcube.tools</groupId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<relativePath />
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
|
<artifactId>service-endpoint-editor</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<name>gCube Service End Point Editor Management Portlet</name>
|
||||||
|
<description>
|
||||||
|
gCube Service End Point Editor Management Portlet
|
||||||
|
</description>
|
||||||
|
<scm>
|
||||||
|
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/${project.artifactId}</connection>
|
||||||
|
<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/${project.artifactId}</developerConnection>
|
||||||
|
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/${project.artifactId}</url>
|
||||||
|
</scm>
|
||||||
|
<properties>
|
||||||
|
<!-- Convenience property to set the GWT version -->
|
||||||
|
<gwtVersion>2.5.1</gwtVersion>
|
||||||
|
<distroDirectory>distro</distroDirectory>
|
||||||
|
<!-- GWT needs at least java 1.6 -->
|
||||||
|
<maven.compiler.source>1.6</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||||||
|
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||||
|
<!-- To make this work on gwt-run you need to set up global env vars. on
|
||||||
|
MacOSX edit this file /etc/launchd.conf and put "setenv GLOBUS_LOCATION /Users/massi/portal/Portal-Bundle/gCore"
|
||||||
|
on Linux? -->
|
||||||
|
<GLOBUS_LOCATION>${env.GLOBUS_LOCATION}</GLOBUS_LOCATION>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- This dependency is needed and is need on TOP to use GWT UI BInder
|
||||||
|
without old Xerces and Xalan version of gCore complaining -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.gwt</groupId>
|
||||||
|
<artifactId>gwt-user</artifactId>
|
||||||
|
<version>${gwtVersion}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>xalan</groupId>
|
||||||
|
<artifactId>xalan</artifactId>
|
||||||
|
<version>2.7.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.gwt</groupId>
|
||||||
|
<artifactId>gwt-servlet</artifactId>
|
||||||
|
<version>${gwtVersion}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sencha.gxt</groupId>
|
||||||
|
<artifactId>gxt</artifactId>
|
||||||
|
<version>2.2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
|
<artifactId>rmp-common-library</artifactId>
|
||||||
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||||
|
<artifactId>aslcore</artifactId>
|
||||||
|
<version>[3.2.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
|
<artifactId>gcube-widgets</artifactId>
|
||||||
|
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portal</groupId>
|
||||||
|
<artifactId>custom-portal-handler</artifactId>
|
||||||
|
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.core</groupId>
|
||||||
|
<artifactId>gcf</artifactId>
|
||||||
|
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- Liferay, Servlets Etc -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.mail</groupId>
|
||||||
|
<artifactId>javax.mail-api</artifactId>
|
||||||
|
<version>1.4.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.liferay.portal</groupId>
|
||||||
|
<artifactId>portal-service</artifactId>
|
||||||
|
<version>6.0.6</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.portlet</groupId>
|
||||||
|
<artifactId>portlet-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- Logging -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>1.2.16</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>1.6.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>1.6.4</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<!-- Generate compiled stuff in the folder used for developing mode -->
|
||||||
|
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<!-- GWT Maven Plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>gwt-maven-plugin</artifactId>
|
||||||
|
<version>${gwtVersion}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
<!-- <goal>test</goal> -->
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
|
||||||
|
documentation at codehaus.org -->
|
||||||
|
<configuration>
|
||||||
|
<extraJvmArgs>-Xmx512M -DGLOBUS_LOCATION=${GLOBUS_LOCATION}</extraJvmArgs>
|
||||||
|
<runTarget>RuntimeResourceCreator.html</runTarget>
|
||||||
|
<hostedWebapp>${webappDirectory}</hostedWebapp>
|
||||||
|
<!-- <logLevel>DEBUG</logLevel> -->
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Copy static web files before executing gwt:run -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.1.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exploded</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<webappDirectory>${webappDirectory}</webappDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>2.3.2</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.6</source>
|
||||||
|
<target>1.6</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!-- SA Plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>servicearchive</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-profile</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>target</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>${distroDirectory}</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
<includes>
|
||||||
|
<include>profile.xml</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module rename-to='sepeditor'>
|
||||||
|
<!-- Inherit the core Web Toolkit stuff. -->
|
||||||
|
<inherits name='com.google.gwt.user.User' />
|
||||||
|
|
||||||
|
<!-- Inherit the default GWT style sheet. You can change -->
|
||||||
|
<!-- the theme of your GWT application by uncommenting -->
|
||||||
|
<!-- any one of the following lines. -->
|
||||||
|
<inherits name='com.google.gwt.user.theme.clean.Clean' />
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||||
|
|
||||||
|
<!-- Other module inherits -->
|
||||||
|
<inherits name='com.extjs.gxt.ui.GXT' />
|
||||||
|
<inherits name='com.extjs.gxt.themes.Themes' />
|
||||||
|
<!-- inherits gCube Widgets Library -->
|
||||||
|
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
|
|
||||||
|
<!-- Specify the app entry point class. -->
|
||||||
|
<entry-point
|
||||||
|
class='org.gcube.portlets.admin.sepeditor.client.RuntimeResourceCreator' />
|
||||||
|
|
||||||
|
<!-- Specify the paths for translatable code -->
|
||||||
|
<source path='client' />
|
||||||
|
<source path='shared' />
|
||||||
|
|
||||||
|
</module>
|
|
@ -0,0 +1,82 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.client.forms.RuntimeResourceForm;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.ClientScope;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.FilledRuntimeResource;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.InitInfo;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
||||||
|
import com.google.gwt.core.client.EntryPoint;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
import com.google.gwt.user.client.ui.Label;
|
||||||
|
import com.google.gwt.user.client.ui.RootPanel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entry point classes define <code>onModuleLoad()</code>.
|
||||||
|
*/
|
||||||
|
public class RuntimeResourceCreator implements EntryPoint {
|
||||||
|
public static final String CONTAINER_DIV = "RuntimeResourcePortletDIV";
|
||||||
|
public static RuntimeResourceCreatorServiceAsync runtimeService =
|
||||||
|
(RuntimeResourceCreatorServiceAsync)GWT.create(RuntimeResourceCreatorService.class);
|
||||||
|
|
||||||
|
final ContentPanel mainPanel = new ContentPanel();
|
||||||
|
ArrayList<String> scopesCache;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void onModuleLoad() {
|
||||||
|
|
||||||
|
mainPanel.setSize("100%","600");
|
||||||
|
mainPanel.mask("Fetching Scopes, please wait","loading-indicator");
|
||||||
|
String resourceToEdit = com.google.gwt.user.client.Window.Location.getParameter("rid");
|
||||||
|
String curscope = com.google.gwt.user.client.Window.Location.getParameter("curscope");
|
||||||
|
|
||||||
|
runtimeService.getInitialInfo((resourceToEdit != null), resourceToEdit, curscope, new AsyncCallback<InitInfo>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(InitInfo initialInfo) {
|
||||||
|
GWT.log("SUCCESS");
|
||||||
|
mainPanel.unmask();
|
||||||
|
ArrayList<String> scopes = initialInfo.getScopes();
|
||||||
|
if (initialInfo.getRr2edit() != null) {
|
||||||
|
initialize(scopes, initialInfo.getRr2edit());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
initialize(scopes, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable arg0) {
|
||||||
|
GWT.log("FAILED" + arg0.getMessage());
|
||||||
|
mainPanel.unmask();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
RootPanel.get(CONTAINER_DIV).add(mainPanel);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initialize(ArrayList<String> scopes, FilledRuntimeResource toEdit) {
|
||||||
|
GWT.log("initialize" + scopes.toString());
|
||||||
|
if (scopesCache == null)
|
||||||
|
scopesCache = scopes;
|
||||||
|
ArrayList<ClientScope> scopesToPass = new ArrayList<ClientScope>();
|
||||||
|
for (String scope : scopesCache) {
|
||||||
|
scopesToPass.add(new ClientScope(scope));
|
||||||
|
}
|
||||||
|
RuntimeResourceForm form = null;
|
||||||
|
if (toEdit == null) {
|
||||||
|
form = new RuntimeResourceForm(this, scopesToPass);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
form = new RuntimeResourceForm(this, scopesToPass, toEdit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RootPanel.get(CONTAINER_DIV).remove(0);
|
||||||
|
RootPanel.get(CONTAINER_DIV).add(form);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Category;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.FilledRuntimeResource;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.InitInfo;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.RemoteService;
|
||||||
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The client side stub for the RPC service.
|
||||||
|
*/
|
||||||
|
@RemoteServiceRelativePath("serviceendpointEditor")
|
||||||
|
public interface RuntimeResourceCreatorService extends RemoteService {
|
||||||
|
ArrayList<Category> getCategories();
|
||||||
|
|
||||||
|
InitInfo getInitialInfo(boolean isEditMode, String idToEdit, String curscope);
|
||||||
|
|
||||||
|
Boolean createRuntimeResource(String scope, FilledRuntimeResource resource, boolean isUpdate);
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Category;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.FilledRuntimeResource;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.InitInfo;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The async counterpart of <code>RuntimeResourceCreatorService</code>.
|
||||||
|
*/
|
||||||
|
public interface RuntimeResourceCreatorServiceAsync {
|
||||||
|
|
||||||
|
void getCategories(AsyncCallback<ArrayList<Category>> callback);
|
||||||
|
|
||||||
|
void createRuntimeResource(String scope, FilledRuntimeResource resource, boolean isUpdate,
|
||||||
|
AsyncCallback<Boolean> callback);
|
||||||
|
|
||||||
|
void getInitialInfo(boolean isEditMode, String idToEdit,
|
||||||
|
String curscope, AsyncCallback<InitInfo> callback);
|
||||||
|
}
|
|
@ -0,0 +1,210 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client.forms;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Property;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.RRAccessPoint;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.event.BaseEvent;
|
||||||
|
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||||
|
import com.extjs.gxt.ui.client.event.EventType;
|
||||||
|
import com.extjs.gxt.ui.client.event.Events;
|
||||||
|
import com.extjs.gxt.ui.client.event.IconButtonEvent;
|
||||||
|
import com.extjs.gxt.ui.client.event.Listener;
|
||||||
|
import com.extjs.gxt.ui.client.event.SelectionListener;
|
||||||
|
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
||||||
|
import com.extjs.gxt.ui.client.widget.Info;
|
||||||
|
import com.extjs.gxt.ui.client.widget.Label;
|
||||||
|
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||||
|
import com.extjs.gxt.ui.client.widget.button.Button;
|
||||||
|
import com.extjs.gxt.ui.client.widget.button.ToolButton;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Field;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.TextField;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Validator;
|
||||||
|
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.event.dom.client.BlurEvent;
|
||||||
|
import com.google.gwt.user.client.Timer;
|
||||||
|
import com.google.gwt.user.client.Window;
|
||||||
|
|
||||||
|
public class AccesPointPanel extends ContentPanel {
|
||||||
|
private ArrayList<PropertyPanel> properties = new ArrayList<PropertyPanel>();
|
||||||
|
|
||||||
|
private FormPanel form = null;
|
||||||
|
|
||||||
|
private TextField<String> desc = new TextField<String>();
|
||||||
|
private TextField<String> interfaceEntryNameAttr = new TextField<String>();
|
||||||
|
private TextField<String> interfaceEndPoint = new TextField<String>();
|
||||||
|
private TextField<String> username = new TextField<String>();
|
||||||
|
private TextField<String> password1 = new TextField<String>();
|
||||||
|
private TextField<String> password2 = new TextField<String>();
|
||||||
|
|
||||||
|
private Button addPropertyButton;
|
||||||
|
|
||||||
|
private RuntimeResourceForm caller;
|
||||||
|
|
||||||
|
public AccesPointPanel(RuntimeResourceForm caller, RRAccessPoint toEdit) {
|
||||||
|
this(caller, true, toEdit);
|
||||||
|
desc.setValue(toEdit.getDesc());
|
||||||
|
interfaceEntryNameAttr.setValue(toEdit.getInterfaceEntryNameAttr());
|
||||||
|
interfaceEndPoint.setValue(toEdit.getInterfaceEndPoint());
|
||||||
|
username.setValue(toEdit.getUsername());
|
||||||
|
password1.setValue(toEdit.getPassword());
|
||||||
|
password2.setValue(toEdit.getPassword());
|
||||||
|
}
|
||||||
|
|
||||||
|
public AccesPointPanel(RuntimeResourceForm caller, boolean isEditMode, RRAccessPoint toEdit) {
|
||||||
|
this.caller = caller;
|
||||||
|
setHeading("Access Point");
|
||||||
|
form = new FormPanel();
|
||||||
|
form.setFrame(true);
|
||||||
|
form.setAutoWidth(true);
|
||||||
|
|
||||||
|
form.setLabelWidth(150);
|
||||||
|
|
||||||
|
form.setHeaderVisible(false);
|
||||||
|
form.getHeader().setStyleName("x-hide-panel-header");
|
||||||
|
|
||||||
|
desc.setFieldLabel("Description");
|
||||||
|
desc.setAllowBlank(false);
|
||||||
|
|
||||||
|
interfaceEntryNameAttr.setFieldLabel("[Interface] interfaceEntry name ");
|
||||||
|
interfaceEntryNameAttr.setAllowBlank(false);
|
||||||
|
|
||||||
|
interfaceEndPoint.setFieldLabel("[Interface] interfaceEndPoint ");
|
||||||
|
interfaceEndPoint.setAllowBlank(false);
|
||||||
|
|
||||||
|
username.setFieldLabel("Username");
|
||||||
|
username.setAllowBlank(true);
|
||||||
|
|
||||||
|
password1.setFieldLabel("Password");
|
||||||
|
password1.setAllowBlank(true);
|
||||||
|
password1.setPassword(true);
|
||||||
|
//password1.setAutoValidate(true);
|
||||||
|
|
||||||
|
password2.setFieldLabel("Repeat Password");
|
||||||
|
password2.setAllowBlank(true);
|
||||||
|
password2.setPassword(true);
|
||||||
|
|
||||||
|
|
||||||
|
password2.addListener(Events.Blur, new Listener<BaseEvent>() {
|
||||||
|
@Override
|
||||||
|
public void handleEvent(BaseEvent be) {
|
||||||
|
if (password1.getRawValue().compareTo(password2.getRawValue()) != 0) {
|
||||||
|
Info.display("Password Mismatch", "Your entered password and password confirm looks different!");
|
||||||
|
password2.focus();
|
||||||
|
password1.markInvalid("Password Mismatch");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
password1.validate();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Timer t = new Timer() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
password1.setValidator(new Validator() {
|
||||||
|
public String validate (Field ticketField, String value){
|
||||||
|
if (password1.getRawValue().compareTo(password2.getRawValue()) != 0)
|
||||||
|
return "Password Mismatch";
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
t.schedule(500); //need to use a timer to defer the check password wehn editing first time
|
||||||
|
//
|
||||||
|
form.add(desc, new FormData("-20"));
|
||||||
|
form.add(interfaceEntryNameAttr, new FormData("-20"));
|
||||||
|
form.add(interfaceEndPoint, new FormData("-20"));
|
||||||
|
form.add(username, new FormData("-20"));
|
||||||
|
form.add(password1, new FormData("-20"));
|
||||||
|
form.add(password2, new FormData("-20"));
|
||||||
|
|
||||||
|
if (toEdit != null) {
|
||||||
|
for(Property prop: toEdit.getProperties())
|
||||||
|
addProperty2Edit(prop);
|
||||||
|
}
|
||||||
|
|
||||||
|
addPropertyButton = getAddPropertyButton();
|
||||||
|
form.add(addPropertyButton);
|
||||||
|
form.add(new Label()); //spacer
|
||||||
|
setBorders(true);
|
||||||
|
getHeader().addTool(new ToolButton("x-tool-close", new SelectionListener<IconButtonEvent>() {
|
||||||
|
@Override
|
||||||
|
public void componentSelected(IconButtonEvent ce) {
|
||||||
|
remove();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
add(form);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addProperty2Edit(Property prop) {
|
||||||
|
PropertyPanel pp = new PropertyPanel(this, prop);
|
||||||
|
form.add(pp, new FormData("-20"));
|
||||||
|
form.add(new Label()); //spacer
|
||||||
|
properties.add(pp);
|
||||||
|
form.layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Button getAddPropertyButton() {
|
||||||
|
Button addProperty = new Button("Add New Property"){
|
||||||
|
@Override
|
||||||
|
protected void onClick(final ComponentEvent ce) {
|
||||||
|
PropertyPanel pp = getPropertyPanel();
|
||||||
|
form.remove(addPropertyButton);
|
||||||
|
form.add(pp, new FormData("-20"));
|
||||||
|
form.add(new Label());
|
||||||
|
form.add(addPropertyButton);
|
||||||
|
form.layout();
|
||||||
|
properties.add(pp);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return addProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private PropertyPanel getPropertyPanel() {
|
||||||
|
return new PropertyPanel(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void removeProperty(PropertyPanel toRemove) {
|
||||||
|
this.properties.remove(toRemove);
|
||||||
|
form.remove(toRemove);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void remove() {
|
||||||
|
caller.removeAccessPoint(this);
|
||||||
|
}
|
||||||
|
public TextField<String> getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextField<String> getEntryNameAttr() {
|
||||||
|
return interfaceEntryNameAttr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextField<String> getEndPoint() {
|
||||||
|
return interfaceEndPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public TextField<String> getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextField<String> getPassword() {
|
||||||
|
return password1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<PropertyPanel> getProperties() {
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client.forms;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Property;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.event.IconButtonEvent;
|
||||||
|
import com.extjs.gxt.ui.client.event.SelectionListener;
|
||||||
|
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
||||||
|
import com.extjs.gxt.ui.client.widget.button.ToolButton;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.CheckBox;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.TextField;
|
||||||
|
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
||||||
|
|
||||||
|
public class PropertyPanel extends ContentPanel {
|
||||||
|
|
||||||
|
private FormPanel form = null;
|
||||||
|
private TextField<String> key = new TextField<String>();
|
||||||
|
private TextField<String> value = new TextField<String>();
|
||||||
|
private CheckBox crypted = new CheckBox();
|
||||||
|
AccesPointPanel owner;
|
||||||
|
|
||||||
|
public PropertyPanel(AccesPointPanel caller, Property source) {
|
||||||
|
this(caller);
|
||||||
|
key.setValue(source.getKey());
|
||||||
|
crypted.setValue(source.isCrypted());
|
||||||
|
value.setValue(source.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PropertyPanel(AccesPointPanel caller) {
|
||||||
|
owner = caller;
|
||||||
|
setHeading("Property");
|
||||||
|
form = new FormPanel();
|
||||||
|
form.setFrame(true);
|
||||||
|
form.setAutoWidth(true);
|
||||||
|
|
||||||
|
|
||||||
|
form.setHeaderVisible(false);
|
||||||
|
form.getHeader().setStyleName("x-hide-panel-header");
|
||||||
|
|
||||||
|
crypted.setFieldLabel("Encrypt");
|
||||||
|
|
||||||
|
key.setFieldLabel("Key");
|
||||||
|
key.setAllowBlank(false);
|
||||||
|
|
||||||
|
value.setFieldLabel("Value");
|
||||||
|
value.setAllowBlank(false);
|
||||||
|
|
||||||
|
form.add(crypted, new FormData(20, 20));
|
||||||
|
form.add(key, new FormData("-20"));
|
||||||
|
form.add(value, new FormData("-20"));
|
||||||
|
|
||||||
|
getHeader().addTool(new ToolButton("x-tool-close", new SelectionListener<IconButtonEvent>() {
|
||||||
|
@Override
|
||||||
|
public void componentSelected(IconButtonEvent ce) {
|
||||||
|
remove();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
add(form);
|
||||||
|
}
|
||||||
|
private void remove() {
|
||||||
|
owner.removeProperty(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
public TextField<String> getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
public TextField<String> getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
public boolean isCrypted() {
|
||||||
|
return crypted.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,447 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client.forms;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.client.RuntimeResourceCreator;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.client.RuntimeResourceCreatorService;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.client.RuntimeResourceCreatorServiceAsync;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Category;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.ClientScope;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.FilledRuntimeResource;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Property;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.RRAccessPoint;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||||
|
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||||
|
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||||
|
import com.extjs.gxt.ui.client.store.ListStore;
|
||||||
|
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
||||||
|
import com.extjs.gxt.ui.client.widget.Label;
|
||||||
|
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||||
|
import com.extjs.gxt.ui.client.widget.button.Button;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Field;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.FormButtonBinding;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.TextArea;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.TextField;
|
||||||
|
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
||||||
|
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Massimiliano Assante - ISTI-CNR
|
||||||
|
* @version 1.1 Apr 10th 2012
|
||||||
|
*/
|
||||||
|
public class RuntimeResourceForm extends ContentPanel {
|
||||||
|
|
||||||
|
protected RuntimeResourceCreatorServiceAsync runtimeService = (RuntimeResourceCreatorServiceAsync)GWT.create(RuntimeResourceCreatorService.class);
|
||||||
|
RuntimeResourceCreator caller;
|
||||||
|
private ArrayList<AccesPointPanel> accessPoints = new ArrayList<AccesPointPanel>();
|
||||||
|
private FormData formData = null;
|
||||||
|
private FormPanel form = null;
|
||||||
|
private Button addAccessPointButton;
|
||||||
|
private ArrayList<ClientScope> scopes;
|
||||||
|
private FilledRuntimeResource toEdit;
|
||||||
|
private boolean isEditMode = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create mode
|
||||||
|
* @param caller
|
||||||
|
* @param scopes
|
||||||
|
*/
|
||||||
|
public RuntimeResourceForm(RuntimeResourceCreator caller, ArrayList<ClientScope> scopes) {
|
||||||
|
this.caller = caller;
|
||||||
|
this.setHeaderVisible(true);
|
||||||
|
this.setHeading("Runtime Resource Creation");
|
||||||
|
//this.setModal(true);
|
||||||
|
this.setAutoWidth(true);
|
||||||
|
this.setHeight(650);
|
||||||
|
//this.setResizable(true);
|
||||||
|
this.setScrollMode(Scroll.AUTOY);
|
||||||
|
this.getButtonBar().removeAll();
|
||||||
|
this.scopes = scopes;
|
||||||
|
|
||||||
|
formData = new FormData("-20");
|
||||||
|
createForm();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* edit mode
|
||||||
|
* @param caller
|
||||||
|
* @param scopes
|
||||||
|
* @param toEdit
|
||||||
|
*/
|
||||||
|
public RuntimeResourceForm(RuntimeResourceCreator caller, ArrayList<ClientScope> scopes, FilledRuntimeResource toEdit) {
|
||||||
|
this.isEditMode = true;
|
||||||
|
this.toEdit = toEdit;
|
||||||
|
this.caller = caller;
|
||||||
|
this.setHeaderVisible(true);
|
||||||
|
this.setHeading("Runtime Resource Creation [EDIT MODE]");
|
||||||
|
//this.setModal(true);
|
||||||
|
this.setAutoWidth(true);
|
||||||
|
this.setHeight(650);
|
||||||
|
//this.setResizable(true);
|
||||||
|
this.setScrollMode(Scroll.AUTOY);
|
||||||
|
this.getButtonBar().removeAll();
|
||||||
|
this.scopes = scopes;
|
||||||
|
formData = new FormData("-20");
|
||||||
|
createForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void closeDialog() {
|
||||||
|
this.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void createForm() {
|
||||||
|
form = new FormPanel();
|
||||||
|
form.setFrame(true);
|
||||||
|
form.setAutoWidth(true);
|
||||||
|
|
||||||
|
form.setHeaderVisible(false);
|
||||||
|
form.getHeader().setStyleName("x-hide-panel-header");
|
||||||
|
|
||||||
|
|
||||||
|
//listbox scope
|
||||||
|
|
||||||
|
ListStore<ClientScope> storeScope = new ListStore<ClientScope>();
|
||||||
|
storeScope.add(scopes);
|
||||||
|
|
||||||
|
ComboBox<ClientScope> comboScope = new ComboBox<ClientScope>();
|
||||||
|
comboScope.setFieldLabel("Scope");
|
||||||
|
comboScope.setDisplayField("name");
|
||||||
|
comboScope.setTriggerAction(TriggerAction.ALL);
|
||||||
|
comboScope.setStore(storeScope);
|
||||||
|
comboScope.setEditable(false);
|
||||||
|
form.add(comboScope, formData);
|
||||||
|
|
||||||
|
TextField<String> resID = new TextField<String>();
|
||||||
|
resID.setFieldLabel("Resource ID");
|
||||||
|
// resID.setValidator(new StringValidator(120, false));
|
||||||
|
resID.setAllowBlank(false); // is required
|
||||||
|
|
||||||
|
resID.setEmptyText(isEditMode ? toEdit.getResourceId() : "<generated by Resource Manager>");
|
||||||
|
|
||||||
|
resID.setEnabled(false);
|
||||||
|
form.add(resID, formData);
|
||||||
|
|
||||||
|
TextField<String> resName = new TextField<String>();
|
||||||
|
resName.setFieldLabel("Resource Name");
|
||||||
|
// resName.setValidator(new StringValidator(120, false));
|
||||||
|
resName.setAllowBlank(false); // is required
|
||||||
|
|
||||||
|
form.add(resName, formData);
|
||||||
|
|
||||||
|
TextArea description = new TextArea();
|
||||||
|
description.setFieldLabel("Resource Description");
|
||||||
|
|
||||||
|
form.add(description, formData);
|
||||||
|
|
||||||
|
TextField<String> resType = new TextField<String>();
|
||||||
|
resType.setFieldLabel("Type");
|
||||||
|
resType.setAllowBlank(false); // is required
|
||||||
|
// If in editing mode
|
||||||
|
resType.setEmptyText("RuntimeResource");
|
||||||
|
resType.setEnabled(false);
|
||||||
|
form.add(resType, formData);
|
||||||
|
|
||||||
|
//listbox
|
||||||
|
List<Category> categories = getCategories();
|
||||||
|
ListStore<Category> store = new ListStore<Category>();
|
||||||
|
store.add(categories);
|
||||||
|
|
||||||
|
ComboBox<Category> combo = new ComboBox<Category>();
|
||||||
|
combo.setFieldLabel("Category");
|
||||||
|
combo.setDisplayField("name");
|
||||||
|
combo.setTriggerAction(TriggerAction.ALL);
|
||||||
|
combo.setStore(store);
|
||||||
|
form.add(combo, formData);
|
||||||
|
|
||||||
|
//get the platform
|
||||||
|
form.add(getPlatform());
|
||||||
|
|
||||||
|
//get thr runtime
|
||||||
|
form.add(getRuntime());
|
||||||
|
|
||||||
|
String submitText = "Submit New";
|
||||||
|
|
||||||
|
if (isEditMode) {
|
||||||
|
comboScope.setValue(storeScope.getAt(0));
|
||||||
|
resName.setValue(toEdit.getResourceName());
|
||||||
|
description.setValue(toEdit.getDescription());
|
||||||
|
combo.setValue(new Category(toEdit.getCategory()));
|
||||||
|
|
||||||
|
for (RRAccessPoint ap : toEdit.getRRAccessPoints()) {
|
||||||
|
addAccessPoint2Edit(ap);
|
||||||
|
}
|
||||||
|
submitText = "Submit Update";
|
||||||
|
}
|
||||||
|
|
||||||
|
//add access point
|
||||||
|
addAccessPointButton = getAddAccessPointButton();
|
||||||
|
form.add(addAccessPointButton);
|
||||||
|
form.add(new Label()); //spacer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Button submitBtn = new Button(submitText) {
|
||||||
|
@Override
|
||||||
|
protected void onClick(final ComponentEvent ce) {
|
||||||
|
form.mask("sending encrypted info, please wait","loading-indicator");
|
||||||
|
super.onClick(ce);
|
||||||
|
if (!form.isValid()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String[] values = new String[form.getFields().size()];
|
||||||
|
int i = 0;
|
||||||
|
for (Field<?> field : form.getFields()) {
|
||||||
|
values[i] = field.getRawValue();
|
||||||
|
GWT.log(i+ ": " + field.getRawValue()+"\n");
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
FilledRuntimeResource rr = new FilledRuntimeResource();
|
||||||
|
if (isEditMode)
|
||||||
|
rr.setResourceId(toEdit.getResourceId());
|
||||||
|
rr.setResourceName(values[2]);
|
||||||
|
rr.setDescription(values[3]);
|
||||||
|
rr.setCategory(values[5]);
|
||||||
|
|
||||||
|
rr.setPlatformName(values[6]);
|
||||||
|
rr.setPlatformVersion(values[7]);
|
||||||
|
rr.setPlatformMinorVersion(values[8]);
|
||||||
|
rr.setPlatformRevisionVersion(values[9]);
|
||||||
|
rr.setPlatformBuildVersion(values[10]);
|
||||||
|
|
||||||
|
rr.setRuntimeHostedOn(values[11]);
|
||||||
|
rr.setRuntimeStatus(values[12]);
|
||||||
|
rr.setRuntimegHNUniqueID(values[13]);
|
||||||
|
|
||||||
|
ArrayList<RRAccessPoint> rRAccessPoints = new ArrayList<RRAccessPoint>();
|
||||||
|
for (AccesPointPanel ap : accessPoints) {
|
||||||
|
RRAccessPoint rAP = new RRAccessPoint();
|
||||||
|
rAP.setDesc(ap.getDesc().getRawValue());
|
||||||
|
rAP.setInterfaceEndPoint(ap.getEndPoint().getRawValue());
|
||||||
|
rAP.setInterfaceEntryNameAttr(ap.getEntryNameAttr().getRawValue());
|
||||||
|
rAP.setUsername(ap.getUsername().getRawValue());
|
||||||
|
rAP.setPassword(ap.getPassword().getRawValue());
|
||||||
|
|
||||||
|
ArrayList<Property> properties = new ArrayList<Property>();
|
||||||
|
for (PropertyPanel pp : ap.getProperties()) {
|
||||||
|
Property toAdd = new Property();
|
||||||
|
toAdd.setKey(pp.getKey().getRawValue());
|
||||||
|
toAdd.setValue(pp.getValue().getRawValue());
|
||||||
|
toAdd.setCrypted(pp.isCrypted());
|
||||||
|
properties.add(toAdd);
|
||||||
|
}
|
||||||
|
rAP.setProperties(properties);
|
||||||
|
rRAccessPoints.add(rAP);
|
||||||
|
}
|
||||||
|
rr.setRRAccessPoints(rRAccessPoints);
|
||||||
|
RuntimeResourceCreator.runtimeService.createRuntimeResource(values[0], rr, isEditMode, new AsyncCallback<Boolean>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Boolean result) {
|
||||||
|
form.unmask();
|
||||||
|
if (result) {
|
||||||
|
MessageBox.alert("Runtime Resource Creation", "Request for registration successfully sent", null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
MessageBox.alert("Runtime Resource Creation", "Request for registration failed, please check server logs", null);
|
||||||
|
}
|
||||||
|
caller.initialize(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable arg0) {
|
||||||
|
form.unmask();
|
||||||
|
MessageBox.alert("Runtime Resource Creation", "Request for registration Failed", null);
|
||||||
|
caller.initialize(null, null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
form.addButton(submitBtn);
|
||||||
|
form.setButtonAlign(HorizontalAlignment.CENTER);
|
||||||
|
|
||||||
|
FormButtonBinding binding = new FormButtonBinding(form);
|
||||||
|
binding.addButton(submitBtn);
|
||||||
|
|
||||||
|
this.add(form);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Button getAddAccessPointButton() {
|
||||||
|
Button addAccessPoint = new Button("Add Access Point"){
|
||||||
|
@Override
|
||||||
|
protected void onClick(final ComponentEvent ce) {
|
||||||
|
AccesPointPanel toAdd = getNewAccessPoint();
|
||||||
|
addAccessPoint(toAdd);
|
||||||
|
form.remove(addAccessPointButton);
|
||||||
|
form.add(toAdd, formData);
|
||||||
|
form.add(new Label());
|
||||||
|
form.add(addAccessPointButton);
|
||||||
|
form.layout();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return addAccessPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return .
|
||||||
|
*/
|
||||||
|
private AccesPointPanel getNewAccessPoint() {
|
||||||
|
return new AccesPointPanel(this, false, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return .
|
||||||
|
*/
|
||||||
|
private void addAccessPoint2Edit(RRAccessPoint source) {
|
||||||
|
AccesPointPanel toAdd = new AccesPointPanel(this, source);
|
||||||
|
addAccessPoint(toAdd);
|
||||||
|
form.add(toAdd, formData);
|
||||||
|
form.add(new Label());
|
||||||
|
form.layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private ArrayList<Category> getCategories() {
|
||||||
|
final ArrayList<Category> defaultCats = new ArrayList<Category>();
|
||||||
|
defaultCats.add(new Category("Application"));
|
||||||
|
defaultCats.add(new Category("BiodiversityRepository"));
|
||||||
|
defaultCats.add(new Category("Cloud"));
|
||||||
|
defaultCats.add(new Category("Database"));
|
||||||
|
defaultCats.add(new Category("DataStorage"));
|
||||||
|
defaultCats.add(new Category("HostingPlatform"));
|
||||||
|
defaultCats.add(new Category("FTPServer"));
|
||||||
|
defaultCats.add(new Category("Gis"));
|
||||||
|
defaultCats.add(new Category("MavenRepository"));
|
||||||
|
defaultCats.add(new Category("OnlineService"));
|
||||||
|
defaultCats.add(new Category("OpenSearchRepository"));
|
||||||
|
defaultCats.add(new Category("Service"));
|
||||||
|
return defaultCats;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ArrayList<Category> getStatuses() {
|
||||||
|
final ArrayList<Category> defaultCats = new ArrayList<Category>();
|
||||||
|
defaultCats.add(new Category("READY"));
|
||||||
|
defaultCats.add(new Category("UNAVAILABLE"));
|
||||||
|
return defaultCats;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addAccessPoint(AccesPointPanel toAdd) {
|
||||||
|
this.accessPoints.add(toAdd);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void removeAccessPoint(AccesPointPanel toRemove) {
|
||||||
|
this.accessPoints.remove(toRemove);
|
||||||
|
form.remove(toRemove);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return .
|
||||||
|
*/
|
||||||
|
private FieldSet getPlatform() {
|
||||||
|
FieldSet fieldSet = new FieldSet();
|
||||||
|
fieldSet.setHeading("Platform");
|
||||||
|
fieldSet.setCollapsible(true);
|
||||||
|
|
||||||
|
FormLayout layout = new FormLayout();
|
||||||
|
layout.setLabelWidth(100);
|
||||||
|
fieldSet.setLayout(layout);
|
||||||
|
|
||||||
|
TextField<String> platformName = new TextField<String>();
|
||||||
|
platformName.setFieldLabel("Name");
|
||||||
|
platformName.setAllowBlank(false);
|
||||||
|
fieldSet.add(platformName, formData);
|
||||||
|
|
||||||
|
NumberField platformVersion = new NumberField();
|
||||||
|
platformVersion.setFieldLabel("Version");
|
||||||
|
platformVersion.setPropertyEditorType(Integer.class);
|
||||||
|
platformVersion.setAllowNegative(false);
|
||||||
|
fieldSet.add(platformVersion, formData);
|
||||||
|
platformVersion.setAllowBlank(false);
|
||||||
|
|
||||||
|
NumberField platformMinorVersion = new NumberField();
|
||||||
|
platformMinorVersion.setFieldLabel("Minor Version");
|
||||||
|
platformMinorVersion.setPropertyEditorType(Integer.class);
|
||||||
|
platformMinorVersion.setAllowNegative(false);
|
||||||
|
fieldSet.add(platformMinorVersion, formData);
|
||||||
|
platformMinorVersion.setAllowBlank(true);
|
||||||
|
|
||||||
|
NumberField platformRevisionVersion = new NumberField();
|
||||||
|
platformRevisionVersion.setFieldLabel("Revision Version");
|
||||||
|
platformRevisionVersion.setPropertyEditorType(Integer.class);
|
||||||
|
platformRevisionVersion.setAllowNegative(false);
|
||||||
|
fieldSet.add(platformRevisionVersion, formData);
|
||||||
|
platformRevisionVersion.setAllowBlank(true);
|
||||||
|
|
||||||
|
NumberField platformBuildVersion = new NumberField();
|
||||||
|
platformBuildVersion.setFieldLabel("Build Version");
|
||||||
|
platformBuildVersion.setPropertyEditorType(Integer.class);
|
||||||
|
platformBuildVersion.setAllowNegative(false);
|
||||||
|
fieldSet.add(platformBuildVersion, formData);
|
||||||
|
platformBuildVersion.setAllowBlank(true);
|
||||||
|
|
||||||
|
if (isEditMode) {
|
||||||
|
platformName.setValue(toEdit.getPlatformName());
|
||||||
|
platformVersion.setValue((Number) Integer.parseInt(toEdit.getPlatformVersion()));
|
||||||
|
platformMinorVersion.setValue((Number) Integer.parseInt(toEdit.getPlatformMinorVersion()));
|
||||||
|
platformRevisionVersion.setValue((Number) Integer.parseInt(toEdit.getPlatformRevisionVersion()));
|
||||||
|
platformBuildVersion.setValue((Number) Integer.parseInt(toEdit.getPlatformBuildVersion()));
|
||||||
|
}
|
||||||
|
return fieldSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return .
|
||||||
|
*/
|
||||||
|
private FieldSet getRuntime() {
|
||||||
|
FieldSet fieldSet = new FieldSet();
|
||||||
|
fieldSet.setHeading("Runtime");
|
||||||
|
fieldSet.setCollapsible(true);
|
||||||
|
|
||||||
|
FormLayout layout = new FormLayout();
|
||||||
|
layout.setLabelWidth(100);
|
||||||
|
fieldSet.setLayout(layout);
|
||||||
|
|
||||||
|
TextField<String> hostedOn = new TextField<String>();
|
||||||
|
hostedOn.setFieldLabel("Hosted On");
|
||||||
|
hostedOn.setAllowBlank(false);
|
||||||
|
fieldSet.add(hostedOn, formData);
|
||||||
|
|
||||||
|
//listbox
|
||||||
|
List<Category> statuses = getStatuses();
|
||||||
|
ListStore<Category> store = new ListStore<Category>();
|
||||||
|
store.add(statuses);
|
||||||
|
|
||||||
|
ComboBox<Category> combo = new ComboBox<Category>();
|
||||||
|
combo.setFieldLabel("Status");
|
||||||
|
combo.setDisplayField("name");
|
||||||
|
combo.setTriggerAction(TriggerAction.ALL);
|
||||||
|
combo.setStore(store);
|
||||||
|
fieldSet.add(combo, formData);
|
||||||
|
|
||||||
|
TextField<String> gHNUniqueID = new TextField<String>();
|
||||||
|
gHNUniqueID.setFieldLabel("gHN UniqueID");
|
||||||
|
fieldSet.add(gHNUniqueID, formData);
|
||||||
|
gHNUniqueID.setAllowBlank(true);
|
||||||
|
|
||||||
|
if (isEditMode) {
|
||||||
|
hostedOn.setValue(toEdit.getRuntimeHostedOn());
|
||||||
|
combo.setValue(new Category(toEdit.getRuntimeStatus()));
|
||||||
|
gHNUniqueID.setValue(toEdit.getRuntimegHNUniqueID());
|
||||||
|
}
|
||||||
|
|
||||||
|
return fieldSet;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: SelectValidator.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client.forms.validators;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Field;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Validator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class SelectValidator implements Validator {
|
||||||
|
private boolean emptyAllowed = false;
|
||||||
|
|
||||||
|
public SelectValidator(final boolean emptyAllowed) {
|
||||||
|
this.emptyAllowed = emptyAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String validate(final Field<?> field, final String value) {
|
||||||
|
if (!emptyAllowed && (value == null || value.trim().length() == 0)) {
|
||||||
|
return "The field value is invalid. Empty or null value not allowed.";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: XMLValidator.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client.forms.validators;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Field;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Validator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class StringValidator implements Validator {
|
||||||
|
private int maxLenght = 256;
|
||||||
|
private boolean emptyAllowed = false;
|
||||||
|
|
||||||
|
public StringValidator(final int maxLenght, final boolean emptyAllowed) {
|
||||||
|
this.maxLenght = maxLenght;
|
||||||
|
this.emptyAllowed = emptyAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String validate(final Field<?> field, final String value) {
|
||||||
|
if (!emptyAllowed && (value == null || value.trim().length() == 0)) {
|
||||||
|
return "The field value is invalid. Empty or null value not allowed.";
|
||||||
|
}
|
||||||
|
if (value != null && value.length() > this.maxLenght) {
|
||||||
|
return "The value is too long. Limit of " + this.maxLenght + " chars exceeded.";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: XMLValidator.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.client.forms.validators;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Field;
|
||||||
|
import com.extjs.gxt.ui.client.widget.form.Validator;
|
||||||
|
import com.google.gwt.xml.client.XMLParser;
|
||||||
|
import com.google.gwt.xml.client.impl.DOMParseException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class XMLValidator implements Validator {
|
||||||
|
private String rootNode = "body";
|
||||||
|
|
||||||
|
public XMLValidator(final String rootNode) {
|
||||||
|
this.rootNode = rootNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String validate(final Field<?> field, final String value) {
|
||||||
|
try {
|
||||||
|
XMLParser.parse("<" + this.rootNode + ">" + value + "</" + this.rootNode + ">");
|
||||||
|
} catch (DOMParseException e) {
|
||||||
|
return "Not a valid XML document";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,415 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.server;
|
||||||
|
|
||||||
|
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
|
||||||
|
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
|
||||||
|
import org.gcube.application.framework.core.session.ASLSession;
|
||||||
|
import org.gcube.application.framework.core.session.SessionManager;
|
||||||
|
import org.gcube.common.core.contexts.GHNContext;
|
||||||
|
import org.gcube.common.core.informationsystem.ISException;
|
||||||
|
import org.gcube.common.core.informationsystem.client.AtomicCondition;
|
||||||
|
import org.gcube.common.core.informationsystem.client.ISClient;
|
||||||
|
import org.gcube.common.core.informationsystem.client.queries.GCUBERuntimeResourceQuery;
|
||||||
|
import org.gcube.common.core.informationsystem.publisher.ISPublisher;
|
||||||
|
import org.gcube.common.core.resources.GCUBERuntimeResource;
|
||||||
|
import org.gcube.common.core.resources.common.PlatformDescription;
|
||||||
|
import org.gcube.common.core.resources.runtime.AccessPoint;
|
||||||
|
import org.gcube.common.core.scope.GCUBEScope;
|
||||||
|
import org.gcube.common.core.scope.ServiceMap;
|
||||||
|
import org.gcube.common.core.security.GCUBESecurityManagerImpl;
|
||||||
|
import org.gcube.common.resources.gcore.GenericResource;
|
||||||
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
|
import org.gcube.common.scope.impl.ScopeBean;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.client.RuntimeResourceCreatorService;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Category;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.FilledRuntimeResource;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.InitInfo;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.Property;
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.RRAccessPoint;
|
||||||
|
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||||
|
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The server side implementation of the RPC service.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class RuntimeResourceCreatorServiceImpl extends RemoteServiceServlet implements RuntimeResourceCreatorService {
|
||||||
|
private static final Logger _log = Logger.getLogger(RuntimeResourceCreatorServiceImpl.class);
|
||||||
|
|
||||||
|
private boolean withinPortal = false;
|
||||||
|
private static final String SCOPE = "/gcube/devsec";
|
||||||
|
|
||||||
|
private final String EDIT_ID_ATTR = "RMP_EDIT_ID";
|
||||||
|
String idToTest = "b7fce5e0-b0e5-11e2-9d26-c9dc2c525e1c";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the current ASLSession
|
||||||
|
* @return the session
|
||||||
|
*/
|
||||||
|
private ASLSession getASLSession() {
|
||||||
|
String sessionID = this.getThreadLocalRequest().getSession().getId();
|
||||||
|
String user = (String) this.getThreadLocalRequest().getSession().getAttribute("username");
|
||||||
|
if (user == null) {
|
||||||
|
_log.warn("USER IS NULL setting test.user");
|
||||||
|
user = "test.user";
|
||||||
|
sessionID = "123";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
withinPortal = true;
|
||||||
|
_log.info("LIFERAY PORTAL DETECTED user=" + user);
|
||||||
|
}
|
||||||
|
ASLSession toReturn = SessionManager.getInstance().getASLSession(sessionID, user);
|
||||||
|
if (!withinPortal)
|
||||||
|
toReturn.setScope(SCOPE);
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean createRuntimeResource(String scope, FilledRuntimeResource rs, boolean isUpdate) {
|
||||||
|
|
||||||
|
GCUBERuntimeResource rt;
|
||||||
|
boolean result = true;
|
||||||
|
try {
|
||||||
|
if (!isUpdate) {
|
||||||
|
_log.info("Trying creating Runtime Resource: " + rs.getResourceName() + " SCOPE: " + scope);
|
||||||
|
rt =GHNContext.getImplementation(GCUBERuntimeResource.class);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ISClient client = GHNContext.getImplementation(ISClient.class);
|
||||||
|
GCUBERuntimeResourceQuery query = client.getQuery(GCUBERuntimeResourceQuery.class);
|
||||||
|
query.addAtomicConditions(new AtomicCondition("//ID", rs.getResourceId()));
|
||||||
|
_log.info("Trying editing Runtime Resource ID: " + rs.getResourceId());
|
||||||
|
rt = client.execute(query,GCUBEScope.getScope(scope)).get(0); //only one rr per id
|
||||||
|
|
||||||
|
}
|
||||||
|
rt.setCategory(rs.getCategory());
|
||||||
|
rt.setDescription(rs.getDescription());
|
||||||
|
rt.setGHN(rs.getRuntimegHNUniqueID());
|
||||||
|
rt.setHostedOn(rs.getRuntimeHostedOn());
|
||||||
|
rt.setName(rs.getResourceName());
|
||||||
|
rt.setStatus(rs.getRuntimeStatus());
|
||||||
|
PlatformDescription platform = new PlatformDescription();
|
||||||
|
platform.setName(rs.getPlatformName());
|
||||||
|
platform.setVersion((short) Integer.parseInt( (rs.getPlatformVersion().equals("")) ? "0" : rs.getPlatformVersion()) );
|
||||||
|
|
||||||
|
platform.setMinorVersion((short) Integer.parseInt( (rs.getPlatformMinorVersion().equals("")) ? "0" : rs.getPlatformMinorVersion()) );
|
||||||
|
platform.setRevisionVersion((short) Integer.parseInt( (rs.getPlatformRevisionVersion().equals("")) ? "0" : rs.getPlatformRevisionVersion()) );
|
||||||
|
platform.setBuildVersion((short) Integer.parseInt( (rs.getPlatformBuildVersion().equals("")) ? "0" : rs.getPlatformBuildVersion()) );
|
||||||
|
rt.setPlatform(platform);
|
||||||
|
|
||||||
|
ArrayList<RRAccessPoint> myAccessPoints = rs.getRRAccessPoints();
|
||||||
|
|
||||||
|
List<AccessPoint> accessPoints = new ArrayList<AccessPoint>();
|
||||||
|
for (RRAccessPoint p : myAccessPoints) {
|
||||||
|
AccessPoint a = new AccessPoint();
|
||||||
|
a.setEndpoint(p.getInterfaceEndPoint());
|
||||||
|
a.setEntryname(p.getInterfaceEntryNameAttr());
|
||||||
|
a.setDescription(p.getDesc());
|
||||||
|
|
||||||
|
a.setUsername(p.getUsername());
|
||||||
|
a.setPassword(p.getPassword());
|
||||||
|
|
||||||
|
for (Property prop : p.getProperties()) {
|
||||||
|
a.addProperty(prop.getKey(), prop.getValue(), prop.isCrypted());
|
||||||
|
}
|
||||||
|
|
||||||
|
accessPoints.add(a);
|
||||||
|
}
|
||||||
|
rt.setAccessPoints(accessPoints );
|
||||||
|
|
||||||
|
rt.addScope(GCUBEScope.getScope(scope));
|
||||||
|
|
||||||
|
ISPublisher publisher = GHNContext.getImplementation(ISPublisher.class);
|
||||||
|
if (! isUpdate) {
|
||||||
|
String xmlProfile = publisher.registerGCUBEResource(rt, GCUBEScope.getScope(scope), new GCUBESecurityManagerImpl() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSecurityEnabled() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
System.out.println("Created");
|
||||||
|
_log.trace("Created new RR sent, Got from publisher: \n" + xmlProfile);
|
||||||
|
} else {
|
||||||
|
System.out.println("Updating " + rs.getResourceId());
|
||||||
|
for (String scope2Update: rt.getScopes().keySet()) {
|
||||||
|
GCUBEScope gScope = GCUBEScope.getScope(scope2Update);
|
||||||
|
ServiceMap map = loadServiceMap(scope2Update);
|
||||||
|
gScope.setServiceMap(map);
|
||||||
|
publisher.updateGCUBEResource(rt, gScope, new GCUBESecurityManagerImpl() {
|
||||||
|
@Override
|
||||||
|
public boolean isSecurityEnabled() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
System.out.println("Updated " + rs.getResourceId() + " on " + scope2Update);
|
||||||
|
}
|
||||||
|
System.out.println("Updated " + rt.getID());
|
||||||
|
_log.trace("Updated RR sent, id: " + rt.getID());
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Throwable e) {
|
||||||
|
_log.error("ERROR While Creating or Updating RT Resource");
|
||||||
|
e.printStackTrace();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_log.info("Registration Request successfully Sent");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param scope
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private static ServiceMap loadServiceMap(String scope) throws Exception {
|
||||||
|
ServiceMap map = new ServiceMap();
|
||||||
|
if (scope.split("/").length > 3) { //is a VRE SCOPE get its VO Map
|
||||||
|
int lastSlash = scope.lastIndexOf("/");
|
||||||
|
scope = scope.substring(0, lastSlash);
|
||||||
|
}
|
||||||
|
|
||||||
|
int lastSlash = scope.lastIndexOf("/");
|
||||||
|
scope = scope.substring(lastSlash+1, scope.length());
|
||||||
|
|
||||||
|
String fileName = "ServiceMap_" + scope + ".xml";
|
||||||
|
_log.debug("Trying load map " + fileName);
|
||||||
|
String filePath = System.getenv("GLOBUS_LOCATION") + File.separator + "config" + File.separator + fileName;
|
||||||
|
map.load(new FileReader(filePath));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InitInfo getInitialInfo(boolean isEditMode, String idToEdit, String curscope) {
|
||||||
|
getASLSession();
|
||||||
|
ArrayList<String> scopes = getAvailableScopes();
|
||||||
|
if (! isEditMode) {
|
||||||
|
_log.info("Editing Mode OFF");
|
||||||
|
System.out.println("Editing Mode OFF");
|
||||||
|
for (String scopeFound : scopes) {
|
||||||
|
System.out.println(scopeFound);
|
||||||
|
}
|
||||||
|
return new InitInfo(scopes, null);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* else return the bean of the resource to edit
|
||||||
|
*/
|
||||||
|
//get the id from the session
|
||||||
|
String rr2editId = idToEdit;
|
||||||
|
_log.info("Editing Mode ON for id: " + rr2editId);
|
||||||
|
FilledRuntimeResource fRR = getResource2EditById(rr2editId);
|
||||||
|
return new InitInfo(scopes, fRR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private FilledRuntimeResource getResource2EditById(String id) {
|
||||||
|
GCUBEScope scope = null;
|
||||||
|
try {
|
||||||
|
ISClient client = GHNContext.getImplementation(ISClient.class);
|
||||||
|
GCUBERuntimeResourceQuery query = client.getQuery(GCUBERuntimeResourceQuery.class);
|
||||||
|
query.addAtomicConditions(new AtomicCondition("//ID", id));
|
||||||
|
|
||||||
|
scope = GCUBEScope.getScope(getASLSession().getScopeName());
|
||||||
|
|
||||||
|
GCUBERuntimeResource rRes = client.execute(query,scope).get(0); //only one rr per id
|
||||||
|
|
||||||
|
ArrayList<RRAccessPoint> acPoints = new ArrayList<RRAccessPoint>();
|
||||||
|
for (AccessPoint ac : rRes.getAccessPoints()) {
|
||||||
|
RRAccessPoint rac = new RRAccessPoint();
|
||||||
|
|
||||||
|
rac.setInterfaceEndPoint(ac.getEndpoint());
|
||||||
|
rac.setInterfaceEntryNameAttr(ac.getEntryname());
|
||||||
|
rac.setDesc(ac.getDescription());
|
||||||
|
rac.setUsername(ac.getUsername());
|
||||||
|
rac.setPassword(ac.getPassword());
|
||||||
|
|
||||||
|
ArrayList<Property> props = new ArrayList<Property>();
|
||||||
|
for (String prop : ac.getAllPropertyNames()) {
|
||||||
|
String propValue = ac.getProperty(prop);
|
||||||
|
props.add(new Property(prop, propValue, ac.isPropertyEncrypted(prop)));
|
||||||
|
}
|
||||||
|
rac.setProperties(props);
|
||||||
|
acPoints.add(rac);
|
||||||
|
}
|
||||||
|
return new FilledRuntimeResource(id, acPoints, rRes.getName(), rRes.getVersion(), rRes.getCategory(), rRes.getDescription(),
|
||||||
|
rRes.getPlatform().getName(), ""+rRes.getPlatform().getVersion(), ""+rRes.getPlatform().getMinorVersion(), ""+rRes.getPlatform().getRevisionVersion(),
|
||||||
|
""+rRes.getPlatform().getBuildVersion(), rRes.getHostedOn(), rRes.getStatus(), rRes.getGHN());
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOT USED
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ArrayList<Category> getCategories() {
|
||||||
|
Set<Category> mySet = new HashSet<Category>();
|
||||||
|
ArrayList<Category> toReturn = new ArrayList<Category>();
|
||||||
|
GCUBEScope scope = null;
|
||||||
|
scope = GCUBEScope.getScope(getASLSession().getScopeName());
|
||||||
|
ISClient client;
|
||||||
|
try {
|
||||||
|
_log.info("Fetching gCube Runtime resource categories into " + scope.getName());
|
||||||
|
client = GHNContext.getImplementation(ISClient.class);
|
||||||
|
GCUBERuntimeResourceQuery query = client.getQuery(GCUBERuntimeResourceQuery.class);
|
||||||
|
for (GCUBERuntimeResource rRes : client.execute(query,scope)) {
|
||||||
|
toReturn.add(new Category(rRes.getCategory()));
|
||||||
|
}
|
||||||
|
for (Category category : mySet) {
|
||||||
|
toReturn.add(category);
|
||||||
|
}
|
||||||
|
return toReturn;
|
||||||
|
} catch (Exception e) {
|
||||||
|
_log.error("Generic Exception for " + scope.getName() + " " + e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getAvailableScopes() {
|
||||||
|
ArrayList<String> retval = new ArrayList<String>();
|
||||||
|
String currentScope = getASLSession().getScopeName();
|
||||||
|
System.out.println("currentScope: " + currentScope);
|
||||||
|
try {
|
||||||
|
Map<String, ScopeBean> scopes = readScopes(this.getScopeDataPath());
|
||||||
|
for (ScopeBean scope : scopes.values()) {
|
||||||
|
if (scope.toString().startsWith(currentScope))
|
||||||
|
retval.add(scope.toString());
|
||||||
|
}
|
||||||
|
Collections.sort(retval);
|
||||||
|
return retval;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
retval.add("/gcube");
|
||||||
|
retval.add("/gcube/devsec");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, ScopeBean> readScopes(String confFile) throws Exception {
|
||||||
|
if (confFile == null) {
|
||||||
|
throw new NullPointerException("the scope file has not been defined");
|
||||||
|
}
|
||||||
|
Map<String, ScopeBean> toReturn = new HashMap<String, ScopeBean>();
|
||||||
|
String scopeXML = fileToString(confFile);
|
||||||
|
|
||||||
|
Document scopeDocument = getDocumentGivenXML(scopeXML);
|
||||||
|
NodeList voElements = scopeDocument.getElementsByTagName("vo");
|
||||||
|
|
||||||
|
for (int i = 0; i < voElements.getLength(); i++) {
|
||||||
|
NodeList voDetails = voElements.item(i).getChildNodes();
|
||||||
|
String voString = voDetails.item(5).getFirstChild().getNodeValue();
|
||||||
|
// String voName = voDetails.item(1).getFirstChild().getNodeValue();
|
||||||
|
ScopeBean vo = new ScopeBean(voString);
|
||||||
|
|
||||||
|
toReturn.put(vo.toString(), vo);
|
||||||
|
try {
|
||||||
|
for (String vre : getVREFromVO(vo)) {
|
||||||
|
// This operation overrides the vo map
|
||||||
|
toReturn.put(vre.toString(), new ScopeBean(vo.toString()+"/"+vre));
|
||||||
|
}
|
||||||
|
} catch (ISException e) {
|
||||||
|
_log.error("Exception raised while loading VREs for VO : " + vo, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toReturn;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getScopeDataPath() {
|
||||||
|
String startDirectory = getServletFSPath();
|
||||||
|
return startDirectory + File.separator + "xml" + File.separator +"scopedata_admin.xml";
|
||||||
|
|
||||||
|
}
|
||||||
|
private String getServletFSPath() {
|
||||||
|
return this.getServletContext().getRealPath("") + File.separator + "WEB-INF";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String fileToString(final String path) throws IOException {
|
||||||
|
BufferedReader filebuf = null;
|
||||||
|
String nextStr = null;
|
||||||
|
StringBuilder ret = new StringBuilder();
|
||||||
|
|
||||||
|
filebuf = new BufferedReader(new FileReader(path));
|
||||||
|
nextStr = filebuf.readLine(); // legge una riga dal file
|
||||||
|
while (nextStr != null) {
|
||||||
|
ret.append(nextStr);
|
||||||
|
nextStr = filebuf.readLine(); // legge la prossima riga
|
||||||
|
}
|
||||||
|
filebuf.close(); // chiude il file
|
||||||
|
|
||||||
|
return ret.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Document getDocumentGivenXML(final String result) {
|
||||||
|
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||||
|
dbf.setValidating(false);
|
||||||
|
DocumentBuilder db;
|
||||||
|
Document document = null;
|
||||||
|
try {
|
||||||
|
db = dbf.newDocumentBuilder();
|
||||||
|
document = db.parse(new ByteArrayInputStream(result.getBytes()));
|
||||||
|
} catch (ParserConfigurationException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
} catch (SAXException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return document;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static List<String> getVREFromVO(final ScopeBean vo) throws Exception {
|
||||||
|
_log.debug("Starting Retrieving VREs for VO : " + vo);
|
||||||
|
List<String> toReturn = new ArrayList<String>();
|
||||||
|
|
||||||
|
ScopeProvider.instance.set(vo.toString());
|
||||||
|
SimpleQuery query = queryFor(GenericResource.class);
|
||||||
|
query.addCondition("$resource/Profile/SecondaryType/text() eq 'VRE'");
|
||||||
|
|
||||||
|
DiscoveryClient<GenericResource> client = clientFor(GenericResource.class);
|
||||||
|
|
||||||
|
List<GenericResource> gRes = client.submit(query);
|
||||||
|
|
||||||
|
for (GenericResource res : gRes) {
|
||||||
|
_log.debug("Found: " + res.profile().name());
|
||||||
|
toReturn.add(res.profile().name());
|
||||||
|
}
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.server.portlet;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import javax.portlet.ActionRequest;
|
||||||
|
import javax.portlet.ActionResponse;
|
||||||
|
import javax.portlet.GenericPortlet;
|
||||||
|
import javax.portlet.PortletException;
|
||||||
|
import javax.portlet.PortletRequestDispatcher;
|
||||||
|
import javax.portlet.RenderRequest;
|
||||||
|
import javax.portlet.RenderResponse;
|
||||||
|
|
||||||
|
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Massimiliano Assante - ISTI-CNR
|
||||||
|
* @version 1.0 Feb 9th 2012
|
||||||
|
*/
|
||||||
|
public class RuntimeResourcePortlet extends GenericPortlet {
|
||||||
|
|
||||||
|
public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
|
||||||
|
try {
|
||||||
|
ScopeHelper.setContext(request);
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
System.out.println("Exception while setting portlet context, are you not logged?");
|
||||||
|
}
|
||||||
|
PortletRequestDispatcher dispatcher =
|
||||||
|
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/RuntimePortlet_view.jsp");
|
||||||
|
dispatcher.include(request, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void processAction(ActionRequest request, ActionResponse response)
|
||||||
|
throws PortletException, IOException {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.data.BaseModel;
|
||||||
|
|
||||||
|
public class Category extends BaseModel {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Category() {
|
||||||
|
}
|
||||||
|
public Category(String name) {
|
||||||
|
set("name", name);
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return (String) get("name");
|
||||||
|
}
|
||||||
|
public String toString() {
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
import com.extjs.gxt.ui.client.data.BaseModel;
|
||||||
|
public class ClientScope extends BaseModel {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ClientScope() {
|
||||||
|
}
|
||||||
|
public ClientScope(String name) {
|
||||||
|
set("name", name);
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return (String) get("name");
|
||||||
|
}
|
||||||
|
public String toString() {
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* FieldVerifier validates that the name the user enters is valid.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* This class is in the <code>shared</code> packing because we use it in both
|
||||||
|
* the client code and on the server. On the client, we verify that the name is
|
||||||
|
* valid before sending an RPC request so the user doesn't have to wait for a
|
||||||
|
* network round trip to get feedback. On the server, we verify that the name is
|
||||||
|
* correct to ensure that the input is correct regardless of where the RPC
|
||||||
|
* originates.
|
||||||
|
* </p>
|
||||||
|
* <p>
|
||||||
|
* When creating a class that is used on both the client and the server, be sure
|
||||||
|
* that all code is translatable and does not use native JavaScript. Code that
|
||||||
|
* is note translatable (such as code that interacts with a database or the file
|
||||||
|
* system) cannot be compiled into client side JavaScript. Code that uses native
|
||||||
|
* JavaScript (such as Widgets) cannot be run on the server.
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public class FieldVerifier {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verifies that the specified name is valid for our service.
|
||||||
|
*
|
||||||
|
* In this example, we only require that the name is at least four
|
||||||
|
* characters. In your application, you can use more complex checks to ensure
|
||||||
|
* that usernames, passwords, email addresses, URLs, and other fields have the
|
||||||
|
* proper syntax.
|
||||||
|
*
|
||||||
|
* @param name the name to validate
|
||||||
|
* @return true if valid, false if invalid
|
||||||
|
*/
|
||||||
|
public static boolean isValidName(String name) {
|
||||||
|
if (name == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return name.length() > 3;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,175 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class FilledRuntimeResource implements Serializable{
|
||||||
|
|
||||||
|
private ArrayList<RRAccessPoint> rRAccessPoints;
|
||||||
|
|
||||||
|
private String resourceId;
|
||||||
|
private String resourceName;
|
||||||
|
private String type = "RuntimeResource";
|
||||||
|
private String version;
|
||||||
|
private String category;
|
||||||
|
private String description;
|
||||||
|
private String platformName;
|
||||||
|
private String platformVersion;
|
||||||
|
private String platformMinorVersion;
|
||||||
|
private String platformRevisionVersion;
|
||||||
|
private String platformBuildVersion;
|
||||||
|
private String runtimeHostedOn;
|
||||||
|
private String runtimeStatus;
|
||||||
|
private String runtimegHNUniqueID;
|
||||||
|
|
||||||
|
public FilledRuntimeResource() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilledRuntimeResource(String resourceId, ArrayList<RRAccessPoint> rRAccessPoints,
|
||||||
|
String resourceName, String version, String category,
|
||||||
|
String description, String platformName, String platformVersion,
|
||||||
|
String platformMinorVersion, String platformRevisionVersion,
|
||||||
|
String platformBuildVersion, String runtimeHostedOn,
|
||||||
|
String runtimeStatus, String runtimegHNUniqueID) {
|
||||||
|
super();
|
||||||
|
this.resourceId = resourceId;
|
||||||
|
this.rRAccessPoints = rRAccessPoints;
|
||||||
|
this.resourceName = resourceName;
|
||||||
|
this.version = version;
|
||||||
|
this.category = category;
|
||||||
|
this.description = description;
|
||||||
|
this.platformName = platformName;
|
||||||
|
this.platformVersion = platformVersion;
|
||||||
|
this.platformMinorVersion = platformMinorVersion;
|
||||||
|
this.platformRevisionVersion = platformRevisionVersion;
|
||||||
|
this.platformBuildVersion = platformBuildVersion;
|
||||||
|
this.runtimeHostedOn = runtimeHostedOn;
|
||||||
|
this.runtimeStatus = runtimeStatus;
|
||||||
|
this.runtimegHNUniqueID = runtimegHNUniqueID;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getResourceId() {
|
||||||
|
return resourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setResourceId(String resourceId) {
|
||||||
|
this.resourceId = resourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ArrayList<RRAccessPoint> getRRAccessPoints() {
|
||||||
|
return rRAccessPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRRAccessPoints(ArrayList<RRAccessPoint> rRAccessPoints) {
|
||||||
|
this.rRAccessPoints = rRAccessPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResourceName() {
|
||||||
|
return resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResourceName(String resourceName) {
|
||||||
|
this.resourceName = resourceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(String version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlatformName() {
|
||||||
|
return platformName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlatformName(String platformName) {
|
||||||
|
this.platformName = platformName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlatformVersion() {
|
||||||
|
return platformVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlatformVersion(String platformVersion) {
|
||||||
|
this.platformVersion = platformVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlatformMinorVersion() {
|
||||||
|
return platformMinorVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlatformMinorVersion(String platformMinorVersion) {
|
||||||
|
this.platformMinorVersion = platformMinorVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlatformRevisionVersion() {
|
||||||
|
return platformRevisionVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlatformRevisionVersion(String platformRevisionVersion) {
|
||||||
|
this.platformRevisionVersion = platformRevisionVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlatformBuildVersion() {
|
||||||
|
return platformBuildVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlatformBuildVersion(String platformBuildVersion) {
|
||||||
|
this.platformBuildVersion = platformBuildVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRuntimeHostedOn() {
|
||||||
|
return runtimeHostedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRuntimeHostedOn(String runtimeHostedOn) {
|
||||||
|
this.runtimeHostedOn = runtimeHostedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRuntimeStatus() {
|
||||||
|
return runtimeStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRuntimeStatus(String runtimeStatus) {
|
||||||
|
this.runtimeStatus = runtimeStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRuntimegHNUniqueID() {
|
||||||
|
return runtimegHNUniqueID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRuntimegHNUniqueID(String runtimegHNUniqueID) {
|
||||||
|
this.runtimegHNUniqueID = runtimegHNUniqueID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class InitInfo implements Serializable {
|
||||||
|
private ArrayList<String> scopes;
|
||||||
|
private FilledRuntimeResource rr2edit;
|
||||||
|
public InitInfo() {
|
||||||
|
super();
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
public InitInfo(ArrayList<String> scopes, FilledRuntimeResource rr2edit) {
|
||||||
|
super();
|
||||||
|
this.scopes = scopes;
|
||||||
|
this.rr2edit = rr2edit;
|
||||||
|
}
|
||||||
|
public ArrayList<String> getScopes() {
|
||||||
|
return scopes;
|
||||||
|
}
|
||||||
|
public void setScopes(ArrayList<String> scopes) {
|
||||||
|
this.scopes = scopes;
|
||||||
|
}
|
||||||
|
public FilledRuntimeResource getRr2edit() {
|
||||||
|
return rr2edit;
|
||||||
|
}
|
||||||
|
public void setRr2edit(FilledRuntimeResource rr2edit) {
|
||||||
|
this.rr2edit = rr2edit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: InvalidParameterException.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class InvalidParameterException extends Exception implements IsSerializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public InvalidParameterException() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvalidParameterException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvalidParameterException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvalidParameterException(Throwable cause) {
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class Property implements Serializable{
|
||||||
|
private String key;
|
||||||
|
private String value;
|
||||||
|
private boolean isCrypted;
|
||||||
|
|
||||||
|
public Property() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Property(String key, String value, boolean isCrypted) {
|
||||||
|
super();
|
||||||
|
this.key = key;
|
||||||
|
this.value = value;
|
||||||
|
this.isCrypted = isCrypted;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCrypted() {
|
||||||
|
return isCrypted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCrypted(boolean isCrypted) {
|
||||||
|
this.isCrypted = isCrypted;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class RRAccessPoint implements Serializable {
|
||||||
|
|
||||||
|
private String desc;
|
||||||
|
private String interfaceEntryNameAttr;
|
||||||
|
private String interfaceEndPoint;
|
||||||
|
private String username;
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
private ArrayList<Property> properties;
|
||||||
|
|
||||||
|
public RRAccessPoint() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public RRAccessPoint(String desc, String interfaceEntryNameAttr,
|
||||||
|
String interfaceEndPoint, String username, String password,
|
||||||
|
ArrayList<Property> properties) {
|
||||||
|
super();
|
||||||
|
this.desc = desc;
|
||||||
|
this.interfaceEntryNameAttr = interfaceEntryNameAttr;
|
||||||
|
this.interfaceEndPoint = interfaceEndPoint;
|
||||||
|
this.username = username;
|
||||||
|
this.password = password;
|
||||||
|
this.properties = properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInterfaceEntryNameAttr() {
|
||||||
|
return interfaceEntryNameAttr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInterfaceEntryNameAttr(String interfaceEntryNameAttr) {
|
||||||
|
this.interfaceEntryNameAttr = interfaceEntryNameAttr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInterfaceEndPoint() {
|
||||||
|
return interfaceEndPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInterfaceEndPoint(String interfaceEndPoint) {
|
||||||
|
this.interfaceEndPoint = interfaceEndPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<Property> getProperties() {
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProperties(ArrayList<Property> properties) {
|
||||||
|
this.properties = properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: AtomicTreeNode.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared.datamodel;
|
||||||
|
|
||||||
|
import com.extjs.gxt.ui.client.data.BaseTreeModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AtomicTreeNode extends BaseTreeModel {
|
||||||
|
private static final long serialVersionUID = 5094327834701967591L;
|
||||||
|
private static int ID = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated fr serialization only
|
||||||
|
*/
|
||||||
|
public AtomicTreeNode() {
|
||||||
|
set("id", ID++);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AtomicTreeNode(final String node) {
|
||||||
|
this(node, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The node is used as original node of the element useful to retrieve it from the IS.
|
||||||
|
* The name is instead used for pretty printing (aliasing).
|
||||||
|
* @param node the corresponding IS node
|
||||||
|
* @param name if null the node will be used instead
|
||||||
|
*/
|
||||||
|
public AtomicTreeNode(final String node, final String name) {
|
||||||
|
set("id", ID++);
|
||||||
|
set("node", node);
|
||||||
|
if (name == null) {
|
||||||
|
set("name", node);
|
||||||
|
} else {
|
||||||
|
set("name", name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public AtomicTreeNode(final String node, final String name, final String icon) {
|
||||||
|
this(node, name);
|
||||||
|
set("icon", icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AtomicTreeNode(final String node, final String name, final AtomicTreeNode[] children) {
|
||||||
|
this(node, name);
|
||||||
|
for (int i = 0; i < children.length; i++) {
|
||||||
|
add(children[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public AtomicTreeNode(final String node, final String name, final String icon, final AtomicTreeNode[] children) {
|
||||||
|
this(node, name, children);
|
||||||
|
set("icon", icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final Integer getId() {
|
||||||
|
return (Integer) get("id");
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String getName() {
|
||||||
|
return (String) get("name");
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String getNode() {
|
||||||
|
return (String) get("node");
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String getLabel() {
|
||||||
|
return (String) get("label");
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String toString() {
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String getSubType() {
|
||||||
|
if (this.isLeaf() && this.getParent() != null) {
|
||||||
|
return this.getNode();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: Assertion.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared.util;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* General purpose assertion handler.
|
||||||
|
* Assertion can be generalized to check a boolean expression and
|
||||||
|
* to raise an exception in correspondence to a failure happening
|
||||||
|
* during checking.
|
||||||
|
* <pre>
|
||||||
|
* <b>Example:</b>
|
||||||
|
*
|
||||||
|
* <b>Assertion</b><<i>TheExceptionType</i>> assertion = new Assertion<ParamException> ();
|
||||||
|
* assertion.<b>validate</b> (param != null, new <i>TheExceptionType</i>("invalid parameter null"));
|
||||||
|
*
|
||||||
|
* <b>or</b>, in a more compact form:
|
||||||
|
* <i>// The exception to throw in case of failure
|
||||||
|
* // during the evaluation of the expected condition</i>
|
||||||
|
* new <b>Assertion</b><<i>TheExceptionType</i>>().<b>validate</b>(
|
||||||
|
* i>5, <i>// The expected boolean <b>condition</b></i>
|
||||||
|
* new <i>TheExceptionType</i>("Parameter must be greater than 5")); <i>//The <b>error</b> message</i>
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*/
|
||||||
|
public class Assertion <T extends Throwable> implements Serializable, IsSerializable {
|
||||||
|
private static final long serialVersionUID = -2007903339251667541L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes an assertion and if the expression evaluation fails, throws an
|
||||||
|
* exception of type T.
|
||||||
|
* <pre>
|
||||||
|
* Example:
|
||||||
|
* new Assertion<MyException>().validate(whatExpected, new MyException("guard failed"));
|
||||||
|
* </pre>
|
||||||
|
* @param assertion the boolean expression to evaluate
|
||||||
|
* @param exc the exception to throw if the condition does not hold
|
||||||
|
* @throws T the exception extending {@link java.lang.Throwable}
|
||||||
|
*/
|
||||||
|
public final void validate(final boolean assertion, final T exc)
|
||||||
|
throws T {
|
||||||
|
if (!assertion) {
|
||||||
|
throw exc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: DelayedOperation.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared.util;
|
||||||
|
|
||||||
|
import com.google.gwt.user.client.Timer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs a delayed action on client side.
|
||||||
|
* Usage:
|
||||||
|
* <pre>
|
||||||
|
* new DelayedOperation() {
|
||||||
|
* // @Override
|
||||||
|
* public void doJob() {
|
||||||
|
* // Here the code...
|
||||||
|
* }
|
||||||
|
* }.start(5000); // the operation will start after 5 secs.
|
||||||
|
* </pre>
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*/
|
||||||
|
public abstract class DelayedOperation {
|
||||||
|
public final void start(final int delayMills) {
|
||||||
|
Timer t = new Timer() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
doJob();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
t.schedule(delayMills);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final void loop(final int delayMills) {
|
||||||
|
Timer t = new Timer() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
doJob();
|
||||||
|
this.schedule(delayMills);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
t.schedule(delayMills);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void doJob();
|
||||||
|
}
|
|
@ -0,0 +1,183 @@
|
||||||
|
/****************************************************************************
|
||||||
|
* This software is part of the gCube Project.
|
||||||
|
* Site: http://www.gcube-system.org/
|
||||||
|
****************************************************************************
|
||||||
|
* The gCube/gCore software is licensed as Free Open Source software
|
||||||
|
* conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||||
|
* The software and documentation is provided by its authors/distributors
|
||||||
|
* "as is" and no expressed or
|
||||||
|
* implied warranty is given for its use, quality or fitness for a
|
||||||
|
* particular case.
|
||||||
|
****************************************************************************
|
||||||
|
* Filename: XMLUtil.java
|
||||||
|
****************************************************************************
|
||||||
|
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
package org.gcube.portlets.admin.sepeditor.shared.util;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.gcube.portlets.admin.sepeditor.shared.datamodel.AtomicTreeNode;
|
||||||
|
|
||||||
|
import com.google.gwt.xml.client.Document;
|
||||||
|
import com.google.gwt.xml.client.Element;
|
||||||
|
import com.google.gwt.xml.client.NamedNodeMap;
|
||||||
|
import com.google.gwt.xml.client.Node;
|
||||||
|
import com.google.gwt.xml.client.NodeList;
|
||||||
|
import com.google.gwt.xml.client.XMLParser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniele Strollo (ISTI-CNR)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class XMLUtil {
|
||||||
|
|
||||||
|
public static AtomicTreeNode XMLToTree(final String xml, final String rootName)
|
||||||
|
throws Exception {
|
||||||
|
AtomicTreeNode root = null;
|
||||||
|
Document doc = XMLParser.parse(xml);
|
||||||
|
String rootTag = rootName;
|
||||||
|
root = elementToNode((com.google.gwt.xml.client.Element) doc.getElementsByTagName(rootTag).item(0));
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static AtomicTreeNode elementToNode(final com.google.gwt.xml.client.Element el) throws Exception {
|
||||||
|
if (el == null) {
|
||||||
|
throw new Exception("Invalid Profile");
|
||||||
|
}
|
||||||
|
StringBuffer value = new StringBuffer(XMLUtil.getTextContent(el).trim());
|
||||||
|
|
||||||
|
if (el.hasAttributes()) {
|
||||||
|
NamedNodeMap attr = el.getAttributes();
|
||||||
|
String attrName = null;
|
||||||
|
String attrVal = null;
|
||||||
|
for (int i = 0; i < attr.getLength(); i++) {
|
||||||
|
attrName = attr.item(i).getNodeName();
|
||||||
|
attrVal = attr.getNamedItem(attrName).getNodeValue();
|
||||||
|
value.append(attrName + " = " + attrVal + "; ");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (value != null && value.length() != 0) {
|
||||||
|
value = new StringBuffer("value = " + value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String tagName = el.getTagName() + ((value.length() != 0) ? " [" + value + "]" : "");
|
||||||
|
AtomicTreeNode node = new AtomicTreeNode(tagName);
|
||||||
|
Iterator<com.google.gwt.xml.client.Element> childrenIterator = XMLUtil.getElementChildren(el).iterator();
|
||||||
|
while (childrenIterator.hasNext()) {
|
||||||
|
node.add(elementToNode(childrenIterator.next()));
|
||||||
|
}
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Element getFirstElementChild(final Element parent) {
|
||||||
|
if (parent == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Node current = parent.getFirstChild();
|
||||||
|
while (current != null) {
|
||||||
|
if (current.getNodeType() == Node.ELEMENT_NODE) {
|
||||||
|
Element elem = (Element) current;
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
current = current.getNextSibling();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Element getFirstElementChild(final Element parent, final String tagName) {
|
||||||
|
if (parent == null || tagName == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Node current = parent.getFirstChild();
|
||||||
|
while (current != null) {
|
||||||
|
if (current.getNodeType() == Node.ELEMENT_NODE) {
|
||||||
|
Element elem = (Element) current;
|
||||||
|
if (tagName.equals(elem.getTagName())) {
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
current = current.getNextSibling();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<com.google.gwt.xml.client.Element> getElementChildren(final Element parent) {
|
||||||
|
ArrayList<Element> result = new ArrayList<Element>();
|
||||||
|
if (parent == null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Node current = parent.getFirstChild();
|
||||||
|
while (current != null) {
|
||||||
|
if (current.getNodeType() == Node.ELEMENT_NODE) {
|
||||||
|
Element elem = (Element) current;
|
||||||
|
result.add(elem);
|
||||||
|
}
|
||||||
|
current = current.getNextSibling();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static List<Element> getElementChildren(final Element parent, final String tagName) {
|
||||||
|
ArrayList<Element> result = new ArrayList<Element>();
|
||||||
|
if (parent == null || tagName == null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
Node current = parent.getFirstChild();
|
||||||
|
while (current != null) {
|
||||||
|
if (current.getNodeType() == Node.ELEMENT_NODE) {
|
||||||
|
Element elem = (Element) current;
|
||||||
|
if (tagName.equals(elem.getTagName())) {
|
||||||
|
result.add(elem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
current = current.getNextSibling();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static String getTextContent(final Element parent) {
|
||||||
|
StringBuffer result = new StringBuffer();
|
||||||
|
if (parent == null) {
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
Node current = parent.getFirstChild();
|
||||||
|
while (current != null) {
|
||||||
|
if (current.getNodeType() == Node.TEXT_NODE) {
|
||||||
|
result.append(current.getNodeValue());
|
||||||
|
}
|
||||||
|
current = current.getNextSibling();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getEntireContent(final Node parent) {
|
||||||
|
StringBuilder result = new StringBuilder();
|
||||||
|
if (parent != null) {
|
||||||
|
NodeList children = parent.getChildNodes();
|
||||||
|
for (int i = 0; i < children.getLength(); i++) {
|
||||||
|
Node node = children.item(i);
|
||||||
|
result.append(node.toString());
|
||||||
|
//if(node.hasChildNodes()) result.append(getEntireContent(node));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
log4j.rootLogger=DEBUG, A1
|
||||||
|
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||||
|
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||||
|
|
||||||
|
# Print the date in ISO 8601 format
|
||||||
|
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
|
||||||
|
|
||||||
|
# Print only messages of level TRACE or above in the package org.gcube
|
||||||
|
log4j.logger.org.gcube=TRACE
|
||||||
|
log4j.logger.org.apache.axis=ERROR
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module rename-to='sepeditor'>
|
||||||
|
<!-- Inherit the core Web Toolkit stuff. -->
|
||||||
|
<inherits name='com.google.gwt.user.User' />
|
||||||
|
|
||||||
|
<!-- Inherit the default GWT style sheet. You can change -->
|
||||||
|
<!-- the theme of your GWT application by uncommenting -->
|
||||||
|
<!-- any one of the following lines. -->
|
||||||
|
<inherits name='com.google.gwt.user.theme.clean.Clean' />
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||||
|
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||||
|
|
||||||
|
<!-- Other module inherits -->
|
||||||
|
<inherits name='com.extjs.gxt.ui.GXT' />
|
||||||
|
<inherits name='com.extjs.gxt.themes.Themes' />
|
||||||
|
<!-- inherits gCube Widgets Library -->
|
||||||
|
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
|
||||||
|
|
||||||
|
<!-- Specify the app entry point class. -->
|
||||||
|
<entry-point
|
||||||
|
class='org.gcube.portlets.admin.sepeditor.client.RuntimeResourceCreator' />
|
||||||
|
|
||||||
|
<!-- Specify the paths for translatable code -->
|
||||||
|
<source path='client' />
|
||||||
|
<source path='shared' />
|
||||||
|
|
||||||
|
</module>
|
|
@ -0,0 +1,37 @@
|
||||||
|
.wizardTextBox {
|
||||||
|
background-color: white;
|
||||||
|
border-color: #999;
|
||||||
|
border-width: 1px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
letter-spacing: normal;
|
||||||
|
line-height: 15px;
|
||||||
|
height: 23px !important;
|
||||||
|
width: 295px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizardTextBox.password {
|
||||||
|
width: 150px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizardTextBox[readonly] {
|
||||||
|
color: #AAA;
|
||||||
|
border-color: #AAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning-report {
|
||||||
|
font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial,
|
||||||
|
sans-serif;
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: #333;
|
||||||
|
padding: 0.5em;
|
||||||
|
background-color: #FAFAA0;
|
||||||
|
border: 1px solid gray;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
width: auto;
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!doctype html>
|
||||||
|
<!-- The DOCTYPE declaration above will set the -->
|
||||||
|
<!-- browser's rendering engine into -->
|
||||||
|
<!-- "Standards Mode". Replacing this declaration -->
|
||||||
|
<!-- with a "Quirks Mode" doctype is not supported. -->
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<link rel="shortcut icon" href="favicon.gif" >
|
||||||
|
<!-- -->
|
||||||
|
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||||
|
<!-- -->
|
||||||
|
<link type="text/css" rel="stylesheet" href="RuntimeResourceCreator.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" />
|
||||||
|
<!-- -->
|
||||||
|
<!-- Any title is fine -->
|
||||||
|
<!-- -->
|
||||||
|
<title>Runtime Resource Editor</title>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- This script loads your compiled module. -->
|
||||||
|
<!-- If you add any GWT meta tags, they must -->
|
||||||
|
<!-- be added before this line. -->
|
||||||
|
<!-- -->
|
||||||
|
<script type="text/javascript" language="javascript" src="sepeditor/sepeditor.nocache.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<!-- The body can have arbitrary html, or -->
|
||||||
|
<!-- you can leave the body empty if you want -->
|
||||||
|
<!-- to create a completely dynamic UI. -->
|
||||||
|
<!-- -->
|
||||||
|
<body>
|
||||||
|
<div id="RuntimeResourcePortletDIV" style="width:100%;"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<%@page contentType="text/html"%>
|
||||||
|
<%@page pageEncoding="UTF-8"%>
|
||||||
|
|
||||||
|
<%-- Uncomment below lines to add portlet taglibs to jsp
|
||||||
|
<%@ page import="javax.portlet.*"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
|
||||||
|
|
||||||
|
<portlet:defineObjects />
|
||||||
|
--%>
|
||||||
|
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/gxt/css/gxt-all.css" />
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" language="javascript"
|
||||||
|
src='<%=request.getContextPath()%>/runtimeresourcecreator/runtimeresourcecreator.nocache.js'>
|
||||||
|
</script>
|
||||||
|
<div id="RuntimeResourcePortletDIV">
|
||||||
|
</div>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 5.2.0//EN" "http://www.liferay.com/dtd/liferay-display_5_2_0.dtd">
|
||||||
|
|
||||||
|
<display>
|
||||||
|
<category name="gCube Applications">
|
||||||
|
<portlet id="RuntimeResourceCreator" />
|
||||||
|
</category>
|
||||||
|
</display>
|
|
@ -0,0 +1,9 @@
|
||||||
|
name=Runtime Resource Creator
|
||||||
|
module-group-id=liferay
|
||||||
|
module-incremental-version=1
|
||||||
|
tags=
|
||||||
|
short-description=
|
||||||
|
change-log=
|
||||||
|
page-url=http://www.gcube-system.org
|
||||||
|
author=gCube
|
||||||
|
licenses=EUPL
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_5_2_0.dtd">
|
||||||
|
|
||||||
|
<liferay-portlet-app>
|
||||||
|
<portlet>
|
||||||
|
<portlet-name>RuntimeResourceCreator</portlet-name>
|
||||||
|
<layout-cacheable>false</layout-cacheable>
|
||||||
|
<instanceable>false</instanceable>
|
||||||
|
<ajaxable>false</ajaxable>
|
||||||
|
<!-- LOCATION CSS HERE -->
|
||||||
|
<header-portlet-css>/RuntimeResourceCreator.css</header-portlet-css>
|
||||||
|
</portlet>
|
||||||
|
<role-mapper>
|
||||||
|
<role-name>administrator</role-name>
|
||||||
|
<role-link>Administrator</role-link>
|
||||||
|
</role-mapper>
|
||||||
|
</liferay-portlet-app>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
|
||||||
|
<portlet>
|
||||||
|
<portlet-name>RuntimeResourceCreator</portlet-name>
|
||||||
|
<display-name>Runtime Resource Creator</display-name>
|
||||||
|
<portlet-class>org.gcube.portlets.admin.sepeditor.server.portlet.RuntimeResourcePortlet</portlet-class>
|
||||||
|
<init-param>
|
||||||
|
<name>view-jsp</name>
|
||||||
|
<value>/WEB-INF/jsp/RuntimePortlet_view.jsp</value>
|
||||||
|
</init-param>
|
||||||
|
<expiration-cache>0</expiration-cache>
|
||||||
|
<supports>
|
||||||
|
<mime-type>text/html</mime-type>
|
||||||
|
</supports>
|
||||||
|
<portlet-info>
|
||||||
|
<title>Runtime Resource Creator</title>
|
||||||
|
<short-title>Runtime Resource Creator</short-title>
|
||||||
|
<keywords>Runtime Resource Creator</keywords>
|
||||||
|
</portlet-info>
|
||||||
|
<security-role-ref>
|
||||||
|
<role-name>administrator</role-name>
|
||||||
|
</security-role-ref>
|
||||||
|
</portlet>
|
||||||
|
</portlet-app>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
|
version="2.5">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Servlets -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>serviceendpointEditor</servlet-name>
|
||||||
|
<servlet-class>org.gcube.portlets.admin.sepeditor.server.RuntimeResourceCreatorServiceImpl</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>serviceendpointEditor</servlet-name>
|
||||||
|
<url-pattern>/sepeditor/serviceendpointEditor</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Default page to serve -->
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>RuntimeResourceCreator.html</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
</web-app>
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<infrastructures>
|
||||||
|
|
||||||
|
<infrastructure>
|
||||||
|
<name>d4science</name>
|
||||||
|
<vos>
|
||||||
|
<vo>
|
||||||
|
<name>d4science</name>
|
||||||
|
<src>ServiceMap_d4science.research-infrastructures.eu.xml</src>
|
||||||
|
<scope>/d4science.research-infrastructures.eu</scope>
|
||||||
|
</vo>
|
||||||
|
<vo>
|
||||||
|
<name>d4science/FARM</name>
|
||||||
|
<src>ServiceMap_FARM.xml</src>
|
||||||
|
<scope>/d4science.research-infrastructures.eu/FARM</scope>
|
||||||
|
</vo>
|
||||||
|
<vo>
|
||||||
|
<name>d4science/gCubeApps</name>
|
||||||
|
<src>ServiceMap_gCubeApps.xml</src>
|
||||||
|
<scope>/d4science.research-infrastructures.eu/gCubeApps</scope>
|
||||||
|
</vo>
|
||||||
|
<vo>
|
||||||
|
<name>d4science/EUBrazilOpenBio</name>
|
||||||
|
<src>ServiceMap_EUBrazilOpenBio.xml</src>
|
||||||
|
<scope>/d4science.research-infrastructures.eu/EUBrazilOpenBio</scope>
|
||||||
|
</vo>
|
||||||
|
</vos>
|
||||||
|
</infrastructure>
|
||||||
|
|
||||||
|
<infrastructure>
|
||||||
|
<name>gcube</name>
|
||||||
|
<vos>
|
||||||
|
<vo>
|
||||||
|
<name>gcube</name>
|
||||||
|
<src>ServiceMap_gcube.xml</src>
|
||||||
|
<scope>/gcube</scope>
|
||||||
|
</vo>
|
||||||
|
<vo>
|
||||||
|
<name>gcube/devsec</name>
|
||||||
|
<src>ServiceMap_devsec.xml</src>
|
||||||
|
<scope>/gcube/devsec</scope>
|
||||||
|
</vo>
|
||||||
|
<vo>
|
||||||
|
<name>gcube/devNext</name>
|
||||||
|
<src>ServiceMap_devNext.xml</src>
|
||||||
|
<scope>/gcube/devNext</scope>
|
||||||
|
</vo>
|
||||||
|
</vos>
|
||||||
|
</infrastructure>
|
||||||
|
|
||||||
|
</infrastructures>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,493 @@
|
||||||
|
.x-panel {
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #d0d0d0;
|
||||||
|
}
|
||||||
|
.x-panel-header {
|
||||||
|
color:#333;
|
||||||
|
border:1px solid #d0d0d0;
|
||||||
|
background-image:url(../images/gray/panel/white-top-bottom.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-body {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-bbar .x-toolbar {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-tbar .x-toolbar {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
.x-panel-body-noheader, .x-panel-mc .x-panel-body {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
.x-panel-tl .x-panel-header {
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
.x-panel-tc {
|
||||||
|
background-image:url(../images/gray/panel/top-bottom.gif);
|
||||||
|
}
|
||||||
|
.x-panel-tl {
|
||||||
|
background-image:url(../images/gray/panel/corners-sprite.gif);
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
.x-panel-tr {
|
||||||
|
background-image:url(../images/gray/panel/corners-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-panel-bc {
|
||||||
|
background-image:url(../images/gray/panel/top-bottom.gif);
|
||||||
|
}
|
||||||
|
.x-panel-bl {
|
||||||
|
background-image:url(../images/gray/panel/corners-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-panel-br {
|
||||||
|
background-image:url(../images/gray/panel/corners-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-panel-mc {
|
||||||
|
background:#f1f1f1;
|
||||||
|
}
|
||||||
|
.x-panel-mc .x-panel-body {
|
||||||
|
background:transparent;
|
||||||
|
border: 0 none;
|
||||||
|
}
|
||||||
|
.x-panel-ml {
|
||||||
|
background-image:url(../images/gray/panel/left-right.gif);
|
||||||
|
}
|
||||||
|
.x-panel-mr {
|
||||||
|
background-image:url(../images/gray/panel/left-right.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tools */
|
||||||
|
.x-tool {
|
||||||
|
background-image:url(../images/gray/panel/tool-sprites.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ghosting */
|
||||||
|
.x-panel-ghost {
|
||||||
|
background:#e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-ghost ul {
|
||||||
|
border-color:#b0b0b0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-grid-panel .x-panel-mc .x-panel-body {
|
||||||
|
border:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
|
||||||
|
.x-btn-left{
|
||||||
|
background-image:url(../images/gray/button/btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-btn-right{
|
||||||
|
background-image:url(../images/gray/button/btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-btn-center{
|
||||||
|
background-image:url(../images/gray/button/btn-sprite.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-btn-group-header {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.x-btn-group-tc {
|
||||||
|
background-image: url(../images/gray/button/group-tb.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-tl {
|
||||||
|
background-image: url(../images/gray/button/group-cs.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-tr {
|
||||||
|
background-image: url(../images/gray/button/group-cs.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-bc {
|
||||||
|
background-image: url(../images/gray/button/group-tb.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-bl {
|
||||||
|
background-image: url(../images/gray/button/group-cs.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-br {
|
||||||
|
background-image: url(../images/gray/button/group-cs.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-ml {
|
||||||
|
background-image: url(../images/gray/button/group-lr.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-mr {
|
||||||
|
background-image: url(../images/gray/button/group-lr.gif);
|
||||||
|
}
|
||||||
|
.x-btn-group-notitle .x-btn-group-tc {
|
||||||
|
background-image: url(../images/gray/button/group-tb.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Layout classes */
|
||||||
|
|
||||||
|
.x-border-layout-ct {
|
||||||
|
background:#f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-accordion-hd {
|
||||||
|
background-image:url(../images/gray/panel/light-hd.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-layout-collapsed{
|
||||||
|
background-color:#eee;
|
||||||
|
border-color:#e0e0e0;
|
||||||
|
}
|
||||||
|
.x-layout-collapsed-over{
|
||||||
|
background-color:#fbfbfb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* qtips */
|
||||||
|
.x-tip .x-tip-top {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-top-left {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-top-right {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-ft {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-ft-left {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-ft-right {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-bd-left {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tip .x-tip-bd-right {
|
||||||
|
background-image:url(../images/gray/qtip/tip-sprite.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toolbars */
|
||||||
|
|
||||||
|
.x-toolbar{
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
background:#f0f4f5 url(../images/gray/toolbar/bg.gif) repeat-x top left;
|
||||||
|
}
|
||||||
|
.x-toolbar button {
|
||||||
|
color:#444;
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button {
|
||||||
|
background-image:url(../images/gray/toolbar/btn-arrow.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button {
|
||||||
|
background-image:url(../images/gray/toolbar/btn-arrow.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-over .x-btn-left{
|
||||||
|
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-over .x-btn-right{
|
||||||
|
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-over .x-btn-center{
|
||||||
|
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-over button {
|
||||||
|
color:#111;
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{
|
||||||
|
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{
|
||||||
|
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{
|
||||||
|
background-image:url(../images/gray/toolbar/tb-btn-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-toolbar .xtb-sep {
|
||||||
|
background-image: url(../images/gray/grid/grid-split.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tabs */
|
||||||
|
|
||||||
|
.x-tab-panel-header, .x-tab-panel-footer {
|
||||||
|
background: #EAEAEA;
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.x-tab-panel-header {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-footer {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.x-tab-strip-top{
|
||||||
|
background:#dbdbdb url(../images/gray/tabs/tab-strip-bg.gif) repeat-x left top;
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.x-tab-strip-bottom{
|
||||||
|
background-image:url(../images/gray/tabs/tab-strip-btm-bg.gif);
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip span.x-tab-strip-text {
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
.x-tab-strip-over span.x-tab-strip-text {
|
||||||
|
color:#111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-active span.x-tab-strip-text {
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-disabled .x-tabs-text {
|
||||||
|
color:#aaaaaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-top .x-tab-right {
|
||||||
|
background-image:url(../images/gray/tabs/tabs-sprite.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-top .x-tab-left {
|
||||||
|
background-image:url(../images/gray/tabs/tabs-sprite.gif);
|
||||||
|
}
|
||||||
|
.x-tab-strip-top .x-tab-strip-inner {
|
||||||
|
background-image:url(../images/gray/tabs/tabs-sprite.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-bottom .x-tab-right {
|
||||||
|
background-image:url(../images/gray/tabs/tab-btm-inactive-right-bg.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-bottom .x-tab-left {
|
||||||
|
background-image:url(../images/gray/tabs/tab-btm-inactive-left-bg.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-bottom .x-tab-strip-active .x-tab-right {
|
||||||
|
background-image:url(../images/gray/tabs/tab-btm-right-bg.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip-bottom .x-tab-strip-active .x-tab-left {
|
||||||
|
background-image:url(../images/gray/tabs/tab-btm-left-bg.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close {
|
||||||
|
background-image:url(../images/gray/tabs/tab-close.gif);
|
||||||
|
}
|
||||||
|
.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{
|
||||||
|
background-image:url(../images/gray/tabs/tab-close.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-body {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
background:#fff;
|
||||||
|
}
|
||||||
|
.x-tab-panel-bbar .x-toolbar {
|
||||||
|
border-color: #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-tbar .x-toolbar {
|
||||||
|
border-color: #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-header-plain .x-tab-strip-spacer {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
background: #eaeaea;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-scroller-left {
|
||||||
|
background-image: url(../images/gray/tabs/scroll-left.gif);
|
||||||
|
border-color:#aeaeae;
|
||||||
|
}
|
||||||
|
.x-tab-scroller-right {
|
||||||
|
background-image: url(../images/gray/tabs/scroll-right.gif);
|
||||||
|
border-color:#aeaeae;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Window */
|
||||||
|
|
||||||
|
.x-window-proxy {
|
||||||
|
background:#e0e0e0;
|
||||||
|
border-color:#b0b0b0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-tl .x-window-header {
|
||||||
|
color:#555;
|
||||||
|
}
|
||||||
|
.x-window-tc {
|
||||||
|
background-image:url(../images/gray/window/top-bottom.png);
|
||||||
|
}
|
||||||
|
.x-window-tl {
|
||||||
|
background-image:url(../images/gray/window/left-corners.png);
|
||||||
|
}
|
||||||
|
.x-window-tr {
|
||||||
|
background-image:url(../images/gray/window/right-corners.png);
|
||||||
|
}
|
||||||
|
.x-window-bc {
|
||||||
|
background-image:url(../images/gray/window/top-bottom.png);
|
||||||
|
}
|
||||||
|
.x-window-bl {
|
||||||
|
background-image:url(../images/gray/window/left-corners.png);
|
||||||
|
}
|
||||||
|
.x-window-br {
|
||||||
|
background-image:url(../images/gray/window/right-corners.png);
|
||||||
|
}
|
||||||
|
.x-window-mc {
|
||||||
|
border:1px solid #d0d0d0;
|
||||||
|
background:#e8e8e8;
|
||||||
|
}
|
||||||
|
.ext-ie .x-window-plain .x-window-mc {
|
||||||
|
background-color: #e3e3e3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-ml {
|
||||||
|
background-image:url(../images/gray/window/left-right.png);
|
||||||
|
}
|
||||||
|
.x-window-mr {
|
||||||
|
background-image:url(../images/gray/window/left-right.png);
|
||||||
|
}
|
||||||
|
.x-panel-ghost .x-window-tl {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
.x-panel-collapsed .x-window-tl {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-plain .x-window-mc {
|
||||||
|
background: #e8e8e8;
|
||||||
|
border-right:1px solid #eee;
|
||||||
|
border-bottom:1px solid #eee;
|
||||||
|
border-top:1px solid #d0d0d0;
|
||||||
|
border-left:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-plain .x-window-body {
|
||||||
|
border-left:1px solid #eee;
|
||||||
|
border-top:1px solid #eee;
|
||||||
|
border-bottom:1px solid #d0d0d0;
|
||||||
|
border-right:1px solid #d0d0d0;
|
||||||
|
background:transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc {
|
||||||
|
background-color: #e4e4e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* misc */
|
||||||
|
.x-html-editor-wrap {
|
||||||
|
border-color:#d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Borders go last for specificity */
|
||||||
|
.x-panel-noborder .x-panel-body-noborder {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-header-noborder {
|
||||||
|
border-width:0;
|
||||||
|
border-bottom:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-bottom:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-top:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-noborder .x-window-mc {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
.x-window-plain .x-window-body-noborder {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-noborder .x-tab-panel-body-noborder {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-noborder .x-tab-panel-header-noborder {
|
||||||
|
border-top-width:0;
|
||||||
|
border-left-width:0;
|
||||||
|
border-right-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-noborder .x-tab-panel-footer-noborder {
|
||||||
|
border-bottom-width:0;
|
||||||
|
border-left-width:0;
|
||||||
|
border-right-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.x-tab-panel-bbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-top:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-tbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-bottom:1px solid #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-spinner-field .x-form-spinner-up {
|
||||||
|
background-image: url('../images/gray/form/spinner.gif');
|
||||||
|
}
|
||||||
|
.x-spinner-field .x-form-spinner-down {
|
||||||
|
background-image: url('../images/gray/form/spinner.gif');
|
||||||
|
}.x-accordion-hd {
|
||||||
|
background-color: #e5e5e5;
|
||||||
|
}.x-border {
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-layout-popup {
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-list {
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-view {
|
||||||
|
border:1px solid #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-menubar {
|
||||||
|
border-color: #D0D0D0;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
background-image: url(../images/gray/toolbar/bg.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-menubar-item-active {
|
||||||
|
background-color: #D9E8FB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-menubar-item-active {
|
||||||
|
background-color: #D9E8FB;
|
||||||
|
}.x-date-right-icon {
|
||||||
|
background-image: url(../images/default/shared/right-btn.gif);
|
||||||
|
margin-right: 2px;
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-date-left-icon {
|
||||||
|
background-image: url(../images/default/shared/left-btn.gif);
|
||||||
|
margin-right: 2px;
|
||||||
|
text-decoration: none !important;
|
||||||
|
}.my-tbl {
|
||||||
|
border: 1px solid #C6C5C5;
|
||||||
|
}.my-treetbl {
|
||||||
|
border: 1px solid #C6C5C5;
|
||||||
|
}
|
|
@ -0,0 +1,638 @@
|
||||||
|
/*
|
||||||
|
* Ext JS Library 2.1
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
html,body {
|
||||||
|
background: #3d71b8 url(../wallpapers/desktop.jpg) no-repeat left top;
|
||||||
|
font: normal 12px tahoma, arial, verdana, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0 none;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.start {
|
||||||
|
background-image: url( ../images/taskbar/black/startbutton-icon.gif ) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bogus {
|
||||||
|
background-image: url( ../images/bogus.png ) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout {
|
||||||
|
background-image: url( ../images/logout.gif ) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings {
|
||||||
|
background-image: url( ../images/gears.gif ) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dpanels {
|
||||||
|
width: 250px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dpanels .x-panel {
|
||||||
|
margin: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dpanels .x-date-picker {
|
||||||
|
border: 0 none;
|
||||||
|
border-top: 0 none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dpanels .x-date-picker td.x-date-active {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dpanels .x-date-picker {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#x-desktop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: 0 none;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn {
|
||||||
|
float: left;
|
||||||
|
margin: 1px 0 0 1px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar-start .x-btn {
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar button { /* width: 150px;
|
||||||
|
overflow: hidden; */
|
||||||
|
text-align: left;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title-bar-wrapper {
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title-bar {
|
||||||
|
color: #225599;
|
||||||
|
padding: 9px 7px;
|
||||||
|
font: bold 16px tahoma, arial, verdana, sans-serif;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#x-logout {
|
||||||
|
float: right;
|
||||||
|
padding: 6px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-btn-text-icon .x-btn-center .logout {
|
||||||
|
background-position: 0pt 3px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding: 3px 0pt 3px 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar {
|
||||||
|
background: transparent none;
|
||||||
|
height: 30px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
z-index: 12001;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-btn-icon .ux-taskbutton-center .x-btn-text {
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-btn-icon .ux-taskbutton-center {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-startbutton-center .x-btn-text {
|
||||||
|
color: #000000 !important;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbutton-left,.ux-taskbutton-right {
|
||||||
|
font-size: 1px;
|
||||||
|
line-height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbutton-left {
|
||||||
|
width: 4px;
|
||||||
|
height: 28px;
|
||||||
|
background: url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbutton-right {
|
||||||
|
width: 4px;
|
||||||
|
height: 28px;
|
||||||
|
background: url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 -28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbutton-left i,.ux-taskbutton-right i {
|
||||||
|
display: block;
|
||||||
|
width: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 1px;
|
||||||
|
line-height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbutton-center {
|
||||||
|
background: url( ../images/taskbar/black/taskbutton.gif ) repeat-x 0 -56px;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .ux-taskbutton-left {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .ux-taskbutton-right {
|
||||||
|
background-position: 0 -28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .ux-taskbutton-center {
|
||||||
|
background-position: 0 -56px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-over .ux-taskbutton-left {
|
||||||
|
background-position: 0 -252px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-over .ux-taskbutton-right {
|
||||||
|
background-position: 0 -280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-over .ux-taskbutton-center {
|
||||||
|
background-position: 0 -308px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-click .ux-taskbutton-left {
|
||||||
|
background-position: 0 -168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-click .ux-taskbutton-right {
|
||||||
|
background-position: 0 -196px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-click .ux-taskbutton-center {
|
||||||
|
background-position: 0 -224px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-taskbutton-left {
|
||||||
|
background-position: 0 -84px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-taskbutton-right {
|
||||||
|
background: url( ../images/taskbar/black/taskbutton.gif ) no-repeat 0 -112px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-taskbutton-center {
|
||||||
|
background: url( ../images/taskbar/black/taskbutton.gif ) repeat-x 0 -140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-taskbutton-center button {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#spacer {
|
||||||
|
height: 25px;
|
||||||
|
float: left;
|
||||||
|
width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-body p,.x-panel-body p {
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-maximized .x-window-bc {
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add {
|
||||||
|
background-image: url(../../shared/icons/fam/add.gif) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option {
|
||||||
|
background-image: url(../../shared/icons/fam/plugin.gif) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.remove {
|
||||||
|
background-image: url(../../shared/icons/fam/delete.gif) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
background-image: url(../images/tabs.gif) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu {
|
||||||
|
background: transparent none;
|
||||||
|
border: 0px none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tl .x-window-header {
|
||||||
|
color: #f1f1f1;
|
||||||
|
font: bold 11px tahoma, arial, verdana, sans-serif;
|
||||||
|
padding: 5px 0 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-tl .x-panel-icon,.ux-start-menu-tl .x-panel-icon {
|
||||||
|
background-position: 0pt 4px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-left: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tl {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-left-corners.png ) no-repeat 0 0;
|
||||||
|
padding-left: 6px;
|
||||||
|
zoom: 1;
|
||||||
|
z-index: 1;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tr {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-right-corners.png ) no-repeat right
|
||||||
|
0;
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tc {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-top-bottom.png ) repeat-x 0 0;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-ml {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-left-right.png ) repeat-y 0 0;
|
||||||
|
padding-left: 6px;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-bc {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-top-bottom.png ) repeat-x 0 bottom;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-bc .x-window-footer {
|
||||||
|
padding-bottom: 6px;
|
||||||
|
zoom: 1;
|
||||||
|
font-size: 0;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-bl {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-left-corners.png ) no-repeat 0
|
||||||
|
bottom;
|
||||||
|
padding-left: 6px;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-br {
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-right-corners.png ) no-repeat right
|
||||||
|
bottom;
|
||||||
|
padding-right: 6px;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-nofooter .ux-start-menu-bc {
|
||||||
|
height: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-splitbar-h {
|
||||||
|
background-color: #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-bwrap {
|
||||||
|
background: transparent none;
|
||||||
|
border: 0px none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-body {
|
||||||
|
background: transparent none;
|
||||||
|
border: 0px none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-apps-panel {
|
||||||
|
background: #ffffff none;
|
||||||
|
border: 1px solid #1e2124;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tools-panel {
|
||||||
|
border: 0px none;
|
||||||
|
background: transparent url( ../images/taskbar/black/start-menu-right.png ) repeat-y scroll right
|
||||||
|
0pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar-start {
|
||||||
|
background: #000000 url( ../images/taskbar/black/taskbar-start-panel-bg.gif ) repeat-x left top;
|
||||||
|
left: 0px;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar-start .x-toolbar {
|
||||||
|
background: none;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbuttons-panel {
|
||||||
|
background: #000000 url( ../images/taskbar/black/taskbuttons-panel-bg.gif ) repeat-x left top;
|
||||||
|
padding-top: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-strip-wrap { /* overflow:hidden;
|
||||||
|
position:relative;
|
||||||
|
width:100%; */
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.ux-taskbuttons-strip {
|
||||||
|
display: block;
|
||||||
|
width: 5000px;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.ux-taskbuttons-strip li {
|
||||||
|
float: left;
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.ux-taskbuttons-strip li.ux-taskbuttons-edge {
|
||||||
|
float: left;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
border: 0 none !important;
|
||||||
|
font-size: 1px !important;
|
||||||
|
line-height: 1px !important;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
background: transparent !important;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-clear {
|
||||||
|
clear: both;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-taskbuttons-scrolling {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-taskbuttons-scrolling .ux-taskbuttons-strip-wrap {
|
||||||
|
margin-left: 18px;
|
||||||
|
margin-right: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.ux-taskButtons-edge { /*float:left;*/
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
border: 0 none !important;
|
||||||
|
font-size: 1px !important;
|
||||||
|
line-height: 1px !important;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
background: transparent !important;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-scroller-left {
|
||||||
|
background: transparent url( ../images/taskbar/black/scroll-left.gif ) no-repeat -18px 0;
|
||||||
|
width: 18px;
|
||||||
|
position: absolute;
|
||||||
|
left: 1px;
|
||||||
|
top: 0px;
|
||||||
|
z-index: 10;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-scroller-left-over {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-scroller-left-disabled {
|
||||||
|
background-position: -18px 0;
|
||||||
|
opacity: .5;
|
||||||
|
-moz-opacity: .5;
|
||||||
|
filter: alpha(opacity = 50);
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-scroller-right {
|
||||||
|
background: transparent url( ../images/taskbar/black/scroll-right.gif ) no-repeat 0 0;
|
||||||
|
width: 18px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0px;
|
||||||
|
z-index: 10;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-scroller-right-over {
|
||||||
|
background-position: -18px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-taskbuttons-scroller-right-disabled {
|
||||||
|
background-position: 0 0;
|
||||||
|
opacity: .5;
|
||||||
|
-moz-opacity: .5;
|
||||||
|
filter: alpha(opacity = 50);
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-toolmenu-sep {
|
||||||
|
background-color: #18191a;
|
||||||
|
border-bottom: 1px solid #858789;
|
||||||
|
display: block;
|
||||||
|
font-size: 1px;
|
||||||
|
line-height: 1px;
|
||||||
|
margin: 2px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tools-panel ul.x-menu-list li.x-menu-list-item a.x-menu-item {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tools-panel ul.x-menu-list li.x-menu-list-item .x-menu-item-active a.x-menu-item {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-start-menu-tools-panel .x-menu-item-active {
|
||||||
|
background: #525456 url( ../images/taskbar/black/item-over.gif ) repeat-x left bottom;
|
||||||
|
border: 1px solid #000000;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-splitbar-h {
|
||||||
|
background: #000000 url( ../images/taskbar/black/taskbar-split-h.gif ) no-repeat 0 0;
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-header-text {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Begin Start button
|
||||||
|
*/
|
||||||
|
.ux-startbutton-left,.ux-startbutton-right {
|
||||||
|
font-size: 1px;
|
||||||
|
line-height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-startbutton-left {
|
||||||
|
width: 10px;
|
||||||
|
height: 28px;
|
||||||
|
background: url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-startbutton-right {
|
||||||
|
width: 10px;
|
||||||
|
height: 30px;
|
||||||
|
background: url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 -28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-startbutton-left i,.ux-startbutton-right i {
|
||||||
|
display: block;
|
||||||
|
width: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 1px;
|
||||||
|
line-height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ux-startbutton-center {
|
||||||
|
background: url( ../images/taskbar/black/startbutton.gif ) repeat-x 0 -56px;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .ux-startbutton-left {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .ux-startbutton-right {
|
||||||
|
background-position: 0 -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .ux-startbutton-center {
|
||||||
|
background-position: 0 -60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-over .ux-startbutton-left {
|
||||||
|
background-position: 0 -270px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-over .ux-startbutton-right {
|
||||||
|
background-position: 0 -300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-over .ux-startbutton-center {
|
||||||
|
background-position: 0 -330px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-click .ux-startbutton-left {
|
||||||
|
background-position: 0 -180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-click .ux-startbutton-right {
|
||||||
|
background-position: 0 -210px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .x-btn-click .ux-startbutton-center {
|
||||||
|
background-position: 0 -240px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-startbutton-left {
|
||||||
|
background-position: 0 -90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-startbutton-right {
|
||||||
|
background: url( ../images/taskbar/black/startbutton.gif ) no-repeat 0 -120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-startbutton-center {
|
||||||
|
background: url( ../images/taskbar/black/startbutton.gif ) repeat-x 0 -150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ux-taskbar .active-win .ux-startbutton-center button {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* End Start button
|
||||||
|
*/
|
||||||
|
.x-resizable-proxy {
|
||||||
|
background: #C7DFFC;
|
||||||
|
opacity: .5;
|
||||||
|
-moz-opacity: .5;
|
||||||
|
filter: alpha(opacity = 50);
|
||||||
|
border: 1px solid #3b5a82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Desktop Shortcuts */
|
||||||
|
#x-shortcuts dt {
|
||||||
|
float: left;
|
||||||
|
margin: 15px 0 0 15px;
|
||||||
|
clear: left;
|
||||||
|
width: 64px;
|
||||||
|
font: normal 10px tahoma, arial, verdana, sans-serif;
|
||||||
|
text-align: center;
|
||||||
|
zoom: 1;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#x-shortcuts dt a {
|
||||||
|
width: 64px;
|
||||||
|
display: block;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#x-shortcuts dt div {
|
||||||
|
width: 100%;
|
||||||
|
color: white;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#x-shortcuts dt a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 996 B |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 513 B |
After Width: | Height: | Size: 842 B |
After Width: | Height: | Size: 992 B |
After Width: | Height: | Size: 808 B |
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 191 B |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 832 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 43 B |
After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 143 B |
After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 141 B |
After Width: | Height: | Size: 158 B |
After Width: | Height: | Size: 748 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 327 B |
After Width: | Height: | Size: 890 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 888 B |
After Width: | Height: | Size: 1.3 KiB |