http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.tenant.mgt/src/main/resources/META-INF/services.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.tenant.mgt/src/main/resources/META-INF/services.xml b/components/org.apache.stratos.tenant.mgt/src/main/resources/META-INF/services.xml deleted file mode 100644 index 512f002..0000000 --- a/components/org.apache.stratos.tenant.mgt/src/main/resources/META-INF/services.xml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - # Licensed to the Apache Software Foundation (ASF) under one - # or more contributor license agreements. See the NOTICE file - # distributed with this work for additional information - # regarding copyright ownership. The ASF licenses this file - # to you under the Apache License, Version 2.0 (the - # "License"); you may not use this file except in compliance - # with the License. You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, - # software distributed under the License is distributed on an - # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - # KIND, either express or implied. See the License for the - # specific language governing permissions and limitations - # under the License. - --> -<serviceGroup> - - <service name="TenantMgtService" scope="transportsession"> - <transports> - <transport>https</transport> - </transports> - <parameter name="ServiceClass" locked="false"> - org.apache.stratos.tenant.mgt.services.TenantSelfRegistrationService - </parameter> - <operation name="registerTenant"> - </operation> - <operation name="checkDomainAvailability"> - </operation> - <operation name="validateOrSuggestDomain"> - </operation> - <operation name="generateRandomCaptcha"> - </operation> - </service> - - <service name="TenantMgtAdminService" scope="transportsession"> - <transports> - <transport>https</transport> - </transports> - <parameter name="ServiceClass" locked="false"> - org.apache.stratos.tenant.mgt.services.TenantMgtAdminService - </parameter> - <operation name="addTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="addSkeletonTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="retrieveTenants"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="retrievePaginatedTenants"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="retrievePartialSearchTenants"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="retrievePaginatedPartialSearchTenants"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="getTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/monitor/tenants</parameter> - </operation> - <operation name="updateTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/modify/tenants</parameter> - </operation> - <operation name="activateTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/modify/tenants</parameter> - </operation> - <operation name="deactivateTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/modify/tenants</parameter> - </operation> - <operation name="deleteTenant"> - <parameter name="superTenantService" locked="true">true</parameter> - <parameter name="AuthorizationAction" locked="true">/permission/protected/manage/modify/tenants</parameter> - </operation> - <parameter name="adminService" locked="true">true</parameter> - </service> - - <service name="GAppTenantRegistrationService"> - <transports> - <transport>https</transport> - </transports> - <schema schemaNamespace="http://org.apache.axis2/xsd" elementFormDefaultQualified="true"/> - <description>Rampart protected service that is used to setup Google Apps domain</description> - <parameter name="ServiceClass">org.apache.stratos.tenant.mgt.services.GAppTenantRegistrationService</parameter> - <parameter name="adminService" locked="true">false</parameter> - - <module ref="rampart"/> - - <wsp:Policy wsu:Id="SigOnly" - xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:InitiatorToken> - <wsp:Policy> - <sp:X509Token - sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> - <wsp:Policy> - <sp:RequireThumbprintReference/> - <sp:WssX509V3Token10/> - </wsp:Policy> - </sp:X509Token> - </wsp:Policy> - </sp:InitiatorToken> - <sp:RecipientToken> - <wsp:Policy> - <sp:X509Token - sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"> - <wsp:Policy> - <sp:RequireThumbprintReference/> - <sp:WssX509V3Token10/> - </wsp:Policy> - </sp:X509Token> - </wsp:Policy> - </sp:RecipientToken> - <sp:AlgorithmSuite> - <wsp:Policy> - <sp:Basic256/> - </wsp:Policy> - </sp:AlgorithmSuite> - <sp:Layout> - <wsp:Policy> - <sp:Strict/> - </wsp:Policy> - </sp:Layout> - <sp:IncludeTimestamp/> - <sp:OnlySignEntireHeadersAndBody/> - </wsp:Policy> - </sp:AsymmetricBinding> - <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <wsp:Policy> - <sp:MustSupportRefKeyIdentifier/> - <sp:MustSupportRefIssuerSerial/> - </wsp:Policy> - </sp:Wss10> - <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> - <sp:Body/> - </sp:SignedParts> - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> - </service> - <parameter name="hiddenService" locked="true">true</parameter> -</serviceGroup>
http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/pom.xml b/components/org.apache.stratos.theme.mgt.ui/pom.xml deleted file mode 100644 index 5edba9b..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/pom.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - ~ - --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>org.apache.stratos</groupId> - <artifactId>stratos-components-parent</artifactId> - <version>4.1.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>org.apache.stratos.theme.mgt.ui</artifactId> - <packaging>bundle</packaging> - <name>Apache Stratos - Theme Configuration User Interface</name> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <extensions>true</extensions> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Name>${project.artifactId}</Bundle-Name> - <Export-Package> - org.apache.stratos.theme.mgt.ui.*, - org.apache.stratos.theme.mgt.ui.processors.*, - </Export-Package> - <Import-Package> - org.wso2.carbon.registry.resource.ui.*, - org.apache.stratos.theme.mgt.ui.servlets.*, - javax.servlet;version="${imp.pkg.version.javax.servlet}", - javax.servlet.http;version="${imp.pkg.version.javax.servlet}", - org.apache.lucene.*, - org.apache.batik.*, - org.apache.stratos.theme.mgt.stub.*; version="${project.version}", - *;resolution:=optional - </Import-Package> - <Carbon-Component>UIBundle</Carbon-Component> - </instructions> - </configuration> - </plugin> - - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.apache.stratos</groupId> - <artifactId>org.apache.stratos.theme.mgt.stub</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.registry.common.ui</artifactId> - <version>${carbon.platform.version}</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.registry.resource.ui</artifactId> - <version>${carbon.platform.version}</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.registry.core</artifactId> - <version>${carbon.platform.version}</version> - </dependency> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - <dependency> - <groupId>org.eclipse.equinox</groupId> - <artifactId>javax.servlet</artifactId> - <scope>provided</scope> - <version>3.0.0.v201112011016</version> - </dependency> - <dependency> - <groupId>org.apache.axis2.wso2</groupId> - <artifactId>axis2</artifactId> - </dependency> - <dependency> - <groupId>org.apache.ws.commons.axiom.wso2</groupId> - <artifactId>axiom</artifactId> - <version>1.2.11.wso2v4</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.ui</artifactId> - <version>${carbon.platform.version}</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.core</artifactId> - <version>${carbon.platform.version}</version> - </dependency> - <!-- dependency> - <groupId>org.apache.batik.wso2</groupId> - <artifactId>batik</artifactId> - </dependency --> - <!--<dependency>--> - <!--<groupId>org.wso2.carbon</groupId>--> - <!--<artifactId>org.wso2.carbon.registry.profiles.ui</artifactId>--> - <!--<version>${registry-component.version}</version>--> - <!--</dependency>--> - <!--<dependency>--> - <!--<groupId>org.wso2.carbon</groupId>--> - <!--<artifactId>org.wso2.carbon.governance.wsdltool.ui</artifactId>--> - <!--<version>${registry-component.version}</version>--> - <!--</dependency>--> - <!--<dependency>--> - <!--<groupId>org.wso2.carbon</groupId>--> - <!--<artifactId>org.wso2.carbon.registry.resource.ui</artifactId>--> - <!--<version>${registry-component.version}</version>--> - <!--</dependency>--> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/clients/ThemeMgtServiceClient.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/clients/ThemeMgtServiceClient.java b/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/clients/ThemeMgtServiceClient.java deleted file mode 100644 index 758598f..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/clients/ThemeMgtServiceClient.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.stratos.theme.mgt.ui.clients; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.Constants; -import org.apache.axis2.client.Options; -import org.apache.axis2.client.ServiceClient; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.axis2.context.MessageContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.CarbonConstants; -import org.wso2.carbon.registry.common.utils.RegistryUtil; -import org.wso2.carbon.registry.core.RegistryConstants; -import org.wso2.carbon.registry.core.exceptions.RegistryException; -import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.CollectionContentBean; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.ContentBean; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.ContentDownloadBean; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.MetadataBean; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.ResourceTreeEntryBean; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.common.xsd.ResourceData; -import org.apache.stratos.theme.mgt.stub.ThemeMgtServiceStub; -import org.wso2.carbon.ui.CarbonUIUtil; -import org.wso2.carbon.utils.ServerConstants; - -import javax.activation.DataHandler; -import javax.servlet.ServletConfig; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -public class ThemeMgtServiceClient { - - private static final Log log = LogFactory.getLog(ThemeMgtServiceClient.class); - - private ThemeMgtServiceStub stub; - private String epr; - - public ThemeMgtServiceClient ( - String cookie, String backendServerURL, ConfigurationContext configContext) - throws RegistryException { - - epr = backendServerURL + "ThemeMgtService"; - - try { - stub = new ThemeMgtServiceStub(configContext, epr); - - ServiceClient client = stub._getServiceClient(); - Options option = client.getOptions(); - option.setManageSession(true); - option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); - - } catch (AxisFault axisFault) { - String msg = "Failed to initiate resource service client. " + axisFault.getMessage(); - log.error(msg, axisFault); - throw new RegistryException(msg, axisFault); - } - } - - - public ThemeMgtServiceClient(String cookie, ServletConfig config, HttpSession session) - throws RegistryException { - - String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session); - ConfigurationContext configContext = (ConfigurationContext) config. - getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - epr = backendServerURL + "ThemeMgtService"; - - try { - stub = new ThemeMgtServiceStub(configContext, epr); - - ServiceClient client = stub._getServiceClient(); - Options option = client.getOptions(); - option.setManageSession(true); - option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); - - } catch (AxisFault axisFault) { - String msg = "Failed to initiate resource service client. " + axisFault.getMessage(); - log.error(msg, axisFault); - throw new RegistryException(msg, axisFault); - } - } - - public ThemeMgtServiceClient(ServletConfig config, HttpSession session) - throws RegistryException { - - String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session); - ConfigurationContext configContext = (ConfigurationContext) config. - getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - epr = backendServerURL + "ThemeMgtService"; - - try { - stub = new ThemeMgtServiceStub(configContext, epr); - - ServiceClient client = stub._getServiceClient(); - Options option = client.getOptions(); - option.setManageSession(true); - option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); - - } catch (AxisFault axisFault) { - String msg = "Failed to initiate resource service client. " + axisFault.getMessage(); - log.error(msg, axisFault); - throw new RegistryException(msg, axisFault); - } - } - - public ResourceTreeEntryBean getResourceTreeEntry(String resourcePath) - throws Exception { - - ResourceTreeEntryBean entryBean = null; - try { - Options options = stub._getServiceClient().getOptions(); - options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); - entryBean = stub.getResourceTreeEntry(resourcePath); - } catch (Exception e) { - String msg = "Failed to get resource tree entry for resource " + - resourcePath + ". " + e.getMessage(); - log.error(msg, e); - throw e; - } - if (entryBean == null) { - throw new ResourceNotFoundException("The resource does not exist"); - } - return entryBean; - } - - public ContentBean getContent(HttpServletRequest request) throws Exception { - - String path = RegistryUtil.getPath(request); - ContentBean bean = null; - try { - bean = stub.getContentBean(path); - } catch (Exception e) { - String msg = "Failed to get content from the resource service. " + - e.getMessage(); - log.error(msg, e); - throw e; - } - - return bean; - } - - - public CollectionContentBean getCollectionContent(HttpServletRequest request) throws Exception { - - String path = RegistryUtil.getPath(request); - CollectionContentBean bean = null; - try { - bean = stub.getCollectionContent(path); - - } catch (Exception e) { - String msg = "Failed to get collection content from the resource service. " + - e.getMessage(); - log.error(msg, e); - throw e; - } - - return bean; - } - - - public ResourceData[] getResourceData(String[] paths) throws Exception { - - ResourceData[] resourceData; - try { - resourceData = stub.getResourceData(paths); - } catch (Exception e) { - String msg = "Failed to get resource data from the resource service. " + - e.getMessage(); - log.error(msg, e); - throw e; - } - - return resourceData; - } - - public String addCollection( - String parentPath, String collectionName, String mediaType, String description) throws Exception { - try { - return stub.addCollection(parentPath, collectionName, mediaType, description); - } catch (Exception e) { - String msg = "Failed to add collection " + collectionName + " for parent path: " + parentPath + ". " + - e.getMessage(); - log.error(msg, e); - throw e; - } - } - - public void addResource(String path, String mediaType, String description, DataHandler content, - String symlinkLocation, String tenantPass) - throws Exception { - - try { - Options options = stub._getServiceClient().getOptions(); - options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); - options.setTimeOutInMilliSeconds(300000); - stub.addResource(path, mediaType, description, content, symlinkLocation, tenantPass); - - } catch (Exception e) { - - String msg = "Failed to add resource " + path + ". " + e.getMessage(); - log.error(msg, e); - throw e; - } - } - - public void importResource( - String parentPath, - String resourceName, - String mediaType, - String description, - String fetchURL, - String symlinkLocation, - boolean isAsync, - String tenantPass) throws Exception { - - try { - // This is used by the add wsdl UI. WSDL validation takes long when there are wsdl - // imports to prevent this we make a async call. - if (isAsync) { - stub._getServiceClient().getOptions().setProperty( - MessageContext.CLIENT_API_NON_BLOCKING,Boolean.TRUE); - } - stub.importResource(parentPath, resourceName, mediaType, description, fetchURL, symlinkLocation, tenantPass); - } catch (Exception e) { - String msg = "Failed to import resource with name " + resourceName + - " to the parent collection " + parentPath + ". " + e.getMessage(); - log.error(msg, e); - throw new RegistryException(msg, e); - } - } - - - public void addTextResource( - String parentPath, - String fileName, - String mediaType, - String description, - String content) throws Exception { - - try { - stub.addTextResource(parentPath, fileName, mediaType, description, content); - } catch (Exception e) { - String msg = "Failed to add new text resource with name " + fileName + - " to the parent collection " + parentPath + ". " + e.getMessage(); - log.error(msg, e); - throw new RegistryException(msg, e); - } - } - - public MetadataBean getMetadata(HttpServletRequest request) throws Exception { - - String path = RegistryUtil.getPath(request); - if (path == null) { - path = getSessionResourcePath(); - if (path == null) { - path = RegistryConstants.ROOT_PATH; - } - - request.setAttribute("path", path); - } - - MetadataBean bean = null; - try { - bean = stub.getMetadata(path); - } catch (Exception e) { - String msg = "Failed to get resource metadata from the resource service. " + - e.getMessage(); - log.error(msg, e); - throw e; - } - - return bean; - } - - public MetadataBean getMetadata(HttpServletRequest request,String root) throws Exception { - - String path = RegistryConstants.ROOT_PATH; - request.setAttribute("path", path); - if (path == null) { - path = getSessionResourcePath(); - if (path == null) { - path = RegistryConstants.ROOT_PATH; - } - } - - MetadataBean bean = null; - try { - bean = stub.getMetadata(path); - } catch (Exception e) { - String msg = "Failed to get resource metadata from the resource service. " + - e.getMessage(); - log.error(msg, e); - throw e; - } - - return bean; - } - - public String getSessionResourcePath() throws Exception { - - String sessionResourcePath; - try { - sessionResourcePath = stub.getSessionResourcePath(); - } catch (Exception e) { - - String msg = "Failed to get the session resource path. " + e.getMessage(); - log.error(msg, e); - throw e; - } - return sessionResourcePath; - } - - - public String getTextContent(HttpServletRequest request) throws Exception { - - String path = RegistryUtil.getPath(request); - - String textContent = null; - try { - textContent = stub.getTextContent(path); - } catch (Exception e) { - - String msg = "Failed get text content of the resource " + - path + ". " + e.getMessage(); - log.error(msg, e); - throw e; - } - return textContent; - } - - public void updateTextContent(String resourcePath, String contentText) throws Exception { - - try { - stub.updateTextContent(resourcePath, contentText); - } catch (Exception e) { - - String msg = "Failed to update text content of the resource " + - resourcePath + ". " + e.getMessage(); - log.error(msg, e); - throw e; - } - } - - public ContentDownloadBean getContentDownloadBean(String path) throws Exception { - - ContentDownloadBean bean = stub.getContentDownloadBean(path); - return bean; - } - - public void renameResource( - String parentPath, String oldResourcePath, String newResourceName) - throws Exception { - - try { - stub.renameResource(parentPath, oldResourcePath, newResourceName); - } catch (Exception e) { - String msg = "Failed to rename resource with name " + oldResourcePath + - " to the new name " + newResourceName + ". " + e.getMessage(); - log.error(msg, e); - throw new RegistryException(msg, e); - } - } - - public void delete(String pathToDelete) throws Exception { - - try { - stub.delete(pathToDelete); - } catch (Exception e) { - String msg = "Failed to delete " + pathToDelete + ". " + e.getMessage(); - log.error(msg, e); - throw e; - } - } - - public String[] getAllPaths() throws Exception { - - try { - return stub.getAllPaths(); - } catch (Exception e) { - String msg = "Failed to getAllPaths. " + e.getMessage(); - log.error(msg, e); - throw e; - } - } - - public String[] getAllThemes(String tenantPass) throws Exception { - try { - return stub.getAllThemes(tenantPass); - } catch (Exception e) { - String msg = "Failed to get All Themes."; - log.error(msg, e); - throw e; - } - } - - public void applyTheme(String themeName, String tenantPass) throws Exception { - try { - stub.applyTheme(themeName, tenantPass); - } catch (Exception e) { - String msg = "Failed to apply the theme: " + themeName; - log.error(msg, e); - throw e; - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/processors/AddThemeResourceProcessor.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/processors/AddThemeResourceProcessor.java b/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/processors/AddThemeResourceProcessor.java deleted file mode 100644 index 4dd68d2..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/processors/AddThemeResourceProcessor.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.theme.mgt.ui.processors; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.CarbonConstants; -import org.wso2.carbon.CarbonException; -import org.wso2.carbon.registry.core.RegistryConstants; -import org.apache.stratos.theme.mgt.ui.clients.ThemeMgtServiceClient; -import org.wso2.carbon.ui.CarbonUIMessage; -import org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor; -import org.wso2.carbon.utils.FileItemData; -import org.wso2.carbon.utils.ServerConstants; - -import javax.activation.DataHandler; -import javax.activation.DataSource; -import javax.imageio.ImageIO; -import javax.mail.util.ByteArrayDataSource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.awt.*; -import java.awt.image.BufferedImage; -import java.io.BufferedInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Map; - - -public class AddThemeResourceProcessor extends AbstractFileUploadExecutor { - - private static final Log log = LogFactory.getLog(AddThemeResourceProcessor.class); - - public boolean execute(HttpServletRequest request, HttpServletResponse response) - throws CarbonException, IOException { - - String webContext = (String) request.getAttribute(CarbonConstants.WEB_CONTEXT); - String serverURL = (String) request.getAttribute(CarbonConstants.SERVER_URL); - String cookie = (String) request.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - // HttpSession session = request.getSession(); - - Map<String, ArrayList<FileItemData>> fileItemsMap = getFileItemsMap(); - if (fileItemsMap == null || fileItemsMap.isEmpty()) { - String msg = "File uploading failed. Content is not set properly."; - log.error(msg); - - CarbonUIMessage.sendCarbonUIMessage(msg, CarbonUIMessage.ERROR, request); - response.sendRedirect( - "../" + webContext + "/admin/error.jsp"); - - return false; - } - - try { - ThemeMgtServiceClient client = - new ThemeMgtServiceClient(cookie, serverURL, configurationContext); - - String parentPath = null; - Map<String, ArrayList<java.lang.String>> formFieldsMap = getFormFieldsMap(); - if (formFieldsMap.get("path") != null) { - parentPath = formFieldsMap.get("path").get(0); - } - String resourceName = null; - if (formFieldsMap.get("filename") != null) { - resourceName = formFieldsMap.get("filename").get(0); - } - String mediaType = null; - if (formFieldsMap.get("mediaType") != null) { - mediaType = formFieldsMap.get("mediaType").get(0); - } - String description = null; - if (formFieldsMap.get("description") != null) { - description = formFieldsMap.get("description").get(0); - } - String symlinkLocation = null; - if (formFieldsMap.get("symlinkLocation") != null) { - symlinkLocation = formFieldsMap.get("symlinkLocation").get(0); - } - String redirectWith = null; - if (formFieldsMap.get("redirectWith") != null) { - redirectWith = formFieldsMap.get("redirectWith").get(0); - } - /* - // currently chroot will not work with multitenancy - IServerAdmin adminClient = - (IServerAdmin) CarbonUIUtil. - getServerProxy(new ServerAdminClient(configurationContext, - serverURL, cookie, session), IServerAdmin.class, session); - ServerData data = adminClient.getServerData(); - String chroot = ""; - if (data.getRegistryType().equals("remote") && data.getRemoteRegistryChroot() != null && - !data.getRemoteRegistryChroot().equals(RegistryConstants.PATH_SEPARATOR)) { - chroot = data.getRemoteRegistryChroot(); - if (!chroot.startsWith(RegistryConstants.PATH_SEPARATOR)) { - chroot = RegistryConstants.PATH_SEPARATOR + chroot; - } - if (chroot.endsWith(RegistryConstants.PATH_SEPARATOR)) { - chroot = chroot.substring(0, chroot.length() - RegistryConstants.PATH_SEPARATOR.length()); - } - } - if (symlinkLocation != null) { - symlinkLocation = chroot + symlinkLocation; - } - */ - - FileItemData fileItemData = fileItemsMap.get("upload").get(0); - - if ((fileItemData == null) || (fileItemData.getFileItem().getSize() == 0)) { - String msg = "Failed add resource. Resource content is empty."; - log.error(msg); - - CarbonUIMessage.sendCarbonUIMessage(msg, CarbonUIMessage.ERROR, request); - response.sendRedirect( - "../" + webContext + "/admin/error.jsp"); - - return false; - } - DataHandler dataHandler = scaleImage(fileItemData.getDataHandler(), 48, 119); - - client.addResource( - calculatePath(parentPath, resourceName), mediaType, description, dataHandler, - symlinkLocation, redirectWith); - - response.setContentType("text/html; charset=utf-8"); - String msg = "The logo has been successfully updated."; - CarbonUIMessage.sendCarbonUIMessage(msg, CarbonUIMessage.INFO, request); - - String redirectTo = request.getParameter("redirectto"); - if ("theme_mgt".equals(redirectTo)) { - response.setHeader("Cache-Control", "no-cache, must-revalidate"); - response.sendRedirect("../" + webContext + - "/tenant-theme/theme_mgt.jsp?logoChanged=true&redirectWith=" + redirectWith); - }else if ("logo_mgt".equals(redirectTo)) { - response.setHeader("Cache-Control", "no-cache, must-revalidate"); - response.sendRedirect("../" + webContext + - "/tenant-theme/logo_mgt.jsp?logoChanged=true&redirectWith=" + redirectWith); - } - else { - response.sendRedirect("../" + webContext + "/tenant-theme/theme_advanced.jsp?path=" + parentPath); - } - return true; - - } catch (Exception e) { - String msg = "File upload failed. Please confirm that the chosen image is not corrupted " + - "and retry uploading, or upload a valid image."; - log.error(msg + " " + e.getMessage()); - - CarbonUIMessage.sendCarbonUIMessage(msg, CarbonUIMessage.ERROR, request); - response.sendRedirect( - "../" + webContext + "/admin/error.jsp"); - - return false; - } - } - - private static DataHandler scaleImage(DataHandler dataHandler, int height, int width) throws IOException { - - Image image = ImageIO.read(new BufferedInputStream(dataHandler.getInputStream())); - // Check if the image has transparent pixels - boolean hasAlpha = ((BufferedImage)image).getColorModel().hasAlpha(); - - // Maintain Aspect ratio - int thumbHeight = height; - int thumbWidth = width; - double thumbRatio = (double)width / (double)height; - double imageRatio = (double)image.getWidth(null) / (double)image.getHeight(null); - if (thumbRatio < imageRatio) { - thumbHeight = (int)(thumbWidth / imageRatio); - } else { - thumbWidth = (int)(thumbHeight * imageRatio); - } - - BufferedImage thumb; - // Check if transparent pixels are available and set the color mode accordingly - if (hasAlpha) { - thumb = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_ARGB); - } else { - thumb = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB); - } - Graphics2D graphics2D = thumb.createGraphics(); - graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, - RenderingHints.VALUE_INTERPOLATION_BILINEAR); - graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null); - - // Save the image as PNG so that transparent images are rendered as intended - ByteArrayOutputStream output = new ByteArrayOutputStream(); - ImageIO.write(thumb, "PNG", output); - - DataSource dataSource= new ByteArrayDataSource(output.toByteArray(), "application/octet-stream"); - return new DataHandler(dataSource); - } - - private static String calculatePath(String parentPath, String resourceName) { - String resourcePath; - if (!parentPath.startsWith(RegistryConstants.PATH_SEPARATOR)) { - parentPath = RegistryConstants.PATH_SEPARATOR + parentPath; - } - if (parentPath.endsWith(RegistryConstants.PATH_SEPARATOR)) { - resourcePath = parentPath + resourceName; - } else { - resourcePath = parentPath + RegistryConstants.PATH_SEPARATOR + resourceName; - } - return resourcePath; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/servlets/ThemeResourceServlet.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/servlets/ThemeResourceServlet.java b/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/servlets/ThemeResourceServlet.java deleted file mode 100644 index c9e674a..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/servlets/ThemeResourceServlet.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.theme.mgt.ui.servlets; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.ContentDownloadBean; -import org.apache.stratos.theme.mgt.ui.clients.ThemeMgtServiceClient; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.InputStream; - -public class ThemeResourceServlet extends HttpServlet { - - private static final Log log = LogFactory.getLog(ThemeResourceServlet.class); - - private ServletConfig servletConfig; - - public void init(ServletConfig servletConfig) throws ServletException { - super.init(servletConfig); - this.servletConfig = servletConfig; - } - - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - - try { - ThemeMgtServiceClient client = new ThemeMgtServiceClient(servletConfig, request.getSession()); - String path = request.getParameter("path"); - String viewImage = request.getParameter("viewImage"); - if (path == null) { - String msg = "Could not get the resource content. Path is not specified."; - log.error(msg); - response.setStatus(400); - return; - } - - ContentDownloadBean bean = client.getContentDownloadBean(path); - - InputStream contentStream = null; - if (bean.getContent() != null) { - contentStream = bean.getContent().getInputStream(); - } else { - String msg = "The resource content was empty."; - log.error(msg); - response.setStatus(204); - return; - } - - response.setDateHeader("Last-Modified", bean.getLastUpdatedTime().getTime().getTime()); - String ext = "jpg"; - if (path.lastIndexOf(".") < path.length() -1 && path.lastIndexOf(".") > 0) { - ext = path.substring(path.lastIndexOf(".") + 1); - } - - if (viewImage != null && viewImage.equals("1")) { - response.setContentType("img/" + ext); - } - else { - if (bean.getMediatype() != null && bean.getMediatype().length() > 0) { - response.setContentType(bean.getMediatype()); - } else { - response.setContentType("application/download"); - } - - if (bean.getResourceName() != null) { - response.setHeader( - "Content-Disposition", "attachment; filename=\"" + bean.getResourceName() + "\""); - } - } - - if (contentStream != null) { - - ServletOutputStream servletOutputStream = null; - try { - servletOutputStream = response.getOutputStream(); - - byte[] contentChunk = new byte[1024]; - int byteCount; - while ((byteCount = contentStream.read(contentChunk)) != -1) { - servletOutputStream.write(contentChunk, 0, byteCount); - } - - response.flushBuffer(); - servletOutputStream.flush(); - - } finally { - contentStream.close(); - - if (servletOutputStream != null) { - servletOutputStream.close(); - } - } - } - } catch (Exception e) { - - String msg = "Failed to get resource content. " + e.getMessage(); - log.error(msg, e); - response.setStatus(500); - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/utils/ThemeUtil.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/utils/ThemeUtil.java b/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/utils/ThemeUtil.java deleted file mode 100644 index b1072fa..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/java/org/apache/stratos/theme/mgt/ui/utils/ThemeUtil.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.theme.mgt.ui.utils; - -import org.wso2.carbon.registry.core.RegistryConstants; -import org.wso2.carbon.ui.CarbonUIUtil; -import org.wso2.carbon.registry.core.utils.UUIDGenerator; -import org.wso2.carbon.utils.multitenancy.MultitenantConstants; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import javax.servlet.ServletConfig; - -public class ThemeUtil { - public static String getThemeResourceDownloadURL(String path) { - return "../../registry/themeResourceContent?path=" + path; - } - - public static String getThemeResourceViewAsImageURL(String path) { - return "../../registry/themeResourceContent?path=" + path - + "&viewImage=1"; - } - - public static String getThumbUrl(HttpServletRequest request, String themeName) { - String serverURL = CarbonUIUtil.getAdminConsoleURL(request); - String serverRoot = serverURL.substring(0, serverURL.length() - - "carbon/".length()); - return serverRoot + "registry/resource" - + RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH - + "/repository/components/org.wso2.carbon.all-themes/" - + themeName + "/thumb.png"; - } - - public static String getLogoURL(ServletConfig config, HttpSession session) { - // this is to avoid the caching problem - String randomUUID = UUIDGenerator.generateUUID(); - String serverURL = CarbonUIUtil.getServerURL( - config.getServletContext(), session); - String serverRoot = serverURL.substring(0, serverURL.length() - "services/".length()); - String tenantDomain = (String) session - .getAttribute(MultitenantConstants.TENANT_DOMAIN); - if (tenantDomain == null) { - return ""; - } - - // Using relative path instead of the back-end server url. - return "../../../../t/" + tenantDomain + "/registry/resource" - + RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH - + "/repository/theme/admin/logo.gif?thatsrnd=" + randomUUID; - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/META-INF/component.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/META-INF/component.xml b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/META-INF/component.xml deleted file mode 100644 index f28ba4b..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/META-INF/component.xml +++ /dev/null @@ -1,69 +0,0 @@ -<!-- - # Licensed to the Apache Software Foundation (ASF) under one - # or more contributor license agreements. See the NOTICE file - # distributed with this work for additional information - # regarding copyright ownership. The ASF licenses this file - # to you under the Apache License, Version 2.0 (the - # "License"); you may not use this file except in compliance - # with the License. You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, - # software distributed under the License is distributed on an - # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - # KIND, either express or implied. See the License for the - # specific language governing permissions and limitations - # under the License. - --> -<component xmlns="http://products.wso2.org/carbon"> - <!-- sample menu configuration --> - <menus> - <menu> - <id>mt_theme_mgt_menu</id> - <i18n-key>theme.management</i18n-key> - <i18n-bundle>org.apache.stratos.theme.mgt.ui.i18n.Resources</i18n-bundle> - <parent-menu>configure_menu</parent-menu> - <link>../tenant-theme/theme_mgt.jsp</link> - <region>region1</region> - <icon>../tenant-theme/images/thememgt.gif</icon> - <order>41</order> - <style-class>home</style-class> - <require-permission>/permission/admin/configure/theme</require-permission> - <require-not-super-tenant>true</require-not-super-tenant> - </menu> - <menu> - <id>mt_logo_mgt_menu</id> - <i18n-key>logo.management</i18n-key> - <i18n-bundle>org.apache.stratos.theme.mgt.ui.i18n.Resources</i18n-bundle> - <parent-menu>configure_menu</parent-menu> - <link>../tenant-theme/logo_mgt.jsp</link> - <region>region1</region> - <icon>../tenant-theme/images/logomgt.gif</icon> - <order>42</order> - <style-class>home</style-class> - <require-permission>/permission/admin/configure/theme</require-permission> - <require-not-super-tenant>true</require-not-super-tenant> - </menu> - </menus> - - - <FileUploadConfig> - <Mapping> - <Actions> - <Action>themeResource</Action> - </Actions> - <Class>org.apache.stratos.theme.mgt.ui.processors.AddThemeResourceProcessor</Class> - </Mapping> - </FileUploadConfig> - - <servlets> - <servlet id="testthemeservlet"> - <servlet-name>ThemeResourceContentServlet</servlet-name> - <url-pattern>/registry/themeResourceContent</url-pattern> - <display-name>Theme Resource Content Servlet</display-name> - - <servlet-class>org.apache.stratos.theme.mgt.ui.servlets.ThemeResourceServlet</servlet-class> - </servlet> - </servlets> -</component> http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/JSResources.properties ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/JSResources.properties b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/JSResources.properties deleted file mode 100644 index e80c6bb..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/JSResources.properties +++ /dev/null @@ -1,23 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -password.mismatched=Passwords do not match. -current.password.should.provided=You should provide the current password inorder to change the password. http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/Resources.properties ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/Resources.properties b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/Resources.properties deleted file mode 100644 index 2199332..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/org/apache/stratos/theme/mgt/ui/i18n/Resources.properties +++ /dev/null @@ -1,72 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -submit.tenant=Submit Tenant -domain=Domain -domain.information=Domain Information -contact.details=Contact Details -admin.username=Admin Username -current.admin.password=Current Admin Password -new.admin.password=New Admin Password -new.admin.password.repeat=New Admin Password (Repeat) -admin.password=Admin Password -admin.password.repeat=Admin Password (Repeat) -govern.add_tenants.menu=Add New Tenant -govern.view_tenants.menu=View Tenants -overview=Overview -tenants.list=Tenants List -company.organization=Company/Organization -admin.contact=Admin Contact -edit=Edit -multitenancy=Multitenancy -added.successfully=You have successfully added a new tenant with domain: -updated.successfully=You have successfully updated the tenant with domain: -update.added.tenant=Update the just added/updated tenant -update.tenant=Update Tenant -add.new.tenant=Add a new tenant -register.new.organization=Register A New Organization -view.all.tenants=View all tenants -tenant.admin=Tenant Admin -tenant.description=Tenant Description -admin.fullname=Full Name -admin.address=Address -admin.email=Email -admin.telephone=Telephone -admin.im=IM -admin.url=URL -self.registration=Registry Tenant -gaas=GaaS -gaas.register.a.new.tenant=Register A New Tenant -active=Active -theme.management=Theme -word.verification=Word Verification -captcha.message=Type the characters you see in the picture below. -add.image=Add an Image -image.path.help.text=Give the path of a file to fetch a image (bmp,gif,jpg,png) -image.url.help.text=Give the full url of the resource to fetch a image from URL (bmp,gif,jpg,png) -upload.image.from.file=Upload an image from a file -import.image.from.url=Import an image from a URL -update.logo.image.from.file=Update the logo image from a file -update.logo.image.from.url=Update the logo image from a URL -method=Method -logo.management=Logo Management -change.the.logo=Change the Logo -wait.message=Process may take some time. Please wait.. http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_collection_ajaxprocessor.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_collection_ajaxprocessor.jsp b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_collection_ajaxprocessor.jsp deleted file mode 100644 index 406ef5d..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_collection_ajaxprocessor.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --%> -<%@ page import="org.apache.stratos.theme.mgt.ui.clients.ThemeMgtServiceClient" %> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.wso2.carbon.registry.common.ui.UIException" %> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - String errorMessage = null; - try { - - String parentPath = request.getParameter("parentPath"); - String collectionName = request.getParameter("collectionName"); - String mediaType = request.getParameter("mediaType"); - String description = request.getParameter("description"); - - String cookie = (String) request. - getSession().getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - - try { - ThemeMgtServiceClient client = new ThemeMgtServiceClient(cookie, config, session); - client.addCollection(parentPath, collectionName, mediaType, description); - } catch (Exception e) { - String msg = "Failed to add new collection " + collectionName + - " to the parent collection " + parentPath + ". " + e.getMessage(); - throw new UIException(msg, e); - } - - } catch (Exception e) { - errorMessage = e.getMessage(); - response.setStatus(500); - out.write(errorMessage); - return; - } -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_text_resource_ajaxprocessor.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_text_resource_ajaxprocessor.jsp b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_text_resource_ajaxprocessor.jsp deleted file mode 100644 index 7974ce1..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/add_text_resource_ajaxprocessor.jsp +++ /dev/null @@ -1,58 +0,0 @@ -<%-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --%> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.wso2.carbon.registry.common.ui.UIException" %> -<%@ page import="org.apache.stratos.theme.mgt.ui.clients.ThemeMgtServiceClient" %> -<%@ page import="org.wso2.carbon.registry.resource.ui.processors.AddTextResourceProcessor" %> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - String errorMessage = null; - try { - - String parentPath = request.getParameter("parentPath"); - String fileName = request.getParameter("fileName"); - String mediaType = request.getParameter("mediaType"); - String description = request.getParameter("description"); - String content = request.getParameter("content"); - - String cookie = (String) request. - getSession().getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - - try { - ThemeMgtServiceClient client = - new ThemeMgtServiceClient(cookie, config, request.getSession()); - client.addTextResource(parentPath, fileName, mediaType, description, content); - } catch (Exception e) { - String msg = "Failed to add new text resource " + fileName + - " to the parent collection " + parentPath + ". " + e.getMessage(); - throw new UIException(msg, e); - } - - } catch (Exception e) { - errorMessage = e.getMessage(); - } -%> - -<% if (errorMessage != null) { %> - -<script type="text/javascript"> - location.href='../error.jsp?errorMsg=<%=errorMessage%>' -</script> - -<% } %> http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/content_ajaxprocessor.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/content_ajaxprocessor.jsp b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/content_ajaxprocessor.jsp deleted file mode 100644 index 6f600c4..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/content_ajaxprocessor.jsp +++ /dev/null @@ -1,242 +0,0 @@ -<%-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --%> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<%@ page import="org.apache.stratos.theme.mgt.stub.registry.resource.stub.beans.xsd.ContentBean" %> -<%@ page import="org.wso2.carbon.registry.resource.ui.Utils" %> -<%@ page import="org.wso2.carbon.registry.resource.ui.clients.CustomUIHandler" %> -<%@ page import="org.apache.stratos.theme.mgt.ui.clients.ThemeMgtServiceClient" %> -<%@ page import="org.apache.stratos.theme.mgt.ui.utils.ThemeUtil" %> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<fmt:bundle basename="org.wso2.carbon.registry.resource.ui.i18n.Resources"> - - <% - String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - String viewMode = Utils.getResourceViewMode(request); - boolean isInlinedView = "inlined".equals(viewMode); - ContentBean cb; - ThemeMgtServiceClient client; - - - try { - client = new ThemeMgtServiceClient(cookie, config, session); - cb = client.getContent(request); - } catch (Exception e) { - %> - <jsp:forward page="../admin/error.jsp?<%=e.getMessage()%>"/> - <% - return; - } - - String cuiURL = CustomUIHandler.getCustomViewUI(cb.getMediaType(), request.getSession()); - String mode = request.getParameter("mode"); - boolean cui = false; - if (cuiURL != null && !"standard".equals(mode)) { - cui = true; - } -if(!cb.getAbsent().equals("true")){ - %> - - <div class="box1-head"> - <table cellspacing="0" cellpadding="0" border="0" style="width:100%"> - <tr> - <td valign="top"> - <h2 class="sub-headding-entries"><%if (cb.getCollection()) { %> - <fmt:message key="entries"/> <% } else { %> - <fmt:message key="content"/> <% } %></h2> - </td> - <td align="right" valign="top" class="expanIconCell"> - - <a onclick="javascript: showHideCommon('entriesIconExpanded');showHideCommon('entriesIconMinimized');showHideCommon('entriesExpanded');showHideCommon('entriesMinimized');"> - <img src="../resources/images/icon-expanded.gif" border="0" align="top" - id="entriesIconExpanded"/> - <img src="../resources/images/icon-minimized.gif" border="0" align="top" - id="entriesIconMinimized" style="display:none;"/> - </a> - - - </td> - - </tr> - </table> - </div> - <div class="box1-mid-fill" id="entriesMinimized" style="display:none"></div> - <div class="box1-mid" id="entriesExpanded"> - <% - if (!isInlinedView) { - %> - - <% if (cb.getCollection() && cb.getPutAllowed() && !cb.getVersionView() && cb.getLoggedIn() && !cui) { %> - -<fmt:bundle basename="org.apache.stratos.theme.mgt.ui.i18n.Resources"> - <div style="display:block;height:30px;"> - <a class="add-resource-icon-link" - onclick="showHide('add-resource-div');resetThemeResourceForms()"><fmt:message - key="add.image"/></a> - </div> - -</fmt:bundle> - <div style="display:block;height:30px;"> - <a class="add-collection-icon-link" - onclick="javascript: showHide('add-folder-div');expandIfNot('entries');if($('add-folder-div').style.display!='none')$('collectionName').focus();"> - <fmt:message key="add.collection"/></a> - </div> - <% } - }%> - - <!-- all the content goes here --> - <% if (cui) { %> - <a onclick="viewStandardThemeContentSection('<%=cb.getPathWithVersion()%>')">Standard - view</a><br/> - - <div id="customViewUIDiv"> - <jsp:include page="<%=cuiURL%>"/> - </div> - <% - } else { - - if (cuiURL != null) { - %> - <a onclick="refreshThemeContentSection('<%=cb.getPathWithVersion()%>')"><fmt:message - key="custom.view"/></a><br/> - <% - } - boolean isImage = false; - String contentPathLower = (cb.getContentPath() == null)? "" : cb.getContentPath().toLowerCase(); - String[] expectedImageExts = {".jpg", ".jpeg", ".png", ".gif"}; - - for (String ext: expectedImageExts) { - if (contentPathLower.endsWith(ext)) { - isImage = true; - break; - } - } - if (cb.getCollection()) { - %> - - <jsp:include page="raw-collection-content.jsp"/> - - <% } else if(isImage) { - %> - - <table style="*width:340px !important;"> - <tr> - <!--<td> - <a onclick="displayThemeContentAsText('<%=cb.getPathWithVersion()%>')" class="icon-link" style="background-image:url(../admin/images/view.gif);"><fmt:message - key="display.as.text"/></a> - </td> - <% if (cb.getPutAllowed() && !cb.getVersionView()) { %> - <td style="vertical-align:middle;padding-left:5px;">|</td> - <td> - <a onclick="displayEditThemeContentAsText('<%=cb.getPathWithVersion()%>')" class="icon-link" style="background-image:url(../admin/images/edit.gif);"><fmt:message - key="edit.as.text"/></a> - </td> - <% } %> - <td style="vertical-align:middle;padding-left:5px;">|</td> --> - <td> - <% - String path; - if (cb.getRealPath() != null) { - path = cb.getRealPath(); - } else { - path = cb.getPathWithVersion(); - } - if (path.startsWith("http")) { - %> - <a class="icon-link" style="background-image:url(../resources/images/icon-download.jpg);" - href="<%=path%>" - target="_blank"><fmt:message key="download"/></a> - <% - } else { - %> - <a class="icon-link" style="background-image:url(../resources/images/icon-download.jpg);" - href="<%=ThemeUtil.getThemeResourceDownloadURL(path)%>" - target="_blank"><fmt:message key="download"/></a> - <% } - %> - </td> - </tr> - </table> - <br/> - <br/> - - <div id="generalContentDiv" style="display:block;"> - <% - String imageViewLink = path; - if (!path.startsWith("http")) { - imageViewLink = ThemeUtil.getThemeResourceViewAsImageURL(path); - } - %> - <img src="<%=imageViewLink%>" alt="The Image for <%=path%>"/> - </div> - - <% } else { - %> - - <table style="*width:340px !important;"> - <tr> - <td> - <a onclick="displayThemeContentAsText('<%=cb.getPathWithVersion()%>')" class="icon-link" style="background-image:url(../admin/images/view.gif);"><fmt:message - key="display.as.text"/></a> - </td> - <% if (cb.getPutAllowed() && !cb.getVersionView()) { %> - <td style="vertical-align:middle;padding-left:5px;">|</td> - <td> - <a onclick="displayEditThemeContentAsText('<%=cb.getPathWithVersion()%>')" class="icon-link" style="background-image:url(../admin/images/edit.gif);"><fmt:message - key="edit.as.text"/></a> - </td> - <% } %> - <td style="vertical-align:middle;padding-left:5px;">|</td> - <td> - <% - String path; - if (cb.getRealPath() != null) { - path = cb.getRealPath(); - } else { - path = cb.getPathWithVersion(); - } - if (path.startsWith("http")) { - %> - <a class="icon-link" style="background-image:url(../resources/images/icon-download.jpg);" - href="<%=path%>" - target="_blank"><fmt:message key="download"/></a> - <% - } else { - %> - <a class="icon-link" style="background-image:url(../resources/images/icon-download.jpg);" - href="<%=ThemeUtil.getThemeResourceDownloadURL(path)%>" - target="_blank"><fmt:message key="download"/></a> - <% } - %> - </td> - </tr> - </table> - <br/> - <br/> - - <div id="generalContentDiv" style="display:none;"> - </div> - - <% } - } %> - - </div> - <%}%> -</fmt:bundle> http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css-editor.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css-editor.jsp b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css-editor.jsp deleted file mode 100644 index a6b5e24..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css-editor.jsp +++ /dev/null @@ -1,59 +0,0 @@ - <%-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --%> -<%@ page import="org.apache.stratos.theme.mgt.ui.clients.ThemeMgtServiceClient" %> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<% - java.lang.String[] imagePaths = {"test1", "test2"}; - - String cookie = (String) request. - getSession().getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - - try { - ThemeMgtServiceClient client = - new ThemeMgtServiceClient(cookie, config, request.getSession()); - imagePaths = client.getAllPaths(); - - - } catch (Exception e) { - String type = "resource"; - response.setStatus(500); - out.write("Fail to get image paths"); - return; - } -%> -<script type="text/javascript"> - var imagePaths = new Array(); - <% - for(int i=0;i<imagePaths.length;i++){ - %> - imagePaths.push("<%=imagePaths[i]%>"); - <% - } %> -</script> - -<div class="box1-head"> -</div> -<div class="box1-mid"> - <div id="cssEditorDiv"> - <script type="text/javascript"> - cssEditorDisplay("/main.css", "cssEditorDiv",imagePaths); - </script> - </div> -</div> http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/loginpage.css ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/loginpage.css b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/loginpage.css deleted file mode 100644 index 6db0699..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/loginpage.css +++ /dev/null @@ -1,131 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -.gou-page{ - background-image: url(../images/page-back.jpg); - background-position: 0px 0px; - background-repeat:repeat-x; - background-color:#5b4e17; -} -.gou-header{ - background-image: url(../images/header.jpg); - background-position: top right; - background-repeat:no-repeat; -} -.gou-logo{ - background-image: url(../images/logo.jpg); - background-position: top right; - background-repeat:no-repeat; - width:387px; - height:89px; -} -.gou-page-sizer{ - width:100%; -} -.gou-content{ - background-image: url(../images/content-back.jpg); - background-position: 0px 0px; - background-repeat:repeat-x; - background-color:#ffffff; - border:solid 1px #eafde6; - margin-left:10px; - margin-right:10px; -} -.gou-content-img{ - background-image: url(../images/content-back-left.jpg); - background-position: 0px 0px; - background-repeat:no-repeat; - padding-top:20px; - padding-left:20px; - padding-right:20px; - padding-bottom:20px; - -} -.gou-footer{ - background-image: url(../images/footer.jpg); - background-position: 0px 0px; - background-repeat:repeat-x; - border-bottom:solid 1px #eafde6; - height:42px; - color:#ffffff; - font-size:10px; - line-height:40px; - padding-left:10px; -} -.gou-input-text{ - height:18px; - font-size:10.5px; - border:solid 1px #cccccc; - width:200px; -} -.gou-input-button{ - background-image: url(../images/button-back.gif); - background-position: 0px 0px; - background-repeat:repeat-x; - height:22px; - color:#ffffff; - background-color:#515151; -} -.gou-content-box{ - padding:15px; - background-color:#ffffff; - border:solid 1px #4f301c; - margin-right:20px; -} -.gou-h1,.gou-h1 a{ - font-size:16px; - font-weight:bold; - color:#ffffff; -} -.gou-content-text{ - font-size:11px; - color:#636363; -} -body, td, th,h1, h2, div{ - font-family:Helvetica,Arial,Sans-serif; - font-size:11px; - padding:0px; - margin:0px; -} -.gou-login-table td{ - padding-right:20px; - padding-top:10px; -} -.gou-form-label{ - font-color:#3b3b3b; - font-size:12px; -} -.gou-sign-in{ - padding-left:5px; - color:#1b676b; - height:40px; - text-decoration:none; -} -.gou-links-table img{ - border: none; -} -.gou-links-table td{ - padding-bottom:20px; - padding-left:20px; -} -.gou-links-table a{ - text-decoration:none; -} http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenant.css ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenant.css b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenant.css deleted file mode 100644 index 9eb7f8e..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenant.css +++ /dev/null @@ -1,95 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/*css editor styles */ -.csseditor-top-line{ - background-color:black; - height:5px; -} -.csseditor-leftbox{ - background-color:#e6e6e6; - padding-left:5px; - padding-right:5px; - padding-bottom:5px; - padding-top:15px; - height:380px; -} -.csseditor-leftbox-top{ - color:#000000; - font-size:18px; - height:30px; -} -.csseditor-textbox{ - background-color:#dfe7ed; - border:solid 1px #ffffff; - width:100%; -} -.csseditor-rightbox{ - background-color:#f3f3f3; - border:solid 1px #ffffff; - height:400px; -} -.csseditor-rightbox-title{ - background-color:#9a9a9a; - height:25px; - color:#ffffff; - padding-left:10px; - padding-top:5px; -} -.csseditor-searchbox{ - padding-left:10px; - padding-top:10px; -} -.csseditor-right{ - width:320px; -} -#flickr_results{ - height:210px; - overflow-y:auto; - overflow-x:hidden; - margin-left:5px; - margin-right:5px; - border:solid 1px #ffffff; -} -.flicker_selected{ - height:20px; - border:solid 1px #cccccc; - background-color:#ffffff; - color:#333333; - padding:5px; - margin-top:5px; - margin-bottom:5px; -} -.imageList{ -} -.imageList li { - padding-top: 3px !important; - padding-left: 5px !important; - background-color: #e1e9ec; - border: solid 1px #b5bdc1; -} - -.imageList li a { - background-image: url(../images/images.gif); - background-repeat: no-repeat; - padding-left: 20px; - text-indent: 50px; -} http://git-wip-us.apache.org/repos/asf/stratos/blob/ee5e9639/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenent-theme.css ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenent-theme.css b/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenent-theme.css deleted file mode 100644 index 0b9791a..0000000 --- a/components/org.apache.stratos.theme.mgt.ui/src/main/resources/web/tenant-theme/css/tenent-theme.css +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -.sel-box{ - background-image:url(../images/sel-02.jpg); - background-repeat:repeat-x; - background-position:0 0; - background-color:#f2f2f2; - border: inset 2px #48657a; - padding:3px; - float:left; - margin-right:20px; - margin-bottom:20px; -} -.sel-box span{ - color:#1c475f; - font-weight:bold; - text-align:center; - font-size:14px; - line-height:30px; -} -.nor-box{ - background-color:#ffffff; - border: solid 1px #7699b3; - padding:3px; - float:left; - margin-right:20px; - margin-bottom:20px; -} -.nor-box span{ - color:#1c475f; - font-weight:bold; - text-align:center; - line-height:30px; -}
