You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/12 09:53:04 UTC

[11/18] applying 0001-Refactor-throttling-module.patch

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/carbon.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/carbon.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/carbon.xml
new file mode 100644
index 0000000..c176c75
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/carbon.xml
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ 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.
+  -->
+
+<!--
+    This is the main server configuration file
+    
+    ${carbon.home} represents the carbon.home system property.
+    Other system properties can be specified in a similar manner.
+-->
+<Server xmlns="http://wso2.org/projects/carbon/carbon.xml">
+
+    <!--
+       Product Name
+    -->
+    <Name>${product.name}</Name>
+
+    <!--
+       Product Version
+    -->
+    <Version>${product.version}</Version>
+
+    <!--
+       The fully qualified name of the server
+    -->
+    <Package>org.wso2.carbon</Package>
+
+    <!--
+    Webapp context root of WSO2 Carbon. If Carbon is to be deployed on a different context,
+    the carbon webapp directory has to be renamed, and this entry has to be changed to have the
+    same name as the renamed carbon webapp directory.
+    -->
+    <WebContextRoot>/</WebContextRoot>
+
+    <!--
+     The URL of the back end server. This is where the admin services are hosted and
+     will be used by the clients in the front end server.
+     This is required only for the Front-end server. This is used when seperating BE server from FE server
+    -->
+    <ServerURL>https://${carbon.local.ip}:${carbon.management.port}${carbon.context}/services/</ServerURL>
+
+
+    <!-- In-order to  get the registry http Port from the back-end when the default http transport is not the same-->
+    <!--RegistryHttpPort>9763</RegistryHttpPort-->
+
+    <!--
+    Number of items to be displayed on a management console page. This is used at the
+    backend server for pagination of various items.
+    -->
+    <ItemsPerPage>15</ItemsPerPage>
+
+    <!--
+       Host name or IP address of the machine hosting this server
+       e.g. www.wso2.org, 192.168.1.10
+       This is will become part of the End Point Reference of the
+       services deployed on this server instance.
+    -->
+
+    <!--HostName>www.wso2.org</HostName-->
+
+    <!--
+     The URL of the index page. This is where the user will be redirected after signing in to the
+     carbon server.
+    -->
+    <!--IndexPageURL>/carbon/admin/index.jsp</IndexPageURL-->
+
+    <!-- HTTP and HTTPS ports when apache is fronted to a carbon server-->
+    <!--ApacheHttpPort>80</ApacheHttpPort>
+    <ApacheHttpsPort>443</ApacheHttpsPort-->
+
+    <!--
+       Ports used by this server
+    -->
+    <Ports>
+        <!--
+           The JMX Port
+        -->
+        <!--
+        <JMX>9999</JMX>
+         -->
+    </Ports>
+
+    <!--
+    Axis2 related configurations
+    -->
+    <Axis2Config>
+        <!--
+             Location of the Axis2 Services & Modules repository
+
+             This can be a directory in the local file system, or a URL.
+
+             e.g.
+             1. /home/wso2wsas/repository/ - An absolute path
+             2. repository - In this case, the path is relative to CARBON_HOME
+             3. file:///home/wso2wsas/repository/
+             4. http://wso2wsas/repository/
+        -->
+        <RepositoryLocation>${carbon.home}/repository/deployment/server/</RepositoryLocation>
+
+        <!--
+            Location of the main Axis2 configuration descriptor file, a.k.a. axis2.xml file
+
+            This can be a file on the local file system, or a URL
+
+            e.g.
+            1. /home/repository/axis2.xml - An absolute path
+            2. conf/axis2.xml - In this case, the path is relative to CARBON_HOME
+            3. file:///home/carbon/repository/axis2.xml
+            4. http://repository/conf/axis2.xml
+        -->
+        <ConfigurationFile>${carbon.home}/repository/conf/axis2.xml</ConfigurationFile>
+
+        <!--
+          ServiceGroupContextIdleTime, which will be set in ConfigurationContex
+          for multiple clients which are going to access the same ServiceGroupContext
+          Default Value is 30 Sec.
+        -->
+        <ServiceGroupContextIdleTime>30000</ServiceGroupContextIdleTime>
+
+        <!--
+          This repository location is used to crete the client side configuration
+          context used by the server when calling admin services.
+        -->
+        <ClientRepositoryLocation>${carbon.home}/repository/deployment/client/</ClientRepositoryLocation>
+        <!-- This axis2 xml is used in createing the configuration context by the FE server
+         calling to BE server -->
+        <clientAxis2XmlLocation>${carbon.home}/repository/conf/axis2_client.xml</clientAxis2XmlLocation>
+    </Axis2Config>
+
+    <!--
+       The default user roles which will be created when the server
+       is started up for the first time.
+    -->
+    <ServiceUserRoles>
+        <Role>
+            <Name>admin</Name>
+            <Description>Default Administrator Role</Description>
+        </Role>
+        <Role>
+            <Name>user</Name>
+            <Description>Default User Role</Description>
+        </Role>
+    </ServiceUserRoles>
+
+    <!--
+      Security configurations
+    -->
+    <Security>
+        <!--
+            KeyStore which will be used for encrypting/decrypting passwords
+            and other sensitive information.
+        -->
+        <KeyStore>
+            <!-- Keystore file location-->
+            <Location>${carbon.home}/resources/security/wso2carbon.jks</Location>
+            <!-- Keystore type (JKS/PKCS12 etc.)-->
+            <Type>JKS</Type>
+            <!-- Keystore password-->
+            <Password>wso2carbon</Password>
+            <!-- Private Key alias-->
+            <KeyAlias>wso2carbon</KeyAlias>
+            <!-- Private Key password-->
+            <KeyPassword>wso2carbon</KeyPassword>
+        </KeyStore>
+
+        <!--
+           The directory under which all other KeyStore files will be stored
+        -->
+        <KeyStoresDir>${carbon.home}/repository/conf/keystores</KeyStoresDir>
+    </Security>
+
+    <!--
+       The temporary work directory
+    -->
+    <WorkDirectory>${carbon.home}/tmp/work</WorkDirectory>
+
+    <!--
+       House-keeping configuration
+    -->
+    <HouseKeeping>
+
+        <!--
+           true  - Start House-keeping thread on server startup
+           false - Do not start House-keeping thread on server startup.
+                   The user will run it manually as and when he wishes.
+        -->
+        <AutoStart>true</AutoStart>
+
+        <!--
+           The interval in *minutes*, between house-keeping runs
+        -->
+        <Interval>10</Interval>
+
+        <!--
+          The maximum time in *minutes*, temp files are allowed to live
+          in the system. Files/directories which were modified more than
+          "MaxTempFileLifetime" minutes ago will be removed by the
+          house-keeping task
+        -->
+        <MaxTempFileLifetime>30</MaxTempFileLifetime>
+    </HouseKeeping>
+
+    <!--
+       Configuration for handling different types of file upload.
+
+       To map all actions to a particular FileUploadExecutor, use
+       <Action>*</Action>
+    -->
+    <FileUploadConfig>
+        <Mapping>
+            <Actions>
+                <Action>keystore</Action>
+                <Action>certificate</Action>
+                <Action>*</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor</Class>
+        </Mapping>
+
+        <Mapping>
+            <Actions>
+                <Action>jarZip</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor</Class>
+        </Mapping>
+        <Mapping>
+            <Actions>
+                <Action>dbs</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor</Class>
+        </Mapping>
+        <Mapping>
+            <Actions>
+                <Action>tools</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor</Class>
+        </Mapping>
+        <Mapping>
+            <Actions>
+                <Action>toolsAny</Action>
+            </Actions>
+            <Class>org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor</Class>
+        </Mapping>
+    </FileUploadConfig>
+
+    <!--
+       Processors which process special HTTP GET requests such as ?wsdl, ?policy etc.
+
+       In order to plug in a processor to handle a special request, simply add an entry to this
+       section.
+
+       The value of the Item element is the first parameter in the query string(e.g. ?wsdl)
+       which needs special processing
+       
+       The value of the Class element is a class which implements
+       org.wso2.carbon.transport.HttpGetRequestProcessor
+    -->
+    <HttpGetRequestProcessors>
+        <Processor>
+            <Item>info</Item>
+            <Class>org.wso2.carbon.core.transports.util.InfoProcessor</Class>
+        </Processor>
+        <Processor>
+            <Item>wsdl</Item>
+            <Class>org.wso2.carbon.core.transports.util.Wsdl11Processor</Class>
+        </Processor>
+        <Processor>
+            <Item>wsdl2</Item>
+            <Class>org.wso2.carbon.core.transports.util.Wsdl20Processor</Class>
+        </Processor>
+        <Processor>
+            <Item>xsd</Item>
+            <Class>org.wso2.carbon.core.transports.util.XsdProcessor</Class>
+        </Processor>
+    </HttpGetRequestProcessors>
+
+    <!--
+    Server intializing code, specified as implementation classes of org.wso2.carbon.core.ServerInitializer.
+    This code will be run when the Carbon server is initialized
+    -->
+    <ServerInitializers>
+        <!--<Initializer></Initializer>-->
+    </ServerInitializers>
+    
+    <!--
+    Un-comment the following block to enable token based authenticator.
+    The priority of the default authenticator is 5 - to supersede that, you need to have higher priority level.
+    -->
+    <!-- Authenticators>
+		<TokenUIAuthenticator>
+			<Priority>20</Priority>
+		</TokenUIAuthenticator>
+	</Authenticators -->
+
+    <!--
+    @deprecated Use the registry.xml file to configure the Registry.
+    -->
+    <Registry/>
+
+    <!--
+    Indicates whether the Carbon Servlet is required by the system, and whether it should be
+    registered
+    -->
+    <RequireCarbonServlet>${require.carbon.servlet}</RequireCarbonServlet>
+
+    <!--
+    Carbon H2 OSGI Configuration
+    By default non of the servers start.
+        name="web" - Start the web server with the H2 Console
+        name="webPort" - The port (default: 8082)
+        name="webAllowOthers" - Allow other computers to connect
+        name="webSSL" - Use encrypted (HTTPS) connections
+        name="tcp" - Start the TCP server
+        name="tcpPort" - The port (default: 9092)
+        name="tcpAllowOthers" - Allow other computers to connect
+        name="tcpSSL" - Use encrypted (SSL) connections
+        name="pg" - Start the PG server
+        name="pgPort"  - The port (default: 5435)
+        name="pgAllowOthers"  - Allow other computers to connect
+        name="trace" - Print additional trace information; for all servers
+        name="baseDir" - The base directory for H2 databases; for all servers  
+    -->
+    <!--H2DatabaseConfiguration>
+        <property name="web" />
+        <property name="webPort">8082</property>
+        <property name="webAllowOthers" />
+        <property name="webSSL" />
+        <property name="tcp" />
+        <property name="tcpPort">9092</property>
+        <property name="tcpAllowOthers" />
+        <property name="tcpSSL" />
+        <property name="pg" />
+        <property name="pgPort">5435</property>
+        <property name="pgAllowOthers" />
+        <property name="trace" />
+        <property name="baseDir">${carbon.home}</property>
+    </H2DatabaseConfiguration-->
+</Server>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/cipher-text.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/cipher-text.properties b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/cipher-text.properties
new file mode 100644
index 0000000..9432376
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/cipher-text.properties
@@ -0,0 +1,8 @@
+#aliases=testpass
+#
+## configuration  per each plaintext
+#testpass.secret=LxtcBuAfwazeX3Fk1kFHe9CvL6T3XaVAuh79ZpkJY5yeDAdfqmrVgq3HWNrLrWp4YLDUlhDP8VI0e/HMykul6yyuXa7YrZUpx5RovH5/Nl1dZvemgsVrgK5mioYtw9Z/1KQFDGphekd0NLNNXOD6uiQdUxrHc7jXXe9fAAXTDkI=
+#testpass.secret.alias=wso2carbon
+#testpass.secret.keystore=identity
+#
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mgt-transports.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mgt-transports.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mgt-transports.xml
new file mode 100644
index 0000000..274d7fa
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mgt-transports.xml
@@ -0,0 +1,87 @@
+<!--
+  ~ 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.
+  -->
+
+<!--
+  ~ This file contains the configuration of the transport connectors used by
+  ~ the embedded application server instance which hosts the Carbon management
+  ~ console
+  -->
+
+<transports>
+    <transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
+        <parameter name="port">9763</parameter>
+
+        <!--
+       Uncomment the following to enable Apache2 mod_proxy. The port on the Apache server is 80
+       in this case. 
+        -->
+        <!--<parameter name="proxyPort">80</parameter>-->
+
+        <parameter name="maxHttpHeaderSize">8192</parameter>
+        <parameter name="maxThreads">150</parameter>
+        <parameter name="minSpareThreads">25</parameter>
+        <parameter name="maxSpareThreads">75</parameter>
+        <parameter name="enableLookups">false</parameter>
+        <parameter name="disableUploadTimeout">false</parameter>
+        <parameter name="clientAuth">false</parameter>
+        <parameter name="maxKeepAliveRequests">100</parameter>
+        <parameter name="acceptCount">100</parameter>
+
+        <parameter name="compression">force</parameter>
+        <parameter name="compressionMinSize">2048</parameter>
+        <parameter name="noCompressionUserAgents">gozilla, traviata</parameter>
+        <parameter name="compressableMimeType">
+            text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg
+        </parameter>
+    </transport>
+
+    <transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
+        <parameter name="port">9443</parameter>
+
+        <!--
+       Uncomment the following to enable Apache2 mod_proxy. The port on the Apache server is 443
+       in this case. 
+        -->
+        <!--<parameter name="proxyPort">443</parameter>-->
+        <!--
+       Uncomment the following to run on IBM J9 VM. Also, change the sslProtocol to SSL from the
+       Default value of TLS.
+        -->
+        <!--<parameter name="algorithm">IbmX509</parameter>-->
+        <parameter name="sslProtocol">TLS</parameter>
+        <parameter name="maxHttpHeaderSize">8192</parameter>
+        <parameter name="maxThreads">150</parameter>
+        <parameter name="minSpareThreads">25</parameter>
+        <parameter name="maxSpareThreads">75</parameter>
+        <parameter name="enableLookups">false</parameter>
+        <parameter name="disableUploadTimeout">false</parameter>
+        <parameter name="clientAuth">false</parameter>
+        <parameter name="maxKeepAliveRequests">100</parameter>
+        <parameter name="acceptCount">100</parameter>
+
+        <parameter name="compression">force</parameter>
+        <parameter name="compressionMinSize">2048</parameter>
+        <parameter name="noCompressionUserAgents">gozilla, traviata</parameter>
+        <parameter name="compressableMimeType">
+            text/html,text/javascript,application/x-javascript,application/javascript,application/xml,text/css,application/xslt+xml,text/xsl,image/gif,image/jpg,image/jpeg
+        </parameter>
+        <parameter name="keystore">${carbon.home}/resources/security/wso2carbon.jks</parameter>
+        <parameter name="keypass">wso2carbon</parameter>
+    </transport>
+</transports>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mime.types
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mime.types b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mime.types
new file mode 100644
index 0000000..80a13e9
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/mime.types
@@ -0,0 +1,728 @@
+#  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.
+
+# Media type for wsdl files. This is not defined in the original mime.types file.
+chemical/x-alchemy				alc
+application/andrew-inset			ez
+application/wsdl+xml				wsdl
+application/activemessage
+application/applefile
+application/atomicmail
+application/batch-SMTP
+application/beep+xml
+application/cals-1840
+application/commonground
+application/cu-seeme				cu
+application/cybercash
+application/dca-rft
+application/dec-dx
+application/docbook+xml
+application/dsptype				tsp
+application/dvcs
+application/edi-consent
+application/edi-x12
+application/edifact
+application/eshop
+application/font-tdpfr
+application/futuresplash			spl
+application/ghostview
+application/hta					hta
+application/http
+application/hyperstudio
+application/iges
+application/index
+application/index.cmd
+application/index.obj
+application/index.response
+application/index.vnd
+application/iotp
+application/ipp
+application/isup
+application/java-archive			jar
+application/java-serialized-object		ser
+application/java-vm				class
+application/mac-binhex40			hqx
+application/mac-compactpro			cpt
+application/macwriteii
+application/marc
+application/mathematica				nb
+application/mathematica-old
+application/msaccess				mdb
+application/msword				doc dot
+application/news-message-id
+application/news-transmission
+application/ocsp-request
+application/ocsp-response
+application/octet-stream			bin
+application/oda					oda
+application/ogg					ogg
+application/parityfec
+application/pdf					pdf
+application/pgp-encrypted
+application/pgp-keys				key
+application/pgp-signature			pgp
+application/pics-rules				prf
+application/pkcs10
+application/pkcs7-mime
+application/pkcs7-signature
+application/pkix-cert
+application/pkix-crl
+application/pkixcmp
+application/postscript				ps ai eps
+application/prs.alvestrand.titrax-sheet
+application/prs.cww
+application/prs.nprend
+application/qsig
+application/rar					rar
+application/rdf+xml				rdf
+application/remote-printing
+application/riscos
+application/rss+xml				rss
+application/rtf
+application/sdp
+application/set-payment
+application/set-payment-initiation
+application/set-registration
+application/set-registration-initiation
+application/sgml
+application/sgml-open-catalog
+application/sieve
+application/slate
+application/smil				smi smil
+application/timestamp-query
+application/timestamp-reply
+application/vemmi
+application/whoispp-query
+application/whoispp-response
+application/wita
+application/wordperfect				wpd
+application/wordperfect5.1			wp5
+application/x400-bp
+application/xhtml+xml				xhtml xht
+application/xml					xml xsl xslt jrxml
+application/xml-dtd
+application/xml-external-parsed-entity
+application/zip					zip
+application/vnd.3M.Post-it-Notes
+application/vnd.accpac.simply.aso
+application/vnd.accpac.simply.imp
+application/vnd.acucobol
+application/vnd.aether.imp
+application/vnd.anser-web-certificate-issue-initiation
+application/vnd.anser-web-funds-transfer-initiation
+application/vnd.audiograph
+application/vnd.bmi
+application/vnd.businessobjects
+application/vnd.canon-cpdl
+application/vnd.canon-lips
+application/vnd.cinderella			cdy
+application/vnd.claymore
+application/vnd.commerce-battelle
+application/vnd.commonspace
+application/vnd.comsocaller
+application/vnd.contact.cmsg
+application/vnd.cosmocaller
+application/vnd.ctc-posml
+application/vnd.cups-postscript
+application/vnd.cups-raster
+application/vnd.cups-raw
+application/vnd.cybank
+application/vnd.dna
+application/vnd.dpgraph
+application/vnd.dxr
+application/vnd.ecdis-update
+application/vnd.ecowin.chart
+application/vnd.ecowin.filerequest
+application/vnd.ecowin.fileupdate
+application/vnd.ecowin.series
+application/vnd.ecowin.seriesrequest
+application/vnd.ecowin.seriesupdate
+application/vnd.enliven
+application/vnd.epson.esf
+application/vnd.epson.msf
+application/vnd.epson.quickanime
+application/vnd.epson.salt
+application/vnd.epson.ssf
+application/vnd.ericsson.quickcall
+application/vnd.eudora.data
+application/vnd.fdf
+application/vnd.ffsns
+application/vnd.flographit
+application/vnd.framemaker
+application/vnd.fsc.weblaunch
+application/vnd.fujitsu.oasys
+application/vnd.fujitsu.oasys2
+application/vnd.fujitsu.oasys3
+application/vnd.fujitsu.oasysgp
+application/vnd.fujitsu.oasysprs
+application/vnd.fujixerox.ddd
+application/vnd.fujixerox.docuworks
+application/vnd.fujixerox.docuworks.binder
+application/vnd.fut-misnet
+application/vnd.grafeq
+application/vnd.groove-account
+application/vnd.groove-identity-message
+application/vnd.groove-injector
+application/vnd.groove-tool-message
+application/vnd.groove-tool-template
+application/vnd.groove-vcard
+application/vnd.hhe.lesson-player
+application/vnd.hp-HPGL
+application/vnd.hp-PCL
+application/vnd.hp-PCLXL
+application/vnd.hp-hpid
+application/vnd.hp-hps
+application/vnd.httphone
+application/vnd.hzn-3d-crossword
+application/vnd.ibm.MiniPay
+application/vnd.ibm.afplinedata
+application/vnd.ibm.modcap
+application/vnd.informix-visionary
+application/vnd.intercon.formnet
+application/vnd.intertrust.digibox
+application/vnd.intertrust.nncp
+application/vnd.intu.qbo
+application/vnd.intu.qfx
+application/vnd.irepository.package+xml
+application/vnd.is-xpr
+application/vnd.japannet-directory-service
+application/vnd.japannet-jpnstore-wakeup
+application/vnd.japannet-payment-wakeup
+application/vnd.japannet-registration
+application/vnd.japannet-registration-wakeup
+application/vnd.japannet-setstore-wakeup
+application/vnd.japannet-verification
+application/vnd.japannet-verification-wakeup
+application/vnd.koan
+application/vnd.lotus-1-2-3
+application/vnd.lotus-approach
+application/vnd.lotus-freelance
+application/vnd.lotus-notes
+application/vnd.lotus-organizer
+application/vnd.lotus-screencam
+application/vnd.lotus-wordpro
+application/vnd.mcd
+application/vnd.mediastation.cdkey
+application/vnd.meridian-slingshot
+application/vnd.mif
+application/vnd.minisoft-hp3000-save
+application/vnd.mitsubishi.misty-guard.trustweb
+application/vnd.mobius.daf
+application/vnd.mobius.dis
+application/vnd.mobius.msl
+application/vnd.mobius.plc
+application/vnd.mobius.txf
+application/vnd.motorola.flexsuite
+application/vnd.motorola.flexsuite.adsi
+application/vnd.motorola.flexsuite.fis
+application/vnd.motorola.flexsuite.gotap
+application/vnd.motorola.flexsuite.kmr
+application/vnd.motorola.flexsuite.ttc
+application/vnd.motorola.flexsuite.wem
+application/vnd.mozilla.xul+xml			xul
+application/vnd.ms-artgalry
+application/vnd.ms-asf
+application/vnd.ms-excel			xls xlb xlt
+application/vnd.ms-lrm
+application/vnd.ms-pki.seccat			cat
+application/vnd.ms-pki.stl			stl
+application/vnd.ms-powerpoint			ppt pps
+application/vnd.ms-project
+application/vnd.ms-tnef
+application/vnd.ms-works
+application/vnd.mseq
+application/vnd.msign
+application/vnd.music-niff
+application/vnd.musician
+application/vnd.netfpx
+application/vnd.noblenet-directory
+application/vnd.noblenet-sealer
+application/vnd.noblenet-web
+application/vnd.novadigm.EDM
+application/vnd.novadigm.EDX
+application/vnd.novadigm.EXT
+application/vnd.oasis.opendocument.chart	odc
+application/vnd.oasis.opendocument.database	odb
+application/vnd.oasis.opendocument.formula	odf
+application/vnd.oasis.opendocument.graphics	odg
+application/vnd.oasis.opendocument.graphics-template otg
+application/vnd.oasis.opendocument.image	odi
+application/vnd.oasis.opendocument.presentation	odp
+application/vnd.oasis.opendocument.presentation-template otp
+application/vnd.oasis.opendocument.spreadsheet	ods
+application/vnd.oasis.opendocument.spreadsheet-template ots
+application/vnd.oasis.opendocument.text		odt
+application/vnd.oasis.opendocument.text-master	odm
+application/vnd.oasis.opendocument.text-template ott
+application/vnd.oasis.opendocument.text-web	oth
+application/vnd.osa.netdeploy
+application/vnd.palm
+application/vnd.pg.format
+application/vnd.pg.osasli
+application/vnd.powerbuilder6
+application/vnd.powerbuilder6-s
+application/vnd.powerbuilder7
+application/vnd.powerbuilder7-s
+application/vnd.powerbuilder75
+application/vnd.powerbuilder75-s
+application/vnd.previewsystems.box
+application/vnd.publishare-delta-tree
+application/vnd.pvi.ptid1
+application/vnd.pwg-xhtml-print+xml
+application/vnd.rapid
+application/vnd.rim.cod				cod
+application/vnd.s3sms
+application/vnd.seemail
+application/vnd.shana.informed.formdata
+application/vnd.shana.informed.formtemplate
+application/vnd.shana.informed.interchange
+application/vnd.shana.informed.package
+application/vnd.smaf				mmf
+application/vnd.sss-cod
+application/vnd.sss-dtf
+application/vnd.sss-ntf
+application/vnd.stardivision.calc		sdc
+application/vnd.stardivision.draw		sda
+application/vnd.stardivision.impress		sdd sdp
+application/vnd.stardivision.math		smf
+application/vnd.stardivision.writer		sdw vor
+application/vnd.stardivision.writer-global	sgl
+application/vnd.street-stream
+application/vnd.sun.xml.calc			sxc
+application/vnd.sun.xml.calc.template		stc
+application/vnd.sun.xml.draw			sxd
+application/vnd.sun.xml.draw.template		std
+application/vnd.sun.xml.impress			sxi
+application/vnd.sun.xml.impress.template	sti
+application/vnd.sun.xml.math			sxm
+application/vnd.sun.xml.writer			sxw
+application/vnd.sun.xml.writer.global		sxg
+application/vnd.sun.xml.writer.template		stw
+application/vnd.svd
+application/vnd.swiftview-ics
+application/vnd.symbian.install			sis
+application/vnd.triscape.mxs
+application/vnd.trueapp
+application/vnd.truedoc
+application/vnd.tve-trigger
+application/vnd.ufdl
+application/vnd.uplanet.alert
+application/vnd.uplanet.alert-wbxml
+application/vnd.uplanet.bearer-choice
+application/vnd.uplanet.bearer-choice-wbxml
+application/vnd.uplanet.cacheop
+application/vnd.uplanet.cacheop-wbxml
+application/vnd.uplanet.channel
+application/vnd.uplanet.channel-wbxml
+application/vnd.uplanet.list
+application/vnd.uplanet.list-wbxml
+application/vnd.uplanet.listcmd
+application/vnd.uplanet.listcmd-wbxml
+application/vnd.uplanet.signal
+application/vnd.vcx
+application/vnd.vectorworks
+application/vnd.vidsoft.vidconference
+application/vnd.visio				vsd
+application/vnd.vividence.scriptfile
+application/vnd.wap.sic
+application/vnd.wap.slc
+application/vnd.wap.wbxml			wbxml
+application/vnd.wap.wmlc			wmlc
+application/vnd.wap.wmlscriptc			wmlsc
+application/vnd.webturbo
+application/vnd.wrq-hp3000-labelled
+application/vnd.wso2.endpoint
+application/vnd.wso2.governance-archive		gar
+application/vnd.wso2-hyperlink
+application/vnd.wt.stf
+application/vnd.xara
+application/vnd.xfdl
+application/vnd.yellowriver-custom-menu
+application/x-123				wk
+application/x-abiword				abw
+application/x-apple-diskimage			dmg
+application/x-bcpio				bcpio
+application/x-bittorrent			torrent
+application/x-cdf				cdf
+application/x-cdlink				vcd
+application/x-chess-pgn				pgn
+application/x-core
+application/x-cpio				cpio
+application/x-csh				csh
+application/x-debian-package			deb udeb
+application/x-director				dcr dir dxr
+application/x-dms				dms
+application/x-doom				wad
+application/x-dvi				dvi
+application/x-executable
+application/x-flac				flac
+application/x-font				pfa pfb gsf pcf pcf.Z
+application/x-freemind				mm
+application/x-futuresplash			spl
+application/x-gnumeric				gnumeric
+application/x-go-sgf				sgf
+application/x-graphing-calculator		gcf
+application/x-gtar				gtar tgz taz
+application/x-hdf				hdf
+application/x-httpd-php				phtml pht php
+application/x-httpd-php-source			phps
+application/x-httpd-php3			php3
+application/x-httpd-php3-preprocessed		php3p
+application/x-httpd-php4			php4
+application/x-httpd-eruby			rhtml
+application/x-ica				ica
+application/x-internet-signup			ins isp
+application/x-iphone				iii
+application/x-iso9660-image			iso
+application/x-java-applet
+application/x-java-bean
+application/x-java-jnlp-file			jnlp
+application/x-javascript			js
+application/x-jmol				jmz
+application/x-kchart				chrt
+application/x-kdelnk
+application/x-killustrator			kil
+application/x-koan				skp skd skt skm
+application/x-kpresenter			kpr kpt
+application/x-kspread				ksp
+application/x-kword				kwd kwt
+application/x-latex				latex
+application/x-lha				lha
+application/x-lzh				lzh
+application/x-lzx				lzx
+application/x-maker				frm maker frame fm fb book fbdoc
+application/x-mif				mif
+application/x-ms-wmd				wmd
+application/x-ms-wmz				wmz
+application/x-msdos-program			com exe bat dll
+application/x-msi				msi
+application/x-netcdf				nc
+application/x-ns-proxy-autoconfig		pac
+application/x-nwc				nwc
+application/x-object				o
+application/x-oz-application			oza
+application/x-pkcs7-certreqresp			p7r
+application/x-pkcs7-crl				crl
+application/x-python-code			pyc pyo
+application/x-quicktimeplayer			qtl
+application/x-redhat-package-manager		rpm
+application/x-rx
+application/x-sh				sh
+application/x-shar				shar
+application/x-shellscript
+application/x-shockwave-flash			swf swfl
+application/x-stuffit				sit
+application/x-sv4cpio				sv4cpio
+application/x-sv4crc				sv4crc
+application/x-tar				tar
+application/x-tcl				tcl
+application/x-tex-gf				gf
+application/x-tex-pk				pk
+application/x-texinfo				texinfo texi
+application/x-trash				~ % bak old sik
+application/x-troff				t tr roff
+application/x-troff-man				man
+application/x-troff-me				me
+application/x-troff-ms				ms
+application/x-ustar				ustar
+application/x-videolan
+application/x-wais-source			src
+application/x-wingz				wz
+application/x-x509-ca-cert			crt
+application/x-xcf				xcf
+application/x-xfig				fig
+application/x-xpinstall				xpi
+application/x-xsd+xml				xsd
+
+audio/32kadpcm
+audio/basic					au snd
+audio/g.722.1
+audio/l16
+audio/midi					mid midi kar
+audio/mp4a-latm
+audio/mpa-robust
+audio/mpeg					mpga mpega mp2 mp3 m4a
+audio/mpegurl					m3u
+audio/parityfec
+audio/prs.sid					sid
+audio/telephone-event
+audio/tone
+audio/vnd.cisco.nse
+audio/vnd.cns.anp1
+audio/vnd.cns.inf1
+audio/vnd.digital-winds
+audio/vnd.everad.plj
+audio/vnd.lucent.voice
+audio/vnd.nortel.vbk
+audio/vnd.nuera.ecelp4800
+audio/vnd.nuera.ecelp7470
+audio/vnd.nuera.ecelp9600
+audio/vnd.octel.sbc
+audio/vnd.qcelp
+audio/vnd.rhetorex.32kadpcm
+audio/vnd.vmx.cvsd
+audio/x-aiff					aif aiff aifc
+audio/x-gsm					gsm
+audio/x-mpegurl					m3u
+audio/x-ms-wma					wma
+audio/x-ms-wax					wax
+audio/x-pn-realaudio-plugin
+audio/x-pn-realaudio				ra rm ram
+audio/x-realaudio				ra
+audio/x-scpls					pls
+audio/x-sd2					sd2
+audio/x-wav					wav
+
+chemical/x-alchemy				alc
+chemical/x-cache				cac cache
+chemical/x-cache-csf				csf
+chemical/x-cactvs-binary			cbin cascii ctab
+chemical/x-cdx					cdx
+chemical/x-cerius				cer
+chemical/x-chem3d				c3d
+chemical/x-chemdraw				chm
+chemical/x-cif					cif
+chemical/x-cmdf					cmdf
+chemical/x-cml					cml
+chemical/x-compass				cpa
+chemical/x-crossfire				bsd
+chemical/x-csml					csml csm
+chemical/x-ctx					ctx
+chemical/x-cxf					cxf cef
+#chemical/x-daylight-smiles			smi
+chemical/x-embl-dl-nucleotide			emb embl
+chemical/x-galactic-spc				spc
+chemical/x-gamess-input				inp gam gamin
+chemical/x-gaussian-checkpoint			fch fchk
+chemical/x-gaussian-cube			cub
+chemical/x-gaussian-input			gau gjc gjf
+chemical/x-gaussian-log				gal
+chemical/x-gcg8-sequence			gcg
+chemical/x-genbank				gen
+chemical/x-hin					hin
+chemical/x-isostar				istr ist
+chemical/x-jcamp-dx				jdx dx
+chemical/x-kinemage				kin
+chemical/x-macmolecule				mcm
+chemical/x-macromodel-input			mmd mmod
+chemical/x-mdl-molfile				mol
+chemical/x-mdl-rdfile				rd
+chemical/x-mdl-rxnfile				rxn
+chemical/x-mdl-sdfile				sd sdf
+chemical/x-mdl-tgf				tgf
+#chemical/x-mif					mif
+chemical/x-mmcif				mcif
+chemical/x-mol2					mol2
+chemical/x-molconn-Z				b
+chemical/x-mopac-graph				gpt
+chemical/x-mopac-input				mop mopcrt mpc dat zmt
+chemical/x-mopac-out				moo
+chemical/x-mopac-vib				mvb
+chemical/x-ncbi-asn1				asn
+chemical/x-ncbi-asn1-ascii			prt ent
+chemical/x-ncbi-asn1-binary			val aso
+chemical/x-ncbi-asn1-spec			asn
+chemical/x-pdb					pdb ent
+chemical/x-rosdal				ros
+chemical/x-swissprot				sw
+chemical/x-vamas-iso14976			vms
+chemical/x-vmd					vmd
+chemical/x-xtel					xtel
+chemical/x-xyz					xyz
+
+image/cgm
+image/g3fax
+image/gif					gif
+image/ief					ief
+image/jpeg					jpeg jpg jpe
+image/naplps
+image/pcx					pcx
+image/png					png
+image/prs.btif
+image/prs.pti
+image/svg+xml					svg svgz
+image/tiff					tiff tif
+image/vnd.cns.inf2
+image/vnd.djvu					djvu djv
+image/vnd.dwg
+image/vnd.dxf
+image/vnd.fastbidsheet
+image/vnd.fpx
+image/vnd.fst
+image/vnd.fujixerox.edmics-mmr
+image/vnd.fujixerox.edmics-rlc
+image/vnd.mix
+image/vnd.net-fpx
+image/vnd.svf
+image/vnd.wap.wbmp				wbmp
+image/vnd.xiff
+image/x-cmu-raster				ras
+image/x-coreldraw				cdr
+image/x-coreldrawpattern			pat
+image/x-coreldrawtemplate			cdt
+image/x-corelphotopaint				cpt
+image/x-icon					ico
+image/x-jg					art
+image/x-jng					jng
+image/x-ms-bmp					bmp
+image/x-photoshop				psd
+image/x-portable-anymap				pnm
+image/x-portable-bitmap				pbm
+image/x-portable-graymap			pgm
+image/x-portable-pixmap				ppm
+image/x-rgb					rgb
+image/x-xbitmap					xbm
+image/x-xpixmap					xpm
+image/x-xwindowdump				xwd
+
+inode/chardevice
+inode/blockdevice
+inode/directory-locked
+inode/directory
+inode/fifo
+inode/socket
+
+message/delivery-status
+message/disposition-notification
+message/external-body
+message/http
+message/s-http
+message/news
+message/partial
+message/rfc822
+
+model/iges					igs iges
+model/mesh					msh mesh silo
+model/vnd.dwf
+model/vnd.flatland.3dml
+model/vnd.gdl
+model/vnd.gs-gdl
+model/vnd.gtw
+model/vnd.mts
+model/vnd.vtu
+model/vrml					wrl vrml
+
+multipart/alternative
+multipart/appledouble
+multipart/byteranges
+multipart/digest
+multipart/encrypted
+multipart/form-data
+multipart/header-set
+multipart/mixed
+multipart/parallel
+multipart/related
+multipart/report
+multipart/signed
+multipart/voice-message
+
+text/calendar					ics icz
+text/comma-separated-values			csv
+text/css					css
+text/directory
+text/english
+text/enriched
+text/h323					323
+text/html					html htm shtml
+text/iuls					uls
+text/mathml					mml
+text/parityfec
+text/plain					asc txt text diff pot
+text/prs.lines.tag
+text/rfc822-headers
+text/richtext					rtx
+text/rtf					rtf
+text/scriptlet					sct wsc
+text/t140
+text/texmacs					tm ts
+text/tab-separated-values			tsv
+text/uri-list
+text/vnd.abc
+text/vnd.curl
+text/vnd.DMClientScript
+text/vnd.flatland.3dml
+text/vnd.fly
+text/vnd.fmi.flexstor
+text/vnd.in3d.3dml
+text/vnd.in3d.spot
+text/vnd.IPTC.NewsML
+text/vnd.IPTC.NITF
+text/vnd.latex-z
+text/vnd.motorola.reflex
+text/vnd.ms-mediapackage
+text/vnd.sun.j2me.app-descriptor		jad
+text/vnd.wap.si
+text/vnd.wap.sl
+text/vnd.wap.wml				wml
+text/vnd.wap.wmlscript				wmls
+text/x-bibtex					bib
+text/x-boo					boo
+text/x-c++hdr					h++ hpp hxx hh
+text/x-c++src					c++ cpp cxx cc
+text/x-chdr					h
+text/x-component				htc
+text/x-crontab
+text/x-csh					csh
+text/x-csrc					c
+text/x-dsrc					d
+text/x-haskell					hs
+text/x-java					java
+text/x-literate-haskell				lhs
+text/x-makefile
+text/x-moc					moc
+text/x-pascal					p pas
+text/x-pcs-gcd					gcd
+text/x-perl					pl pm
+text/x-python					py
+text/x-server-parsed-html
+text/x-setext					etx
+text/x-sh					sh
+text/x-tcl					tcl tk
+text/x-tex					tex ltx sty cls
+text/x-vcalendar				vcs
+text/x-vcard					vcf
+
+video/dl					dl
+video/dv					dif dv
+video/fli					fli
+video/gl					gl
+video/mpeg					mpeg mpg mpe
+video/mp4					mp4
+video/quicktime					qt mov
+video/mp4v-es
+video/parityfec
+video/pointer
+video/vnd.fvt
+video/vnd.motorola.video
+video/vnd.motorola.videop
+video/vnd.mpegurl				mxu
+video/vnd.mts
+video/vnd.nokia.interleaved-multimedia
+video/vnd.vivo
+video/x-la-asf					lsf lsx
+video/x-mng					mng
+video/x-ms-asf					asf asx
+video/x-ms-wm					wm
+video/x-ms-wmv					wmv
+video/x-ms-wmx					wmx
+video/x-ms-wvx					wvx
+video/x-msvideo					avi
+video/x-sgi-movie				movie
+
+x-conference/x-cooltalk				ice
+
+x-world/x-vrml					vrm vrml wrl

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/registry.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/registry.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/registry.xml
new file mode 100644
index 0000000..5c46f43
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/registry.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ 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.
+  -->
+<wso2registry>
+
+    <currentDBConfig>wso2registry</currentDBConfig>
+    <readOnly>false</readOnly>
+    <registryRoot>/</registryRoot>
+
+    <dbConfig name="wso2registry">
+        <url>jdbc:h2:tcp://localhost/~/test</url>
+        <userName>sa</userName>
+        <password></password>
+        <driverName>org.h2.Driver</driverName>
+        <maxActive>50</maxActive>
+        <maxWait>60000</maxWait>
+        <minIdle>5</minIdle>
+    </dbConfig>
+
+   <!--<handler class="org.wso2.carbon.registry.extensions.handlers.SynapseRepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.synapse</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.SynapseRepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.esb</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.Axis2RepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.axis2</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.Axis2RepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.wsas</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/wsdl+xml</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.XSDMediaTypeHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/x-xsd+xml</property>
+        </filter>
+    </handler> -->
+
+    
+    <versionResourcesOnChange>true</versionResourcesOnChange>
+
+    <!-- NOTE: You can edit the options under "StaticConfiguration" only before the
+     startup. -->
+    <staticConfiguration>
+        <versioningProperties>true</versioningProperties>
+        <versioningComments>true</versioningComments>
+        <versioningTags>true</versioningTags>
+        <versioningRatings>true</versioningRatings>
+    </staticConfiguration>
+</wso2registry>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/user-mgt.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/user-mgt.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/user-mgt.xml
new file mode 100644
index 0000000..35dafff
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/node/user-mgt.xml
@@ -0,0 +1,106 @@
+<!--
+  ~ 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.
+  -->
+<UserManager>
+	<Realm>
+		<Configuration>
+			<AdminRole>admin</AdminRole>
+			<AdminUser>
+				<UserName>admin</UserName>
+				<Password>admin</Password>
+			</AdminUser>
+			<EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in thsi role sees the registry root -->
+			<ReadOnly>false</ReadOnly>
+			<MaxUserNameListLength>500</MaxUserNameListLength>
+			<Property name="url">jdbc:h2:tcp://localhost/~/test</Property>
+            <Property name="userName">sa</Property>
+            <Property name="password"></Property>
+            <Property name="driverName">org.h2.Driver</Property>
+            <Property name="maxActive">50</Property>
+            <Property name="maxWait">60000</Property>
+            <Property name="minIdle">5</Property>
+        </Configuration>
+        <UserStoreManager
+            class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
+            <Property name="SelectUserSQL">SELECT * FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?</Property>
+	    <Property name="GetRoleListSQL">SELECT UM_ROLE_NAME FROM UM_ROLE WHERE UM_TENANT_ID=?</Property>
+            <Property name="UserFilterSQL">SELECT UM_USER_NAME FROM UM_USER WHERE UM_USER_NAME LIKE ? AND UM_TENANT_ID=? ORDER BY UM_USER_NAME</Property>
+            <Property name="UserRoleSQL">SELECT UM_ROLE_NAME FROM UM_USER_ROLE, UM_ROLE, UM_USER WHERE UM_USER.UM_USER_NAME=? AND UM_USER.UM_ID=UM_USER_ROLE.UM_USER_ID AND UM_ROLE.UM_ID=UM_USER_ROLE.UM_ROLE_ID AND UM_USER_ROLE.UM_TENANT_ID=? AND UM_ROLE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?</Property>
+            <Property name="IsRoleExistingSQL">SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?</Property>
+            <Property name="IsUserExistingSQL">SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?</Property>
+            <Property name="GetUserListOfRoleSQL">SELECT UM_USER_NAME FROM UM_USER_ROLE, UM_ROLE, UM_USER WHERE UM_ROLE.UM_ROLE_NAME=? AND UM_USER.UM_ID=UM_USER_ROLE.UM_USER_ID AND UM_ROLE.UM_ID=UM_USER_ROLE.UM_ROLE_ID AND UM_USER_ROLE.UM_TENANT_ID=? AND UM_ROLE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?</Property>
+            <Property name="GetUserPropertyForProfileSQL">SELECT UM_ATTR_VALUE FROM UM_USER_ATTRIBUTE, UM_USER WHERE UM_USER.UM_ID = UM_USER_ATTRIBUTE.UM_USER_ID AND UM_USER.UM_USER_NAME=? AND UM_ATTR_NAME=? AND UM_PROFILE_ID=? AND UM_USER_ATTRIBUTE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?</Property>
+            <Property name="GetUserPropertiesForProfileSQL">SELECT UM_ATTR_NAME, UM_ATTR_VALUE FROM UM_USER_ATTRIBUTE, UM_USER WHERE UM_USER.UM_ID = UM_USER_ATTRIBUTE.UM_USER_ID AND UM_USER.UM_USER_NAME=? AND UM_PROFILE_ID=? AND UM_USER_ATTRIBUTE.UM_TENANT_ID=? AND UM_USER.UM_TENANT_ID=?</Property>
+            <Property name="GetProfileNamesSQL">SELECT DISTINCT UM_PROFILE_ID FROM UM_USER_ATTRIBUTE WHERE UM_TENANT_ID=?</Property>
+            <Property name="GetUserProfileNamesSQL">SELECT DISTINCT UM_PROFILE_ID FROM UM_USER_ATTRIBUTE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?</Property>
+	        <Property name="GetUsersWithDefaultPasswordsSQL">SELECT UM_USER_NAME FROM UM_USER WHERE WHERE UM_USER_NAME=? AND UM_TENANT_ID=?</Property>
+            <Property name="UserNameUniqueAcrossTenantsSQL">SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=?</Property>
+            <Property name="GetUserIDFromUserNameSQL">SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?</Property>
+            <Property name="GetTenantIDFromUserNameSQL">SELECT UM_TENANT_ID FROM UM_USER WHERE UM_USER_NAME=?</Property>
+            <Property name="PasswordDigest">SHA-256</Property>
+            <Property name="StoreSaltedPassword">true</Property>
+            <Property name="UserNameUniqueAcrossTenants">false</Property>
+            <!-- writing sqls follow-->
+            <Property name="AddUserSQL">INSERT INTO UM_USER (UM_USER_NAME, UM_USER_PASSWORD, UM_SALT_VALUE, UM_REQUIRE_CHANGE, UM_CHANGED_TIME, UM_TENANT_ID) VALUES (?, ?, ?, ?, ?, ?)</Property>
+	    <Property name="AddRoleSQL">INSERT INTO UM_ROLE (UM_ROLE_NAME, UM_TENANT_ID) VALUES (?, ?)</Property>
+            <Property name="AddUserToRoleSQL">INSERT INTO UM_USER_ROLE (UM_USER_ID, UM_ROLE_ID, UM_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?), ?)</Property>
+            <Property name="RemoveUserFromRoleSQL">DELETE FROM UM_USER_ROLE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?</Property>
+            <Property name="AddRoleToUserSQL">INSERT INTO UM_USER_ROLE (UM_ROLE_ID, UM_USER_ID, UM_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?),(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), ?)</Property>
+            <Property name="RemoveRoleFromUserSQL">DELETE FROM UM_USER_ROLE WHERE UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?</Property>
+            <Property name="DeleteRoleSQL">DELETE FROM UM_ROLE WHERE UM_ROLE_NAME = ? AND UM_TENANT_ID=?</Property>
+            <Property name="OnDeleteRoleRemoveUserRoleMappingSQL">DELETE FROM UM_USER_ROLE WHERE UM_ROLE_ID=(SELECT UM_ID FROM UM_ROLE WHERE UM_ROLE_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?</Property>
+            <Property name="OnDeleteUserRemoveUserRoleMappingSQL">DELETE FROM UM_USER_ROLE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?</Property>
+            <Property name="OnDeleteUserRemoveUserAttributeSQL">DELETE FROM UM_USER_ATTRIBUTE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_TENANT_ID=?</Property>
+            <Property name="DeleteUserSQL">DELETE FROM UM_USER WHERE UM_USER_NAME = ? AND UM_TENANT_ID=?</Property>
+            <Property name="UpdateUserPasswordSQL">UPDATE UM_USER SET UM_USER_PASSWORD= ?, UM_SALT_VALUE=?, UM_REQUIRE_CHANGE=?, UM_CHANGED_TIME=? WHERE UM_USER_NAME= ? AND UM_TENANT_ID=?</Property>
+	    <Property name="AddUserPropertySQL">INSERT INTO UM_USER_ATTRIBUTE (UM_USER_ID, UM_ATTR_NAME, UM_ATTR_VALUE, UM_PROFILE_ID, UM_TENANT_ID) VALUES ((SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?), ?, ?, ?, ?)</Property>
+            <Property name="UpdateUserPropertySQL">UPDATE UM_USER_ATTRIBUTE SET UM_ATTR_VALUE=? WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_ATTR_NAME=? AND UM_PROFILE_ID=? AND UM_TENANT_ID=?</Property>
+            <Property name="DeleteUserPropertySQL">DELETE FROM UM_USER_ATTRIBUTE WHERE UM_USER_ID=(SELECT UM_ID FROM UM_USER WHERE UM_USER_NAME=? AND UM_TENANT_ID=?) AND UM_ATTR_NAME=? AND UM_PROFILE_ID=? AND UM_TENANT_ID=?</Property>
+        </UserStoreManager>
+  <!--  <UserStoreManager
+            class="org.wso2.carbon.user.core.actdir.ActDirUserStoreManager">
+            <Property name="ConnectionURL">ldap://10.100.1.122:389</Property>
+            <Property name="ConnectionName">cn=Administrator,cn=users,dc=wso2,dc=lk</Property>
+            <Property name="ConnectionPassword">admin123</Property>
+            <Property name="UserSearchBase">dc=wso2,dc=lk</Property>
+            <Property name="FilterTenantsForUsers"></Property>
+       </UserStoreManager> -->
+        <!-- UserStoreManager
+            class="org.wso2.carbon.user.core.ldap.LDAPUserStoreManager">
+            <Property name="ConnectionURL">ldap://localhost:10389</Property>
+            <Property name="ConnectionName">uid=admin,ou=system</Property>
+            <Property name="ConnectionPassword">admin123</Property>
+            <Property name="UserSearchBase">ou=system</Property>
+             <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(mail=?@{domain}))</Property>
+            <Property name="UserNameAttribute">mail</Property>
+        </UserStoreManager -->
+        <AuthorizationManager
+            class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager"></AuthorizationManager>
+    </Realm>
+    <SystemPermission>
+        <Permission>login</Permission>
+        <Permission>manage-configuration</Permission>
+        <Permission>manage-security</Permission>
+        <Permission>upload-services</Permission>
+        <Permission>manage-services</Permission>
+        <Permission>manage-lc-configuration</Permission>
+        <Permission>manage-mediation</Permission>
+        <Permission>monitor-system</Permission>
+        <Permission>delegate-identity</Permission>
+    </SystemPermission>
+</UserManager>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/ports-config.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/ports-config.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/ports-config.xml
new file mode 100644
index 0000000..1f5ea77
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/ports-config.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ 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.
+  -->
+<portsConfig>
+    <range>
+   	<start>49150</start>
+        <end>65535</end>
+    </range>
+    <Instance1>
+        <nioports>
+            <http>5443</http>
+            <https>5444</https>
+        </nioports>
+        <mgtports>
+            <http>6443</http>
+            <https>6444</https>
+        </mgtports>
+    </Instance1>
+    <Instance2>
+        <nioports>
+            <http>5445</http>
+            <https>5446</https>
+        </nioports>
+        <mgtports>
+            <http>6445</http>
+            <https>6446</https>
+        </mgtports>
+    </Instance2>
+    <Instance3>
+        <nioports>
+            <http>5447</http>
+            <https>5448</https>
+        </nioports>
+        <mgtports>
+            <http>6447</http>
+            <https>6448</https>
+        </mgtports>
+         
+    </Instance3>
+</portsConfig>
+

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/registry.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/registry.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/registry.xml
new file mode 100644
index 0000000..f2ea53e
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/registry.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  ~ 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.
+  -->
+<wso2registry>
+
+    <currentDBConfig>wso2registry</currentDBConfig>
+    <readOnly>false</readOnly>
+    <registryRoot>/</registryRoot>
+
+    <dbConfig name="wso2registry">
+        <url>jdbc:h2:repository/database/WSO2CARBON_DB</url>
+        <userName>wso2carbon</userName>
+        <password>wso2carbon</password>
+        <driverName>org.h2.Driver</driverName>
+        <maxActive>50</maxActive>
+        <maxWait>60000</maxWait>
+        <minIdle>5</minIdle>
+    </dbConfig>
+
+   <!--<handler class="org.wso2.carbon.registry.extensions.handlers.SynapseRepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.synapse</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.SynapseRepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.esb</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.Axis2RepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.axis2</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.Axis2RepositoryHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/vnd.apache.wsas</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.WSDLMediaTypeHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/wsdl+xml</property>
+        </filter>
+    </handler>
+
+    <handler class="org.wso2.carbon.registry.extensions.handlers.XSDMediaTypeHandler">
+        <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
+            <property name="mediaType">application/x-xsd+xml</property>
+        </filter>
+    </handler> -->
+
+    <!--remoteInstance url="https://localhost:9443/registry">
+        <id>instanceid</id>
+        <username>username</username>
+        <password>password</password>
+    </remoteInstance-->
+
+    <!--remoteInstance url="https://localhost:9443/registry">
+        <id>instanceid</id>
+        <dbConfig>wso2registry</dbConfig>
+        <readOnly>false</readOnly>
+        <registryRoot>/</registryRoot>
+    </remoteInstance-->
+
+    <!--mount path="/_system/config" overwrite="true|false|virtual">
+        <instanceId>instanceid</instanceId>
+        <targetPath>/_system/nodes</targetPath>
+    </mount-->
+
+    
+    <versionResourcesOnChange>true</versionResourcesOnChange>
+
+    <!-- NOTE: You can edit the options under "StaticConfiguration" only before the
+     startup. -->
+    <staticConfiguration>
+        <versioningProperties>true</versioningProperties>
+        <versioningComments>true</versioningComments>
+        <versioningTags>true</versioningTags>
+        <versioningRatings>true</versioningRatings>
+    </staticConfiguration>
+</wso2registry>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/secret-conf.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/secret-conf.properties b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/secret-conf.properties
new file mode 100644
index 0000000..b8ad7ed
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/secret-conf.properties
@@ -0,0 +1,37 @@
+#############################################################################
+## Security Configuration
+#############################################################################
+## The following property specifies a global password provider implementation
+## which will be used globally if not overriden in specific configurations
+##carbon.secretProvider=<any implementation of org.apache.synapse.commons.security.secret.SecretCallbackHandler>
+##Examples:
+##carbon.secretProvider=org.apache.synapse.commons.security.secret.handler.SecretManagerSecretCallbackHandler
+##carbon.secretProvider=org.apache.synapse.commons.security.secret.handler.JMXSecretCallbackHandler
+##carbon.secretProvider=org.apache.synapse.commons.security.secret.handler.JlineSecretCallbackHandler
+##carbon.secretProvider=org.apache.synapse.commons.security.secret.handler.JBossEncryptionSecretCallbackHandler
+#
+##Secret Repositories configuration
+#
+#secretRepositories=file
+#secretRepositories.file.provider=org.apache.synapse.commons.security.secret.repository.filebased.FileBaseSecretRepositoryProvider
+#secretRepositories.file.location=cipher-text.properties
+#
+##KeyStores configurations
+#
+#keystore.identity.location=resources/security/wso2carbon.jks
+#keystore.identity.type=JKS
+#keystore.identity.alias=wso2carbon
+#keystore.identity.store.password=wso2carbon
+##keystore.identity.store.secretProvider=<any implementation of org.apache.synapse.commons.security.secret.SecretCallbackHandler>
+#keystore.identity.key.password=wso2carbon
+##keystore.identity.key.secretProvider=<any implementation of org.apache.synapse.commons.security.secret.SecretCallbackHandler>
+##keystore.identity.parameters=enableHostnameVerifier=false;keyStoreCertificateFilePath=/home/esb.cer
+#
+#keystore.trust.location=resources/security/client-truststore.jks
+#keystore.trust.type=JKS
+#keystore.trust.alias=wso2carbon
+#keystore.trust.store.password=wso2carbon
+##keystore.trust.store.secretProvider=<any implementation of org.apache.synapse.commons.security.secret.SecretCallbackHandler>
+#
+#
+#

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/synapse.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/synapse.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/synapse.xml
new file mode 100644
index 0000000..aed5054
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/synapse.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ 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.
+  -->
+
+<!-- An empty flat synapse configuration shipped with the WSO2 ESB -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+    
+    <task class="org.wso2.carbon.multiple.instance.endpoint.mgt.autoscale.LocalLoadAnalyzerTask" name="LocalLoadAnalyzer">
+        <property name="maxAppInstances" value="10"/>
+        <property name="minAppInstances" value="1"/>
+        <trigger interval="5"/>
+    </task>
+</definitions>
+<!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do
+    *not* want to keep the artifacts in several files -->

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config1.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config1.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config1.xml
new file mode 100644
index 0000000..515eb36
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config1.xml
@@ -0,0 +1,48 @@
+<!--
+  ~ 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.
+  -->
+<throttlingConfig xmlns="http://wso2.com/carbon/multitenancy/throttling/config">
+	<tasks>
+		<task>
+			<parameters>
+				<parameter name="interval">15</parameter>
+			</parameters>
+			<dataProviders>
+				<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.BandwidthDataProvider">
+				</dataProvider>
+				<!--
+					<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.BillingDataProvider">
+					</dataProvider>
+				-->
+				<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.DBContentVolumeDataProvider">
+				</dataProvider>
+				<dataProvider
+					class="org.wso2.stratos.throttling.test.utils.CustomDataProvider">
+				</dataProvider>
+				<!--
+					<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.UsersCountDataProvider">
+					</dataProvider>
+				-->
+			</dataProviders>
+		</task>
+	</tasks>
+</throttlingConfig>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config2.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config2.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config2.xml
new file mode 100644
index 0000000..515eb36
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config2.xml
@@ -0,0 +1,48 @@
+<!--
+  ~ 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.
+  -->
+<throttlingConfig xmlns="http://wso2.com/carbon/multitenancy/throttling/config">
+	<tasks>
+		<task>
+			<parameters>
+				<parameter name="interval">15</parameter>
+			</parameters>
+			<dataProviders>
+				<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.BandwidthDataProvider">
+				</dataProvider>
+				<!--
+					<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.BillingDataProvider">
+					</dataProvider>
+				-->
+				<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.DBContentVolumeDataProvider">
+				</dataProvider>
+				<dataProvider
+					class="org.wso2.stratos.throttling.test.utils.CustomDataProvider">
+				</dataProvider>
+				<!--
+					<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.UsersCountDataProvider">
+					</dataProvider>
+				-->
+			</dataProviders>
+		</task>
+	</tasks>
+</throttlingConfig>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config3.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config3.xml b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config3.xml
new file mode 100644
index 0000000..515eb36
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-config3.xml
@@ -0,0 +1,48 @@
+<!--
+  ~ 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.
+  -->
+<throttlingConfig xmlns="http://wso2.com/carbon/multitenancy/throttling/config">
+	<tasks>
+		<task>
+			<parameters>
+				<parameter name="interval">15</parameter>
+			</parameters>
+			<dataProviders>
+				<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.BandwidthDataProvider">
+				</dataProvider>
+				<!--
+					<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.BillingDataProvider">
+					</dataProvider>
+				-->
+				<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.DBContentVolumeDataProvider">
+				</dataProvider>
+				<dataProvider
+					class="org.wso2.stratos.throttling.test.utils.CustomDataProvider">
+				</dataProvider>
+				<!--
+					<dataProvider
+					class="org.wso2.stratos.throttling.manager.dataproviders.UsersCountDataProvider">
+					</dataProvider>
+				-->
+			</dataProviders>
+		</task>
+	</tasks>
+</throttlingConfig>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules1.drl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules1.drl b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules1.drl
new file mode 100644
index 0000000..d187c17
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules1.drl
@@ -0,0 +1,60 @@
+import org.wso2.stratos.throttling.manager.dataobjects.*;
+import org.wso2.stratos.billing.mgt.dataobjects.*;
+import org.wso2.stratos.common.constants.*;
+
+
+rule clearRestrictions
+when
+$dataContext : ThrottlingDataContext();
+eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) < 8)
+
+then
+
+ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION,
+            false, null);
+
+end
+
+
+rule restrictFileSize
+when
+$dataContext : ThrottlingDataContext();
+eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) > 8 &&
+                            $dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY)  < 10)
+
+then
+
+ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION,
+            true, "Your data is big. Bigger than 8");
+
+end
+
+rule stranageTest1Rule
+when
+$package: MultitenancyPackage(name == "test1")
+$dataContext : ThrottlingDataContext()
+eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY)  > 15 &&
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+
+then
+
+ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION,
+            true, "the strange condition for test1 is met");
+
+end
+
+rule strangeTest2Rule
+when
+$package: MultitenancyPackage(name == "test2")
+$dataContext : ThrottlingDataContext()
+eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY)  > 15 &&
+            $dataContext.getDataObject(ThrottlingDataEntryConstants.PACKAGE) == $package)
+then
+ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION,
+            true, "the strange condition for test2 is met");
+
+end

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules2.drl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules2.drl b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules2.drl
new file mode 100644
index 0000000..0b8804e
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules2.drl
@@ -0,0 +1,18 @@
+import org.wso2.stratos.throttling.manager.dataobjects.*;
+import org.wso2.stratos.common.constants.*;
+
+rule restrictBandwidth
+when
+
+$dataContext : ThrottlingDataContext()
+eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_INCOMING_BANDWIDTH) > 12)
+
+then
+
+ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+long tenantIncomingBandwidth = $dataContext.getDataLong(
+		ThrottlingDataEntryConstants.TENANT_INCOMING_BANDWIDTH);
+validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, true,
+		"Your incoming bw is big. Bigger than 12. your value: " + tenantIncomingBandwidth);
+
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/767082e3/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules3.drl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules3.drl b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules3.drl
new file mode 100644
index 0000000..481d903
--- /dev/null
+++ b/components/org.apache.stratos.throttling.manager/src/test/resources/carbon-home/repository/conf/throttling-rules3.drl
@@ -0,0 +1,17 @@
+import org.wso2.stratos.throttling.manager.dataobjects.*;
+import org.wso2.stratos.common.constants.*;
+
+rule restrictCapacity
+when
+
+$dataContext : ThrottlingDataContext()
+eval($dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY) > 12)
+
+then
+
+ThrottlingAccessValidation validation = $dataContext.getAccessValidation();
+long tenantCapacity = $dataContext.getDataLong(ThrottlingDataEntryConstants.TENANT_CAPACITY);
+validation.setTenantBlocked(StratosConstants.THROTTLING_IN_DATA_ACTION, true,
+            "Your resource volume is big. Bigger than 12. your value: " + tenantCapacity);
+
+end
\ No newline at end of file