├── .travis.yml ├── LICENSE ├── README.md ├── WEB-INF └── web.xml ├── bin ├── docker.txt ├── shutdown.sh ├── startup.bat ├── startup.sh └── wget.exe ├── page ├── css │ ├── bootstrap.min.css │ ├── bootstrap_notablet.css │ ├── font-awesome.min.css │ ├── graph.css │ ├── introjs.css │ ├── main.css │ ├── mapping.css │ ├── perfect-scrollbar.css │ ├── trial.css │ └── trial.css.map ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── img │ ├── attention.png │ ├── bottomBlueStrip.png │ ├── boxupp-icon.png │ ├── bulb-icon.png │ ├── centos-32-gray.png │ ├── centos-32.png │ ├── dashboardLogo.png │ ├── dd-arrow.png │ ├── debian-32-gray.png │ ├── debian-32.png │ ├── divider.png │ ├── dot-pin.png │ ├── formLoader.GIF │ ├── git-icon.png │ ├── grid.png │ ├── icon-set.png │ ├── img-dotted.png │ ├── inform-icons.png │ ├── logo.png │ ├── redhat-32-gray.png │ ├── redhat-32.png │ ├── shell-icon.png │ ├── tilebg.png │ ├── ubuntu-32-gray.png │ ├── ubuntu-32.png │ └── vagrant-icon.png ├── index.html ├── js │ ├── angular-animate.min.js │ ├── angular-file-upload.js │ ├── angular-messages.min.js │ ├── angular-resource.min.js │ ├── angular-route.min.js │ ├── angular.min.js │ ├── angular.min.js_old │ ├── angularFileUploadCtrl.js │ ├── base64.js │ ├── bootstrap.min.js │ ├── boxupp.js │ ├── codemirror.js │ ├── factoryCtrl.min.js │ ├── gitController.js │ ├── github.js │ ├── intro.js │ ├── javascript_cm.js │ ├── jquery-ui.min.js │ ├── jquery.js │ ├── jquery.mousewheel.js │ ├── lib │ │ ├── ace.js │ │ ├── mode-javascript.js │ │ ├── mode-sh.js │ │ ├── ngLoadScript.js │ │ ├── theme-chrome.js │ │ ├── theme-monokai.js │ │ ├── ui-ace.js │ │ └── worker-javascript.js │ ├── mainApp.js │ ├── miscellaneous.js │ ├── perfect-scrollbar.js │ ├── projectController.js │ ├── puppetController.js │ ├── require.js │ ├── shell.js │ ├── shellController.js │ ├── src │ │ ├── controllers │ │ │ ├── ctrlBarController.js │ │ │ ├── loginController.js │ │ │ └── projectInitController.js │ │ ├── directives │ │ │ └── boxuppDirectives.js │ │ └── graphFiles │ │ │ └── treeGraph.js │ ├── typeAheadCtrl.js │ ├── ui-bootstrap-custom-0.10.0.min.js │ ├── ui-bootstrap-tpls-0.10.0.js │ ├── ui-codemirror.js │ ├── underscore-min.js │ └── vagrantUploadCtrl.js ├── partials │ └── module_renderer.html ├── scss │ ├── .sass-cache │ │ ├── 226e522357f21da8b53956538ea7642e2dd72000 │ │ │ └── trial.scssc │ │ ├── 3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0 │ │ │ ├── _controlBar.scssc │ │ │ ├── _login.scssc │ │ │ ├── _modals.scssc │ │ │ ├── _playArea.scssc │ │ │ └── _projects.scssc │ │ ├── 94435787752034cead0c6be0cf14fee69c53291a │ │ │ ├── _login.scssc │ │ │ └── login.scssc │ │ └── e47d433545b5209493c1e12b81667cc56086651b │ │ │ └── trial.scssc │ ├── partials │ │ ├── _controlBar.scss │ │ ├── _login.scss │ │ ├── _modals.scss │ │ ├── _playArea.scss │ │ └── _projects.scss │ └── trial.scss └── templates │ ├── awsControlBar.html │ ├── awsDashboard.html │ ├── awsSecondaryNav.html │ ├── awsVmConfigurations.html │ ├── awsWorkspace.html │ ├── containerConfigurations.html │ ├── containerDashboard.html │ ├── controlBar.html │ ├── dockerControlBar.html │ ├── dockerDashboard.html │ ├── logDashBoard.html │ ├── login.html │ ├── mainNav.html │ ├── mainNav_old.html │ ├── modals │ ├── awsBoxModal.html │ ├── boxModal.html │ ├── console.html │ ├── containerModal.html │ ├── moduleModal.html │ └── scriptModal.html │ ├── modules │ └── moduleConfigurations.html │ ├── nav.html │ ├── navData.html │ ├── nodes.html │ ├── projectInit.html │ ├── projects.html │ ├── provisioners │ ├── puppetProvisioner.html │ └── shellProvisioner.html │ ├── provisioningSection.html │ ├── scripts │ └── scriptConfigurations.html │ ├── secondaryNav.html │ ├── shareRepo │ └── gitModal.html │ ├── shellProvisioner.html │ ├── vagrantModal.html │ ├── vagrantUpload.html │ ├── vboxDashboard.html │ ├── vmConfigurations.html │ └── vmDashboard.html ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── boxupp │ │ ├── AppContextBuilder.java │ │ ├── ConfigurationGenerator.java │ │ ├── FileManager.java │ │ ├── JettyServer.java │ │ ├── PropertyReader.java │ │ ├── SocketManager.java │ │ ├── ToolConfigurationReader.java │ │ ├── VagrantOutputStream.java │ │ ├── WebSocketsServletFactory.java │ │ ├── api │ │ ├── BoxuppServices.java │ │ ├── ProjectController.java │ │ └── UploadHandler.java │ │ ├── beans │ │ ├── Config.java │ │ ├── LogBean.java │ │ ├── Provider.java │ │ └── Setting.java │ │ ├── dao │ │ ├── AwsProjectDAOManager.java │ │ ├── DAOImplInterface.java │ │ ├── DockerLinkDAOManager.java │ │ ├── GitRepoDAOManager.java │ │ ├── LoginDAOManager.java │ │ ├── MachineConfigDAOManager.java │ │ ├── PortMappingDAOManager.java │ │ ├── ProjectDAOManager.java │ │ ├── ProviderDAOManager.java │ │ ├── PuppetModuleDAOManager.java │ │ ├── ShellScriptDAOManager.java │ │ ├── SyncFolderDAOManager.java │ │ └── UserDAOManager.java │ │ ├── db │ │ ├── CreateDB.java │ │ ├── DAOProvider.java │ │ ├── DBConnectionManager.java │ │ ├── DerbyConfig.java │ │ ├── DerbyStates.java │ │ ├── UpdateDbSchema.java │ │ └── beans │ │ │ ├── AwsProjectCredentialsBean.java │ │ │ ├── DefaultConfigMapping.java │ │ │ ├── DockerLinkBean.java │ │ │ ├── ForwardedPortsBean.java │ │ │ ├── GitRepoBean.java │ │ │ ├── GitRepoMapping.java │ │ │ ├── MachineConfigurationBean.java │ │ │ ├── MachineProjectMapping.java │ │ │ ├── ModuleCurrentReleaseBean.java │ │ │ ├── ModuleMetaDataBean.java │ │ │ ├── ModuleOwnerBean.java │ │ │ ├── ProjectAwsCredentialsMapping.java │ │ │ ├── ProjectBean.java │ │ │ ├── ProjectProviderMappingBean.java │ │ │ ├── ProviderBean.java │ │ │ ├── PuppetModuleBean.java │ │ │ ├── PuppetModuleMapping.java │ │ │ ├── SearchModuleBean.java │ │ │ ├── ShellScriptBean.java │ │ │ ├── ShellScriptMapping.java │ │ │ ├── SyncFoldersBean.java │ │ │ ├── UserCredentials.java │ │ │ ├── UserDetailBean.java │ │ │ ├── UserProjectMapping.java │ │ │ └── UserTypeBean.java │ │ ├── init │ │ └── Boxupp.java │ │ ├── mail │ │ └── MailManager.java │ │ ├── resources │ │ ├── GitRepo.java │ │ ├── MachineConfig.java │ │ ├── Project.java │ │ ├── Provider.java │ │ ├── PuppetModule.java │ │ ├── SessionFilter.java │ │ ├── SessionTracker.java │ │ ├── ShellScript.java │ │ ├── User.java │ │ └── VagrantLog.java │ │ ├── responseBeans │ │ ├── BoxURLResponse.java │ │ ├── SnapshotData.java │ │ ├── StatusBean.java │ │ ├── UserAuthenticationResponse.java │ │ ├── VagrantFile.java │ │ ├── VagrantFileStatus.java │ │ ├── VagrantOutput.java │ │ ├── VagrantParserOutput.java │ │ ├── VagrantStatus.java │ │ ├── VagrantStreamError.java │ │ └── VagrantStreamOutput.java │ │ ├── utilities │ │ ├── CommonProperties.java │ │ ├── OSProperties.java │ │ ├── PuppetUtilities.java │ │ ├── Utilities.java │ │ └── VagrantUtilities.java │ │ ├── vagrant │ │ ├── VagrantCommandExecutor.java │ │ ├── VagrantCommandParser.java │ │ └── VagrantCommandProcessor.java │ │ ├── velocity │ │ └── VelocityInit.java │ │ └── ws │ │ ├── OutputConsole.java │ │ └── VagrantConsole.java └── resources │ ├── LICENSE.txt │ ├── README.txt │ ├── User Manual_v1.0.0.pdf │ ├── Vagrantfile │ ├── awsMachine.vm │ ├── boxupp.vm │ ├── config.properties │ ├── config.xml │ ├── data.html │ ├── docker.vm │ ├── log4j2.xml │ ├── node.vm │ ├── puppet.sh │ └── virtualBox.vm └── test └── java └── com └── paxcel └── vagrant └── AppTest.java /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | - oraclejdk7 5 | - openjdk7 6 | - openjdk6 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # boxupp ![Travis status](https://api.travis-ci.org/BoxUpp/boxupp.svg) 2 | Browser based interface to manage your Vagrant environments 3 | 4 | Boxupp is built over Vagrant and exposes all the functionalities offered by Vagrant and much more inside your web-browser. 5 | 6 | Vagrant is an awesome tool to manage the development environments and we want to enhance the experience even further. 7 | 8 | ### Features:
9 | 10 | #### 1) Inbuilt Vagrant Intelligence 11 | You do not need to learn Vagrant syntax. Boxupp knows what vagrant commands to run to bring your dashboard box 12 | states in sync with the real infrastructure at the backend. Forget infrastructure management issues and focus on coding instead. 13 | 14 | #### 2) Puppet Forge Integration 15 | Boxupp supports around 2.8k+ modules from Puppet Forge. You can search and download a required module from the Puppet Forge 16 | repository and link it with any of the boxes defined in your Boxupp Dashboard. 17 | 18 | #### 3) Manage multiple workspaces in your browser 19 | Super easy to create workspaces using providers viz. Docker and VirtualBox. Navigate effortlessly from one workspace to the 20 | other. Define boxes, modules, scripts within your workspaces and much more. 21 | 22 | #### 4) Github integration 23 | Share your infrastructure as code on Github from within your Boxupp's control panel. This will help you collaborate, get feedback, 24 | get contributions from your team members or peer groups which will help in seamless development across teams. 25 | 26 | ### Usage Instructions
27 | 28 | 1) Clone the repository on your local machine 29 | 30 | git clone https://www.github.com/boxupp/boxupp.git 31 | 2) Change to the cloned directory 32 | 33 | cd boxupp 34 | 3) Package in Maven 35 | 36 | mvn package 37 | 4) Run the Boxupp program 38 | 39 | cd target\boxuppzipdir\bin 40 | startup.bat OR ./startup.sh 41 | 42 | 5) Start boxupp in your browser at 43 | 44 | http://localhost:<> (By Default 8585) 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | page/index.html 8 | 9 | 10 | 11 | ServletAdaptor 12 | com.sun.jersey.spi.container.servlet.ServletContainer 13 | 14 | com.sun.jersey.config.property.packages 15 | com.boxupp.api 16 | 17 | 18 | com.sun.jersey.api.json.POJOMappingFeature 19 | true 20 | 21 | 1 22 | 23 | 24 | ResourcesServlet 25 | com.sun.jersey.spi.container.servlet.ServletContainer 26 | 27 | com.sun.jersey.config.property.packages 28 | com.boxupp.resources 29 | 30 | 31 | com.sun.jersey.api.json.POJOMappingFeature 32 | true 33 | 34 | 1 35 | 36 | 37 | cross-origin 38 | org.eclipse.jetty.servlets.CrossOriginFilter 39 | 40 | 41 | cross-origin 42 | /* 43 | 44 | 45 | 46 | ServletAdaptor 47 | /* 48 | 49 | 50 | ResourcesServlet 51 | /resources/* 52 | 53 | -------------------------------------------------------------------------------- /bin/docker.txt: -------------------------------------------------------------------------------- 1 | # /etc/sysconfig/docker 2 | # 3 | # Other arguments to pass to the docker daemon process 4 | # These will be parsed by the sysv initscript and appended 5 | # to the arguments list passed to docker -d 6 | 7 | 8 | other_args="--exec-driver=lxc --selinux-enabled" 9 | -------------------------------------------------------------------------------- /bin/shutdown.sh: -------------------------------------------------------------------------------- 1 | #******************************************************************************* 2 | # Copyright 2014 Paxcel Technologies 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | #******************************************************************************* 16 | #! /bin/sh 17 | 18 | sudo pkill -f 'boxupp' 19 | echo "BoxUpp shutdown complete" 20 | if [ $? -ne 0 ]; then 21 | echo "Error stopping BoxUpp Please check logs" 22 | exit 1 23 | fi 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /bin/startup.bat: -------------------------------------------------------------------------------- 1 | @rem *************************************************************************** 2 | @rem Copyright 2014 Paxcel Technologies 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem *************************************************************************** 16 | @echo off 17 | 18 | rem Boxupp startup script 19 | rem www.boxupp.com 20 | rem Powered by Paxcel Technologies Pvt Ltd 21 | rem Copyright 2013 Paxcel Technologies Pvt Ltd 22 | 23 | 24 | SETLOCAL ENABLEEXTENSIONS 25 | IF ERRORLEVEL 1 ECHO Unable to enable extensions GOTO end 26 | 27 | rem *** Check Vagrant is installed or not 28 | 29 | if not "x%PATH:Vagrant=%" == "x%PATH%" goto check_virtualbox 30 | wget http://www.boxupp.com/data/vagrant.msi 31 | IF errorlevel 1 goto vagrantend 32 | vagrant.msi 33 | 34 | rem ***Check Virtual Box is installed in machine or not 35 | 36 | :check_virtualbox 37 | REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox >nul 2>&1 38 | 39 | IF %errorlevel%==0 GOTO up 40 | if %errorlevel%==1 GOTO install_virtalbox 41 | 42 | 43 | 44 | rem *** Install Virtual Box 45 | 46 | :install_virtalbox 47 | echo VirtualBox is not installed installing VirtualBox 48 | wget http://www.boxupp.com/data/VirtualBox-4.3.exe 49 | 50 | rem IF %errorlevel%==0 GOTO up 51 | IF errorlevel 1 goto virtualboxbend 52 | VirtualBox-4.3.exe 53 | 54 | rem Boxupp startup script 55 | 56 | :up 57 | echo Starting BoxUpp 58 | cd .. 59 | SET "BASEDIR="%cd%"" 60 | 61 | start java -Dfile.encoding=UTF-8 -cp %BASEDIR%;%BASEDIR%\lib\*;%BASEDIR%\config; com.boxupp.init.Boxupp 62 | 63 | @echo OFF 64 | for /f "delims=" %%i in ('findstr /i /c:"" config\config.xml') do call :job "%%i" 65 | goto :eof 66 | 67 | :job 68 | 69 | set port=%1 70 | 71 | set port=%port:/=% 72 | set port=%port:<=+% 73 | set port=%port:>=+% 74 | set port=%port:*+portNumber+=% 75 | set port=%port:+=&rem.% 76 | Setlocal EnableDelayedExpansion 77 | set "host=http://localhost:" 78 | set "url=%host%%port%" 79 | echo Boxupp is up at %url% ! 80 | endlocal 81 | 82 | pause 83 | 84 | 85 | :eof 86 | :virtualboxbend 87 | echo Error downloading Oracle VirtualBox Please Check Your Network 88 | pause 89 | 90 | :vagrantend 91 | echo Error downloading Vagrant system Please Check Your Network 92 | pause 93 | 94 | :end 95 | 96 | -------------------------------------------------------------------------------- /bin/wget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/bin/wget.exe -------------------------------------------------------------------------------- /page/css/graph.css: -------------------------------------------------------------------------------- 1 | .node { 2 | cursor: pointer; 3 | } 4 | 5 | .node circle { 6 | fill: #fff; 7 | stroke: steelblue; 8 | stroke-width: 1.5px; 9 | } 10 | 11 | .node text { 12 | font: 10px sans-serif; 13 | } 14 | 15 | .link { 16 | fill: none; 17 | stroke: #ccc; 18 | stroke-width: 1.5px; -------------------------------------------------------------------------------- /page/css/mapping.css: -------------------------------------------------------------------------------- 1 | .node circle { 2 | fill: #fff; 3 | stroke: steelblue; 4 | stroke-width: 1.5px; 5 | } 6 | 7 | .node { 8 | font: 10px sans-serif; 9 | } 10 | 11 | .link { 12 | fill: none; 13 | stroke: #ccc; 14 | stroke-width: 1.5px; 15 | } 16 | .infobox { 17 | border: 2px solid steelblue; 18 | border-radius: 4px; 19 | box-shadow: #333333 0px 0px 10px; 20 | margin: 200px auto; 21 | padding: 5px 10px; 22 | background: rgba(255, 255, 255, 0.8); 23 | position: absolute; 24 | top: 0px; 25 | left: 0px; 26 | z-index: 10500; 27 | font-weight: bold; 28 | } -------------------------------------------------------------------------------- /page/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /page/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /page/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /page/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /page/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /page/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /page/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /page/img/attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/attention.png -------------------------------------------------------------------------------- /page/img/bottomBlueStrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/bottomBlueStrip.png -------------------------------------------------------------------------------- /page/img/boxupp-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/boxupp-icon.png -------------------------------------------------------------------------------- /page/img/bulb-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/bulb-icon.png -------------------------------------------------------------------------------- /page/img/centos-32-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/centos-32-gray.png -------------------------------------------------------------------------------- /page/img/centos-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/centos-32.png -------------------------------------------------------------------------------- /page/img/dashboardLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/dashboardLogo.png -------------------------------------------------------------------------------- /page/img/dd-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/dd-arrow.png -------------------------------------------------------------------------------- /page/img/debian-32-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/debian-32-gray.png -------------------------------------------------------------------------------- /page/img/debian-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/debian-32.png -------------------------------------------------------------------------------- /page/img/divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/divider.png -------------------------------------------------------------------------------- /page/img/dot-pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/dot-pin.png -------------------------------------------------------------------------------- /page/img/formLoader.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/formLoader.GIF -------------------------------------------------------------------------------- /page/img/git-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/git-icon.png -------------------------------------------------------------------------------- /page/img/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/grid.png -------------------------------------------------------------------------------- /page/img/icon-set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/icon-set.png -------------------------------------------------------------------------------- /page/img/img-dotted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/img-dotted.png -------------------------------------------------------------------------------- /page/img/inform-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/inform-icons.png -------------------------------------------------------------------------------- /page/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/logo.png -------------------------------------------------------------------------------- /page/img/redhat-32-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/redhat-32-gray.png -------------------------------------------------------------------------------- /page/img/redhat-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/redhat-32.png -------------------------------------------------------------------------------- /page/img/shell-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/shell-icon.png -------------------------------------------------------------------------------- /page/img/tilebg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/tilebg.png -------------------------------------------------------------------------------- /page/img/ubuntu-32-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/ubuntu-32-gray.png -------------------------------------------------------------------------------- /page/img/ubuntu-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/ubuntu-32.png -------------------------------------------------------------------------------- /page/img/vagrant-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/img/vagrant-icon.png -------------------------------------------------------------------------------- /page/js/angular-messages.min.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | /* 17 | AngularJS v1.3.3 18 | (c) 2010-2014 Google, Inc. http://angularjs.org 19 | License: MIT 20 | */ 21 | (function(r,f,s){'use strict';f.module("ngMessages",[]).directive("ngMessages",["$compile","$animate","$templateRequest",function(q,k,l){return{restrict:"AE",controller:function(){this.$renderNgMessageClasses=f.noop;var b=[];this.registerMessage=function(d,a){for(var c=0;c").html(a);f.forEach(a.children(), 23 | function(a){a=f.element(a);h?h.after(a):d.prepend(a);h=a;q(a)(b)});c.renderMessages(e,g)})}}}]).directive("ngMessage",["$animate",function(f){return{require:"^ngMessages",transclude:"element",terminal:!0,restrict:"AE",link:function(k,l,b,d,a){for(var c,g,e=l[0],n=e.parentNode,h=0,p=0;h 0){ 24 | $(this).trigger('keyup'); 25 | } 26 | }); 27 | }); 28 | 29 | function loaderIntro(){ 30 | $('#lightBox').show(); 31 | $('#loaderWindow').show(); 32 | setTimeout(function(){ 33 | $('#loaderWindow').hide(); 34 | //$('#lightBox').animate({opacity:0},1500); 35 | $("#lightBox").animate({opacity:0}, {duration:1000, complete: function(){ 36 | $('#lightBox').hide(); 37 | }}); 38 | },6000); 39 | } 40 | 41 | $('body').on('click','#invokeShellConsole,button.shellConsoleClose',function(){ 42 | if($("#staticSection span").hasClass('closed')){ 43 | $("#staticSection").click(); 44 | } 45 | }); -------------------------------------------------------------------------------- /page/js/src/directives/boxuppDirectives.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | angular.module('boxuppApp').directive('customScroll',[function(){ 17 | 18 | function link(scope, element, attributes){ 19 | element.perfectScrollbar({ 20 | wheelSpeed: 20, 21 | wheelPropagation: true, 22 | minScrollbarLength: 20 23 | }); 24 | } 25 | 26 | return { 27 | link : link 28 | } 29 | 30 | }]); -------------------------------------------------------------------------------- /page/scss/.sass-cache/226e522357f21da8b53956538ea7642e2dd72000/trial.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/226e522357f21da8b53956538ea7642e2dd72000/trial.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_controlBar.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_controlBar.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_login.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_login.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_modals.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_modals.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_playArea.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_playArea.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_projects.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/3677ab129ca2e890f0c6d15fd6b1d74c9dfed3c0/_projects.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/94435787752034cead0c6be0cf14fee69c53291a/_login.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/94435787752034cead0c6be0cf14fee69c53291a/_login.scssc -------------------------------------------------------------------------------- /page/scss/.sass-cache/94435787752034cead0c6be0cf14fee69c53291a/login.scssc: -------------------------------------------------------------------------------- 1 | 3.4.5 (Selective Steve) 2 | 42a36d6b149804a376b1b5fbbb9a05c4036ca666 3 | o:Sass::Tree::RootNode :@children[o:Sass::Tree::RuleNode: 4 | @rule[I"div.login-container:ET:@parsed_ruleso:"Sass::Selector::CommaSequence: @members[o:Sass::Selector::Sequence; [o:#Sass::Selector::SimpleSequence ; [o:Sass::Selector::Element : 5 | @nameI"div; T:@namespace0: 6 | @linei:@filename0o:Sass::Selector::Class;I"login-container; T;i;0: @subject0: @sourceso:Set: 7 | @hash{:@source_rangeo:Sass::Source::Range :@start_poso:Sass::Source::Position;i: @offseti: @end_poso;;i;i: 8 | @file0:@importer0;i;0;i;0:@selector_source_rangeo; ;o;;i;i;o;;i;i;I"?D:/Workspace/SCG/vagrant/page_new/scss/partials/login.scss; T; o: Sass::Importers::Filesystem: 9 | @rootI"+D:/Workspace/SCG/vagrant/page_new/scss; T:@real_rootI"+D:/Workspace/SCG/vagrant/page_new/scss; T:@same_name_warningso;;{: 10 | @tabsi;[o:Sass::Tree::PropNode;[I" border; T: @valueo: Sass::Script::Tree::Literal;(o: Sass::Script::Value::String;(I"solid 1px #325076; T: 11 | @type:identifier: @options{;i;o; ;o;;i;i;o;;i;i ;@; @;&i:@prop_syntax:new;[;i;o; ;o;;i;i;o;;i;i ;@; @:@name_source_rangeo; ;@/;o;;i;i ;@; @:@value_source_rangeo; ;o;;i;i;@0;@; @;-@)o;';[I"border-radius; T;(o;);(o;*;(I"7px; T;+;,;-@);i;o; ;o;;i;i;o;;i;i;@; @;&i;.;/;[;i;o; ;o;;i;i;o;;i;i;@; @;0o; ;@@;o;;i;i;@; @;1o; ;o;;i;i;@A;@; @;-@)o;';[I"box-shadow; T;(o;);(o;*;(I"inset 0 0 40px #28456c; T;+;,;-@);i ;o; ;o;;i ;i;o;;i ;i);@; @;&i;.;/;[;i ;o; ;o;;i ;i;o;;i ;i);@; @;0o; ;@Q;o;;i ;i;@; @;1o; ;o;;i ;i;@R;@; @;-@);i;o; ;@;o;;i;i;@; @:@has_childrenT;-@):@templateI"qdiv.login-container{ 12 | border: solid 1px #325076; 13 | border-radius: 7px; 14 | box-shadow: inset 0 0 40px #28456c; 15 | }; T;i;o; ;o;;i;i;o;;i;i;@; @;2T;-@) -------------------------------------------------------------------------------- /page/scss/.sass-cache/e47d433545b5209493c1e12b81667cc56086651b/trial.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/page/scss/.sass-cache/e47d433545b5209493c1e12b81667cc56086651b/trial.scssc -------------------------------------------------------------------------------- /page/scss/partials/_controlBar.scss: -------------------------------------------------------------------------------- 1 | div.errorMessage{ 2 | font-size: 11px; 3 | position: absolute; 4 | top: 30px; 5 | right: 20px; 6 | color: #ED7A33; 7 | } 8 | 9 | div#box-quick,div#box-clone{ 10 | div.boxConfig{ 11 | span.boxConfigTitles{ 12 | color:#E5E5E5; 13 | } 14 | } 15 | } 16 | div#ctrlBarPlayArea{ 17 | 18 | ul.ctrl-bar-sec-list, ul.ctrl-bar-main-list{ 19 | li{ 20 | overflow:auto; 21 | a{ 22 | color:#E5E5E5; 23 | font-size:26px; 24 | border-radius : 0px; 25 | height:50px; 26 | cursor:pointer; 27 | } 28 | a:hover{ 29 | background-color: #46505C; 30 | height:50px; 31 | } 32 | } 33 | li.active{ 34 | a{ 35 | background-color: #46505C; 36 | } 37 | } 38 | } 39 | div.sub-section-header{ 40 | @include sub-section-header-styling(); 41 | } 42 | div.ctrl-bar-sec-nav, div.ctrl-bar-main-nav{ 43 | height:165px; 44 | border-right:1px dashed #eee; 45 | } 46 | div#ctrl-bar-box-play-area, div#ctrl-bar-script-play-area, div#ctrl-bar-module-play-area{ 47 | span.boxConfigTitles{ 48 | @include box-config-titles(); 49 | } 50 | div.boxConfig{ 51 | margin-bottom:10px; 52 | 53 | input{ 54 | -webkit-border-radius : 0px; 55 | border-radius : 0px; 56 | background:none; 57 | color:#FFF; 58 | font-family: 'Open Sans', sans-serif; 59 | font-weight: 200; 60 | font-size: 12px; 61 | } 62 | select{ 63 | -webkit-border-radius : 0px; 64 | border-radius : 0px; 65 | } 66 | } 67 | } 68 | div.main-nav-label{ 69 | @include nav-label-styling(); 70 | position:absolute; 71 | top:20px; 72 | left: 54px; 73 | } 74 | div.main-nav-icon{ 75 | float:left; 76 | } 77 | } -------------------------------------------------------------------------------- /page/scss/partials/_login.scss: -------------------------------------------------------------------------------- 1 | div.logo{ 2 | img{ 3 | width : 150px; 4 | } 5 | } 6 | 7 | div.login-container, div.registration-container{ 8 | 9 | background : #444546; 10 | position:absolute; 11 | top:100px; 12 | padding: 20px 15px 20px 15px; 13 | color: white; 14 | 15 | div.message-container{ 16 | position : relative; 17 | top : 50px; 18 | } 19 | 20 | div.form-field{ 21 | margin-top:15px; 22 | width:100%; 23 | float:left; 24 | 25 | span.loginSpinner , span.newRegLoader{ 26 | position:absolute; 27 | top : 2px; 28 | right : 20px; 29 | } 30 | 31 | div.fieldIcon{ 32 | font-size : 24px; 33 | 34 | a{ 35 | width:100%; 36 | border-radius : 0px; 37 | -webkit-border-radius : 0px; 38 | } 39 | 40 | } 41 | input{ 42 | background:none; 43 | border-radius : 0px; 44 | -webkit-border-radius : 0px; 45 | color: #FFF; 46 | } 47 | input[type='button']{ 48 | background:grey; 49 | } 50 | } 51 | 52 | div.registrationAction{ 53 | a{ 54 | cursor : pointer; 55 | } 56 | } 57 | 58 | } -------------------------------------------------------------------------------- /page/scss/partials/_projects.scss: -------------------------------------------------------------------------------- 1 | div.project-container{ 2 | position : absolute; 3 | top:100px; 4 | 5 | 6 | 7 | 8 | span.titleText{ 9 | 10 | font-family: 'Roboto', sans-serif; 11 | font-size: 22px; 12 | line-height: 11px; 13 | font-weight : 100; 14 | color : #FFF; 15 | } 16 | a.titleTextAction{ 17 | font-family: 'Roboto', sans-serif; 18 | font-size: 22px; 19 | line-height: 11px; 20 | font-weight : 300; 21 | } 22 | 23 | ul.projectsList{ 24 | list-style : none; 25 | color : #FFF; 26 | li{ 27 | margin-bottom : 10px; 28 | a{ 29 | display:block; 30 | overflow : auto; 31 | text-decoration: none; 32 | cursor : pointer; 33 | padding : 10px; 34 | background : none ; 35 | border : 1px solid grey; 36 | color:#FFF; 37 | 38 | div.projectLogo{ 39 | font-size : 35px; 40 | float : left; 41 | } 42 | div.projectTitle{ 43 | position : absolute; 44 | left : 94px; 45 | font-family: 'Open Sans', sans-serif; 46 | text-transform: uppercase; 47 | font-weight: 700; 48 | font-size: 11px; 49 | 50 | span{ 51 | color:#71B1D1; 52 | } 53 | } 54 | div.projectDesc{ 55 | overflow:hidden; 56 | position : absolute; 57 | top : 32px; 58 | left : 94px; 59 | width : 66%; 60 | font-family: 'Open Sans', sans-serif; 61 | font-size: 12px; 62 | } 63 | } 64 | a:hover{ 65 | background : #71B1D1; 66 | color : #FFF; 67 | div.projectTitle{ 68 | span{ 69 | color:#FFF; 70 | } 71 | } 72 | } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /page/templates/awsVmConfigurations.html: -------------------------------------------------------------------------------- 1 |
2 | No Boxes found 3 |
4 |
5 | Select a box to manage 6 |
7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
VagrantIDMachine AMIInstance TypeInstance Region
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
SSH User NameHost Name
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
Scripts Mapped
-
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
Modules Mapped
-
78 | 79 | 80 | 83 |
84 | Commit changes 85 | 87 |
88 |
-------------------------------------------------------------------------------- /page/templates/awsWorkspace.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |
6 | 7 |
8 | 9 |
10 | 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 |
47 |
48 |
49 |
50 | 51 |
52 |
53 | -------------------------------------------------------------------------------- /page/templates/containerConfigurations.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | No Boxes found 4 |
5 |
6 | Select a box to manage 7 |
8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
VagrantIDHostNameDocker Image
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
UserNamePasswordProvider
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
Scripts Mapped
-
61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
Modules Mapped
-
79 | 80 | 83 |
84 | Commit changes 85 |
86 |
-------------------------------------------------------------------------------- /page/templates/containerDashboard.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | Boxes 5 |
6 |
7 |
8 | No Boxes are defined for your workspace yet ! 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
#VagrantIDHostNameDocker Image
{{$index + 1}}
28 |
29 |
30 |
31 |
32 | Scripts 33 |
34 |
35 |
36 | No Scripts are defined for your workspace yet ! 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
#ScriptIDScript Name
{{$index + 1}}
54 |
55 |
56 |
57 |
58 | Modules 59 |
60 |
61 |
62 | No Modules are defined for your workspace yet ! 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
#ModuleIDModule Name
{{$index + 1}}
80 | 81 |
82 |
83 |
84 | 85 | 86 | 92 | -------------------------------------------------------------------------------- /page/templates/dockerDashboard.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
7 | 8 |
9 | 10 | 11 |
12 | 13 |
14 | 15 | 16 | 17 |
18 | 19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 49 |
50 |
51 | 58 | -------------------------------------------------------------------------------- /page/templates/modals/console.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /page/templates/modals/scriptModal.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /page/templates/modules/moduleConfigurations.html: -------------------------------------------------------------------------------- 1 |
2 | No Modules found 3 |
4 |
5 | Select a module to manage 6 |
7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
Module NameCreation TimeDownloadsAuthor
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
VersionUpdation TimeSupportedMetaData Name
45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
File SizeLicenseSummaryOwner Name
64 |
65 | 66 |
-------------------------------------------------------------------------------- /page/templates/navData.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /page/templates/nodes.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /page/templates/projectInit.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 |
-------------------------------------------------------------------------------- /page/templates/provisioners/puppetProvisioner.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 | Choose a machine 7 |
8 |
9 | 10 |
11 | 17 |
18 | 34 |
35 |
36 |
37 | 38 | 39 | 40 |
41 | 42 |
43 |
44 | Choose from your modules 45 |
46 |
47 | 48 |
49 | 50 | 56 | 57 | 58 |
    59 |
  • 60 |
    61 | 62 |
    63 | 66 |
    67 | {{module.moduleName}} 68 |
    69 |
  • 70 |
71 |
72 | 73 |
74 | 75 | 76 |
77 | APPLY 78 |
79 |
-------------------------------------------------------------------------------- /page/templates/provisioners/shellProvisioner.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 |
8 |
9 |
10 | Choose a machine 11 |
12 |
13 | 14 |
15 | 21 | 38 |
39 |
40 | 41 | 42 | 43 | 44 |
45 | 46 |
47 |
48 | Choose from your scripts 49 |
50 |
51 | 52 |
53 | 54 | 60 |
    61 |
  • 62 |
    63 | 64 |
    65 | 68 |
    69 | {{script.scriptName}} 70 |
    71 |
  • 72 |
73 | 74 |
75 |
76 | 77 | 78 |
79 | APPLY 80 |
81 |
-------------------------------------------------------------------------------- /page/templates/scripts/scriptConfigurations.html: -------------------------------------------------------------------------------- 1 |
2 | No Scripts found 3 |
4 |
5 | Select a script to manage 6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
Script Name
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
Created on
34 |
35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /page/templates/shellProvisioner.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /page/templates/vagrantUpload.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /page/templates/vboxDashboard.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |
6 | 7 |
8 | 9 |
10 | 11 | 12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 |
47 |
48 |
49 |
50 | 51 |
52 |
53 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/AppContextBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | 17 | package com.boxupp; 18 | 19 | import org.apache.logging.log4j.LogManager; 20 | import org.apache.logging.log4j.Logger; 21 | import org.eclipse.jetty.server.handler.ResourceHandler; 22 | import org.eclipse.jetty.servlet.ServletContextHandler; 23 | import org.eclipse.jetty.webapp.WebAppContext; 24 | 25 | public class AppContextBuilder { 26 | private static Logger logger = LogManager.getLogger(AppContextBuilder.class.getName()); 27 | private WebAppContext webAppContext; 28 | private ResourceHandler staticResourceContext; 29 | 30 | public WebAppContext getWebAppHandler(){ 31 | 32 | webAppContext = new WebAppContext(); 33 | webAppContext.setResourceBase("."); 34 | webAppContext.setContextPath("/boxupp/*"); 35 | webAppContext.setDescriptor("/web.xml"); 36 | logger.debug("webApp contextPath Initialized"); 37 | 38 | return webAppContext; 39 | } 40 | 41 | public ResourceHandler getStaticResourceHandler(){ 42 | 43 | staticResourceContext = new ResourceHandler(); 44 | staticResourceContext.setDirectoriesListed(true); 45 | staticResourceContext.setWelcomeFiles(new String[]{ "index.html" }); 46 | staticResourceContext.setResourceBase("./page"); 47 | logger.debug("static contextPath Initialized"); 48 | 49 | return staticResourceContext; 50 | 51 | } 52 | 53 | public ServletContextHandler getWebSocketHandler(){ 54 | 55 | ServletContextHandler webSocketContext = new ServletContextHandler(ServletContextHandler.SESSIONS); 56 | return webSocketContext; 57 | } 58 | } 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/JettyServer.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp; 17 | 18 | import org.eclipse.jetty.server.Server; 19 | import org.eclipse.jetty.server.handler.ContextHandlerCollection; 20 | import org.eclipse.jetty.server.handler.HandlerCollection; 21 | 22 | public class JettyServer { 23 | 24 | private Server server; 25 | 26 | public JettyServer() { 27 | this(9000); 28 | } 29 | public JettyServer(Integer runningPort) { 30 | server = new Server(runningPort); 31 | } 32 | 33 | public void setHandler(ContextHandlerCollection contexts) { 34 | 35 | server.setHandler(contexts); 36 | } 37 | 38 | public void setHandler(HandlerCollection contexts) { 39 | 40 | server.setHandler(contexts); 41 | } 42 | 43 | public void start() throws Exception { 44 | server.start(); 45 | } 46 | 47 | public void stop() throws Exception { 48 | server.stop(); 49 | server.join(); 50 | } 51 | 52 | public boolean isStarted() { 53 | return server.isStarted(); 54 | } 55 | 56 | public boolean isStopped() { 57 | return server.isStopped(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/PropertyReader.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | import java.util.Properties; 21 | 22 | import org.apache.logging.log4j.LogManager; 23 | import org.apache.logging.log4j.Logger; 24 | 25 | public class PropertyReader { 26 | private static Logger logger = LogManager.getLogger(PropertyReader.class.getName()); 27 | private static Properties propertyFile = null; 28 | 29 | public static Properties getInstance(){ 30 | if(propertyFile == null){ 31 | try{ 32 | new PropertyReader(); 33 | } 34 | catch(Exception e){ 35 | logger.error("Error reading config.properties file"); 36 | } 37 | } 38 | return propertyFile; 39 | } 40 | public PropertyReader() throws IOException{ 41 | propertyFile = new Properties(); 42 | InputStream propertiesStream = getClass().getResourceAsStream("/config.properties"); 43 | propertyFile.load(propertiesStream); 44 | } 45 | public static void main(String args[]) throws IOException{ 46 | PropertyReader.getInstance(); 47 | 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/SocketManager.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp; 17 | 18 | import org.eclipse.jetty.server.handler.ContextHandler; 19 | import org.eclipse.jetty.websocket.server.WebSocketHandler; 20 | import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; 21 | 22 | 23 | 24 | public class SocketManager { 25 | /*private WebSocketHandler context; 26 | 27 | public SocketManager(WebSocketHandler context){ 28 | this.context = context; 29 | } 30 | 31 | public ContextHandler initiate(){ 32 | 33 | this.addWebSocket(VagrantConsole.class, "/appConsole/"); 34 | this.addWebSocket(list,AppDataUpdater.class, "/appDataUpdater/"); 35 | }*/ 36 | 37 | /*public void addWebSocket(WebSocketHandler contextHandler,final Class webSocket, String contextPath){ 38 | contextHandler.addServlet(new ServletHolder(new WebSocketsServletFactory(webSocket)),contextPath); 39 | 40 | }*/ 41 | 42 | public ContextHandler addWebSocket(final Class webSocket, String contextPath){ 43 | WebSocketHandler wsHandler = new WebSocketHandler(){ 44 | @Override 45 | public void configure(WebSocketServletFactory webSocketServletFactory) { 46 | webSocketServletFactory.register(webSocket); 47 | } 48 | }; 49 | 50 | ContextHandler wsContextHandler = new ContextHandler(); 51 | wsContextHandler.setHandler(wsHandler); 52 | wsContextHandler.setContextPath(contextPath); 53 | return wsContextHandler; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/ToolConfigurationReader.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | 21 | import javax.xml.bind.Binder; 22 | import javax.xml.bind.JAXBContext; 23 | import javax.xml.bind.JAXBException; 24 | import javax.xml.parsers.DocumentBuilder; 25 | import javax.xml.parsers.DocumentBuilderFactory; 26 | import javax.xml.parsers.ParserConfigurationException; 27 | 28 | import org.apache.logging.log4j.LogManager; 29 | import org.apache.logging.log4j.Logger; 30 | import org.w3c.dom.Document; 31 | import org.w3c.dom.Node; 32 | import org.xml.sax.SAXException; 33 | 34 | import com.boxupp.beans.Config; 35 | 36 | public class ToolConfigurationReader { 37 | private static Logger logger = LogManager.getLogger(ToolConfigurationReader.class.getName()); 38 | 39 | public Config getConfiguration(){ 40 | 41 | JAXBContext jc; 42 | Config config = null ; 43 | try { 44 | jc = JAXBContext.newInstance(Config.class); 45 | InputStream toolSettings = getClass().getResourceAsStream("/config.xml"); 46 | DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); 47 | DocumentBuilder db; 48 | db = dbf.newDocumentBuilder(); 49 | Document doc; 50 | doc = db.parse(toolSettings); 51 | Binder binder = jc.createBinder(); 52 | config = (Config) binder.unmarshal(doc); 53 | binder.updateXML(config); 54 | } catch (ParserConfigurationException e) { 55 | logger.error("Error in parsing configuration file :"+e.getMessage()); 56 | } catch (SAXException e) { 57 | logger.error("Error in reading configuration file :"+e.getMessage()); 58 | } catch (IOException e) { 59 | logger.error("Error in reading configuration file :"+e.getMessage()); 60 | } catch (JAXBException e) { 61 | logger.error("Error in reading configuration file :"+e.getMessage()); 62 | } 63 | return config; 64 | 65 | } 66 | } -------------------------------------------------------------------------------- /src/main/java/com/boxupp/VagrantOutputStream.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp; 17 | 18 | import java.util.LinkedList; 19 | import java.util.NoSuchElementException; 20 | 21 | import com.boxupp.responseBeans.VagrantOutput; 22 | import com.boxupp.responseBeans.VagrantStreamError; 23 | import com.boxupp.responseBeans.VagrantStreamOutput; 24 | import com.boxupp.ws.OutputConsole; 25 | 26 | public class VagrantOutputStream implements OutputConsole{ 27 | private static LinkedList output = new LinkedList(); 28 | 29 | public void pushOutput(String data){ 30 | VagrantStreamOutput vagrantStreamOutput = new VagrantStreamOutput(); 31 | vagrantStreamOutput.setOutput(data); 32 | output.add(vagrantStreamOutput); 33 | } 34 | 35 | public void flushData(){ 36 | output.clear(); 37 | } 38 | 39 | public void pushError(String data){ 40 | VagrantStreamError vagrantStreamError = new VagrantStreamError(); 41 | vagrantStreamError.setOutput(data); 42 | output.add(vagrantStreamError); 43 | } 44 | 45 | public void pushDataTermination(){ 46 | VagrantStreamOutput vagrantStreamOutput = new VagrantStreamOutput(); 47 | vagrantStreamOutput.setOutput("Execution Completed"); 48 | vagrantStreamOutput.setDataEnd(true); 49 | output.add(vagrantStreamOutput); 50 | } 51 | 52 | public static VagrantOutput pop(){ 53 | try{ 54 | return output.remove(); 55 | } 56 | catch(NoSuchElementException e){ 57 | VagrantStreamOutput vagrantEmptyOutput = new VagrantStreamOutput(); 58 | vagrantEmptyOutput.setOutput(""); 59 | vagrantEmptyOutput.setType("empty"); 60 | return vagrantEmptyOutput; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/WebSocketsServletFactory.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp; 17 | 18 | import org.eclipse.jetty.websocket.api.annotations.WebSocket; 19 | import org.eclipse.jetty.websocket.servlet.WebSocketServlet; 20 | import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; 21 | 22 | @WebSocket 23 | public class WebSocketsServletFactory extends WebSocketServlet { 24 | 25 | private Class webSocket = null; 26 | public WebSocketsServletFactory( Class webSocket){ 27 | this.webSocket = webSocket; 28 | } 29 | 30 | @Override 31 | public void configure(WebSocketServletFactory factory) { 32 | factory.register(this.webSocket); 33 | 34 | } 35 | 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/api/ProjectController.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.api; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.ws.rs.GET; 21 | import javax.ws.rs.Path; 22 | import javax.ws.rs.Produces; 23 | import javax.ws.rs.core.MediaType; 24 | 25 | import com.boxupp.VagrantOutputStream; 26 | import com.boxupp.responseBeans.VagrantOutput; 27 | 28 | @Path("/project/") 29 | public class ProjectController { 30 | 31 | @GET 32 | @Path("/getStream") 33 | @Produces(MediaType.APPLICATION_JSON) 34 | public VagrantOutput getStream() throws IOException{ 35 | return VagrantOutputStream.pop(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/api/UploadHandler.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.api; 17 | 18 | import javax.servlet.http.HttpServletRequest; 19 | import javax.servlet.http.HttpServletResponse; 20 | import javax.ws.rs.Consumes; 21 | import javax.ws.rs.POST; 22 | import javax.ws.rs.Path; 23 | import javax.ws.rs.core.Context; 24 | import javax.ws.rs.core.MediaType; 25 | 26 | import org.apache.logging.log4j.LogManager; 27 | import org.apache.logging.log4j.Logger; 28 | 29 | @Path("/uploadHandler") 30 | public class UploadHandler { 31 | 32 | private static Logger logger = LogManager.getLogger(UploadHandler.class.getName()); 33 | private static String selectedModule = ""; 34 | private static boolean isModuleDefined; 35 | 36 | @POST 37 | @Path("/destination") 38 | @Consumes(MediaType.APPLICATION_FORM_URLENCODED) 39 | public void setDestinationFolder(@Context HttpServletRequest request, @Context HttpServletResponse response){ 40 | String destinationFolder = request.getParameter("loc"); 41 | if(destinationFolder != null){ 42 | UploadHandler.selectedModule = destinationFolder; 43 | UploadHandler.isModuleDefined = true; 44 | }else{ 45 | UploadHandler.isModuleDefined = false; 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/beans/Config.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.beans; 17 | 18 | import java.util.ArrayList; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.*; 22 | 23 | @XmlRootElement 24 | @XmlAccessorType(XmlAccessType.FIELD) 25 | public class Config { 26 | 27 | @XmlElement(name = "provider") 28 | private ArrayList ProviderList; 29 | 30 | @XmlElement(name = "setting") 31 | private Setting setting; 32 | 33 | public ArrayList getProviderList() { 34 | return ProviderList; 35 | } 36 | 37 | public void setProviderList(ArrayList providerList) { 38 | ProviderList = providerList; 39 | } 40 | 41 | public Setting getSetting() { 42 | return setting; 43 | } 44 | 45 | public void setSetting(Setting setting) { 46 | this.setting = setting; 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /src/main/java/com/boxupp/beans/LogBean.java: -------------------------------------------------------------------------------- 1 | package com.boxupp.beans; 2 | 3 | import java.sql.Time; 4 | import java.util.Date; 5 | 6 | public class LogBean { 7 | 8 | private Integer userID; 9 | private Integer projectID; 10 | private String vagrantID; 11 | private String status; 12 | private String time; 13 | private String filename; 14 | 15 | public Integer getUserID() { 16 | return userID; 17 | } 18 | public void setUserID(Integer userID) { 19 | this.userID = userID; 20 | } 21 | public Integer getProjectID() { 22 | return projectID; 23 | } 24 | public void setProjectID(Integer projectID) { 25 | this.projectID = projectID; 26 | } 27 | public String getVagrantID() { 28 | return vagrantID; 29 | } 30 | public void setVagrantID(String vagrantID) { 31 | this.vagrantID = vagrantID; 32 | } 33 | public String getStatus() { 34 | return status; 35 | } 36 | public void setStatus(String status) { 37 | this.status = status; 38 | } 39 | public String getFilename() { 40 | return filename; 41 | } 42 | public void setFilename(String filename) { 43 | this.filename = filename; 44 | } 45 | public String getTime() { 46 | return time; 47 | } 48 | public void setTime(String time) { 49 | this.time = time; 50 | } 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/beans/Provider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.beans; 17 | 18 | import javax.xml.bind.annotation.XmlAccessType; 19 | import javax.xml.bind.annotation.XmlAccessorType; 20 | 21 | @XmlAccessorType(XmlAccessType.FIELD) 22 | public class Provider { 23 | private String name; 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/beans/Setting.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.beans; 17 | 18 | 19 | import javax.xml.bind.annotation.*; 20 | 21 | @XmlAccessorType(XmlAccessType.FIELD) 22 | public class Setting { 23 | 24 | private String portNumber; 25 | 26 | public String getPortNumber() { 27 | return portNumber; 28 | } 29 | 30 | public void setPortNumber(String portNumber) { 31 | this.portNumber = portNumber; 32 | } 33 | 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/dao/DAOImplInterface.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.dao; 17 | 18 | import org.codehaus.jackson.JsonNode; 19 | 20 | import com.boxupp.responseBeans.StatusBean; 21 | 22 | public interface DAOImplInterface { 23 | public StatusBean create(JsonNode data); 24 | 25 | public T read(String ID); 26 | 27 | public StatusBean update(JsonNode updatedData); 28 | 29 | public StatusBean delete(String ID); 30 | 31 | /*public StatusBean createMappedDB(String MappedId, JsonNode newData); 32 | 33 | public List readAllDB(); 34 | 35 | public List readMappedData(String MappedId); 36 | 37 | public T populateMappingBean(T mappingBean, String...ids);*/ 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/dao/ProviderDAOManager.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.dao; 17 | 18 | import java.sql.SQLException; 19 | import java.util.List; 20 | 21 | import org.apache.logging.log4j.LogManager; 22 | import org.apache.logging.log4j.Logger; 23 | import org.codehaus.jackson.JsonNode; 24 | 25 | import com.boxupp.db.DAOProvider; 26 | import com.boxupp.db.beans.ProviderBean; 27 | import com.boxupp.responseBeans.StatusBean; 28 | import com.j256.ormlite.dao.Dao; 29 | 30 | public class ProviderDAOManager implements DAOImplInterface { 31 | private static Logger logger = LogManager.getLogger(ProjectDAOManager.class.getName()); 32 | 33 | public static Dao providerDao = null; 34 | private static ProviderDAOManager providerDAOManager; 35 | 36 | public static ProviderDAOManager getInstance(){ 37 | if(providerDAOManager == null){ 38 | providerDAOManager = new ProviderDAOManager(); 39 | } 40 | return providerDAOManager; 41 | } 42 | 43 | private ProviderDAOManager() { 44 | providerDao = DAOProvider.getInstance().fetchDao(ProviderBean.class); 45 | } 46 | @Override 47 | public StatusBean create(JsonNode newData) { 48 | return null; 49 | } 50 | 51 | 52 | public List retireveProviders() { 53 | List providerList = null; 54 | try{ 55 | providerList = providerDao.queryForAll(); 56 | }catch(SQLException e){ 57 | logger.error("Error querying the provider list from DB : " + e.getMessage()); 58 | } 59 | return (List) providerList; 60 | } 61 | 62 | @Override 63 | public T read(String providerID) { 64 | ProviderBean providerBean= null; 65 | try{ 66 | providerBean = providerDao.queryForId(Integer.parseInt(providerID)); 67 | }catch(SQLException e){ 68 | logger.error("Error querying the providers list from DB : " + e.getMessage()); 69 | } 70 | return (T) providerBean; 71 | } 72 | 73 | @Override 74 | public StatusBean update(JsonNode updatedData) { 75 | return null; 76 | } 77 | 78 | @Override 79 | public StatusBean delete(String id) { 80 | return null; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/CreateDB.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db; 17 | 18 | import java.sql.SQLException; 19 | import org.apache.logging.log4j.LogManager; 20 | import org.apache.logging.log4j.Logger; 21 | 22 | import com.boxupp.db.beans.ProjectBean; 23 | import com.j256.ormlite.dao.Dao; 24 | import com.j256.ormlite.dao.DaoManager; 25 | import com.j256.ormlite.jdbc.JdbcConnectionSource; 26 | import com.j256.ormlite.support.ConnectionSource; 27 | import com.j256.ormlite.table.TableUtils; 28 | 29 | public class CreateDB { 30 | 31 | 32 | private static Logger logger = LogManager.getLogger(CreateDB.class.getName()); 33 | 34 | 35 | public static void main(String args[]) throws ClassNotFoundException, SQLException { 36 | 37 | ConnectionSource connectionSource = new JdbcConnectionSource(DerbyConfig.JDBC_URL); 38 | Dao projectDao = DaoManager.createDao(connectionSource, ProjectBean.class); 39 | connectionSource.close(); 40 | TableUtils.createTable(connectionSource, ProjectBean.class); 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/DerbyConfig.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db; 17 | 18 | import org.apache.logging.log4j.LogManager; 19 | import org.apache.logging.log4j.Logger; 20 | 21 | import com.boxupp.utilities.OSProperties; 22 | 23 | public class DerbyConfig { 24 | 25 | public static final String JDBC_URL = "jdbc:derby:"+ getDatabaseLocation() +";create=true"; 26 | 27 | private static Logger logger = LogManager.getLogger(DerbyConfig.class.getName()); 28 | 29 | public static String getDatabaseLocation(){ 30 | return OSProperties.getInstance().getUserHomeDirectory() + 31 | OSProperties.getInstance().getOSFileSeparator() + 32 | OSProperties.getInstance().getPrimaryFolderName() + 33 | OSProperties.getInstance().getOSFileSeparator() + 34 | OSProperties.getInstance().getDatabaseFolderName(); 35 | } 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/DerbyStates.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db; 17 | 18 | import java.sql.SQLException; 19 | 20 | public class DerbyStates { 21 | public static boolean tableAlreadyExists(SQLException e){ 22 | return e.getSQLState().equalsIgnoreCase("X0Y32"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/AwsProjectCredentialsBean.java: -------------------------------------------------------------------------------- 1 | package com.boxupp.db.beans; 2 | 3 | import com.j256.ormlite.field.DatabaseField; 4 | import com.j256.ormlite.table.DatabaseTable; 5 | 6 | @DatabaseTable(tableName="awsProjectCredentials") 7 | public class AwsProjectCredentialsBean { 8 | 9 | public static final String ID_FIELD_NAME = "awsCredentialsID"; 10 | 11 | @DatabaseField(canBeNull=false,generatedId=true,useGetSet=true,columnName=ID_FIELD_NAME) 12 | private Integer awsCredentialsID; 13 | 14 | @DatabaseField(canBeNull=false,useGetSet=true) 15 | private String awsAccessKeyId; 16 | 17 | @DatabaseField(canBeNull=false,useGetSet=true) 18 | private String awsSecretAccessKey; 19 | 20 | @DatabaseField(canBeNull=false,useGetSet=true) 21 | private String awsKeyPair; 22 | 23 | @DatabaseField(canBeNull=false,useGetSet=true) 24 | private String privateKeyPath; 25 | 26 | public Integer getAwsCredentialsID(){ 27 | return awsCredentialsID; 28 | } 29 | 30 | public void setAwsCredentialsID(Integer awsCredentialsID){ 31 | this.awsCredentialsID=awsCredentialsID; 32 | } 33 | 34 | public String getAwsAccessKeyId(){ 35 | return awsAccessKeyId; 36 | } 37 | 38 | public void setAwsAccessKeyId(String awsAccessKeyId){ 39 | this.awsAccessKeyId=awsAccessKeyId; 40 | } 41 | 42 | public String getAwsSecretAccessKey(){ 43 | return awsSecretAccessKey; 44 | } 45 | 46 | public void setAwsSecretAccessKey(String awsSecretAccessKey){ 47 | this.awsSecretAccessKey=awsSecretAccessKey; 48 | } 49 | 50 | public String getAwsKeyPair(){ 51 | return awsKeyPair; 52 | } 53 | 54 | public void setAwsKeyPair(String awsKeyPair){ 55 | this.awsKeyPair=awsKeyPair; 56 | } 57 | 58 | public String getPrivateKeyPath(){ 59 | return privateKeyPath; 60 | } 61 | 62 | public void setPrivateKeyPath(String privateKeyPath){ 63 | this.privateKeyPath=privateKeyPath; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/DefaultConfigMapping.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | 20 | public class DefaultConfigMapping { 21 | 22 | @DatabaseField(canBeNull = false, generatedId= true, useGetSet = true) 23 | private Integer ID; 24 | 25 | @DatabaseField(canBeNull = false, useGetSet = true) 26 | private String projectID; 27 | 28 | @DatabaseField( canBeNull = false, useGetSet = true) 29 | private Integer defaultConfigID; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/DockerLinkBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "container_link") 22 | public class DockerLinkBean { 23 | public static final String MACHINE_ID_FIELD_NAME = "machineID"; 24 | 25 | @DatabaseField(foreign = true,foreignAutoRefresh = true, columnName = MACHINE_ID_FIELD_NAME) 26 | private MachineConfigurationBean machineConfig; 27 | 28 | @DatabaseField(useGetSet = true) 29 | private Integer linkedMachineID; 30 | 31 | public MachineConfigurationBean getMachineConfig() { 32 | return machineConfig; 33 | } 34 | public void setMachineConfig(MachineConfigurationBean machineConfig) { 35 | this.machineConfig = machineConfig; 36 | } 37 | public Integer getLinkedMachineID() { 38 | return linkedMachineID; 39 | } 40 | public void setLinkedMachineID(Integer linkedMachineID) { 41 | this.linkedMachineID = linkedMachineID; 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ForwardedPortsBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "forwarded_port") 22 | public class ForwardedPortsBean { 23 | 24 | public static final String MACHINE_ID_FIELD_NAME = "machineID"; 25 | 26 | @DatabaseField(foreign = true, foreignAutoRefresh = true, columnName = MACHINE_ID_FIELD_NAME) 27 | private MachineConfigurationBean machineConfig; 28 | 29 | @DatabaseField(useGetSet = true) 30 | private String hostPort; 31 | 32 | @DatabaseField(useGetSet = true) 33 | private String vmPort; 34 | 35 | public String getHostPort() { 36 | return hostPort; 37 | } 38 | public void setHostPort(String hostPort) { 39 | this.hostPort = hostPort; 40 | } 41 | public String getVmPort() { 42 | return vmPort; 43 | } 44 | public void setVmPort(String vmPort) { 45 | this.vmPort = vmPort; 46 | } 47 | public MachineConfigurationBean getMachineConfig() { 48 | return machineConfig; 49 | } 50 | public void setMachineConfig(MachineConfigurationBean machineConfig) { 51 | this.machineConfig = machineConfig; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/GitRepoBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "git_repo_details") 22 | public class GitRepoBean { 23 | 24 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 25 | private Integer gitRepoID; 26 | 27 | @DatabaseField(useGetSet = true) 28 | private String userName; 29 | 30 | @DatabaseField(useGetSet = true) 31 | private String Password; 32 | 33 | @DatabaseField(useGetSet = true) 34 | private String repoName; 35 | 36 | @DatabaseField(useGetSet = true) 37 | private String branch; 38 | 39 | @DatabaseField(useGetSet = true) 40 | private String path; 41 | 42 | @DatabaseField(useGetSet = true) 43 | private String comment; 44 | 45 | public Integer getGitRepoID() { 46 | return gitRepoID; 47 | } 48 | 49 | public void setGitRepoID(Integer gitRepoID) { 50 | this.gitRepoID = gitRepoID; 51 | } 52 | 53 | public String getUserName() { 54 | return userName; 55 | } 56 | 57 | public void setUserName(String userName) { 58 | this.userName = userName; 59 | } 60 | 61 | public String getPassword() { 62 | return Password; 63 | } 64 | 65 | public void setPassword(String password) { 66 | Password = password; 67 | } 68 | 69 | public String getRepoName() { 70 | return repoName; 71 | } 72 | 73 | public void setRepoName(String repoName) { 74 | this.repoName = repoName; 75 | } 76 | 77 | public String getBranch() { 78 | return branch; 79 | } 80 | 81 | public void setBranch(String branch) { 82 | this.branch = branch; 83 | } 84 | 85 | public String getPath() { 86 | return path; 87 | } 88 | 89 | public void setPath(String path) { 90 | this.path = path; 91 | } 92 | 93 | public String getComment() { 94 | return comment; 95 | } 96 | 97 | public void setComment(String comment) { 98 | this.comment = comment; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/GitRepoMapping.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "gitRepoMapping") 22 | public class GitRepoMapping { 23 | public final static String PROJECT_ID_FIELD_NAME = "projectID"; 24 | 25 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 26 | private Integer ID; 27 | 28 | @DatabaseField(foreign = true, useGetSet = true, columnName =PROJECT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 29 | private ProjectBean project; 30 | 31 | public Integer getID() { 32 | return ID; 33 | } 34 | 35 | public void setID(Integer ID) { 36 | this.ID = ID; 37 | } 38 | 39 | public ProjectBean getProject() { 40 | return project; 41 | } 42 | 43 | public void setProject(ProjectBean project) { 44 | this.project = project; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/MachineProjectMapping.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "machineProjectMapping") 22 | public class MachineProjectMapping { 23 | public final static String MACHINE_ID_FIELD_NAME = "machineID"; 24 | public final static String PROJECT_ID_FIELD_NAME = "projectID"; 25 | public MachineProjectMapping( ProjectBean project, 26 | MachineConfigurationBean machineConfig) { 27 | super(); 28 | this.project = project; 29 | this.machineConfig = machineConfig; 30 | } 31 | 32 | public MachineProjectMapping(){ 33 | 34 | } 35 | 36 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 37 | private Integer ID; 38 | 39 | @DatabaseField(foreign = true, useGetSet = true, columnName =PROJECT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 40 | private ProjectBean project; 41 | 42 | @DatabaseField(foreign = true, useGetSet = true, columnName = MACHINE_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 43 | private MachineConfigurationBean machineConfig; 44 | 45 | public Integer getID() { 46 | return ID; 47 | } 48 | public void setID(Integer ID) { 49 | this.ID = ID; 50 | } 51 | public ProjectBean getProject() { 52 | return project; 53 | } 54 | public void setProject(ProjectBean project) { 55 | this.project = project; 56 | } 57 | public MachineConfigurationBean getMachineConfig() { 58 | return machineConfig; 59 | } 60 | public void setMachineConfig(MachineConfigurationBean machineConfig) { 61 | this.machineConfig = machineConfig; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ModuleCurrentReleaseBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | public class ModuleCurrentReleaseBean { 19 | 20 | private String uri; 21 | private String version; 22 | private String file_uri; 23 | private Integer file_size; 24 | private ModuleMetaDataBean metadata; 25 | 26 | public String getUri() { 27 | return uri; 28 | } 29 | public void setUri(String uri) { 30 | this.uri = uri; 31 | } 32 | public String getVersion() { 33 | return version; 34 | } 35 | public void setVersion(String version) { 36 | this.version = version; 37 | } 38 | public ModuleMetaDataBean getMetadata() { 39 | return metadata; 40 | } 41 | public void setMetadata(ModuleMetaDataBean metadata) { 42 | this.metadata = metadata; 43 | } 44 | public String getFile_uri() { 45 | return file_uri; 46 | } 47 | public void setFile_uri(String file_uri) { 48 | this.file_uri = file_uri; 49 | } 50 | public Integer getFile_size() { 51 | return file_size; 52 | } 53 | public void setFile_size(Integer file_size) { 54 | this.file_size = file_size; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ModuleMetaDataBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | public class ModuleMetaDataBean { 19 | 20 | private String name; 21 | private String version; 22 | private String summary; 23 | private String license; 24 | private String description; 25 | private String author; 26 | private String[] tags; 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | public String getVersion() { 35 | return version; 36 | } 37 | public void setVersion(String version) { 38 | this.version = version; 39 | } 40 | public String getSummary() { 41 | return summary; 42 | } 43 | public void setSummary(String summary) { 44 | this.summary = summary; 45 | } 46 | public String getLicense() { 47 | return license; 48 | } 49 | public void setLicense(String license) { 50 | this.license = license; 51 | } 52 | public String getDescription() { 53 | return description; 54 | } 55 | public void setDescription(String description) { 56 | this.description = description; 57 | } 58 | public String getAuthor() { 59 | return author; 60 | } 61 | public void setAuthor(String author) { 62 | this.author = author; 63 | } 64 | 65 | public String[] getTags() { 66 | return tags; 67 | } 68 | public void setTags(String[] tags) { 69 | this.tags = tags; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ModuleOwnerBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | public class ModuleOwnerBean { 19 | 20 | private String uri; 21 | private String username; 22 | private String gravatar_id; 23 | 24 | public String getUri() { 25 | return uri; 26 | } 27 | public void setUri(String uri) { 28 | this.uri = uri; 29 | } 30 | public String getUsername() { 31 | return username; 32 | } 33 | public void setUsername(String username) { 34 | this.username = username; 35 | } 36 | public String getGravatar_id() { 37 | return gravatar_id; 38 | } 39 | public void setGravatar_id(String gravatar_id) { 40 | this.gravatar_id = gravatar_id; 41 | } 42 | 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ProjectAwsCredentialsMapping.java: -------------------------------------------------------------------------------- 1 | package com.boxupp.db.beans; 2 | 3 | import com.j256.ormlite.field.DatabaseField; 4 | import com.j256.ormlite.table.DatabaseTable; 5 | 6 | @DatabaseTable(tableName="projectAwsCredentialsMapping") 7 | public class ProjectAwsCredentialsMapping { 8 | 9 | public final static String CREDENTIALS_ID_FIELD_NAME = "awsCredentialsID"; 10 | public final static String PROJECT_ID_FIELD_NAME = "projectID"; 11 | 12 | public ProjectAwsCredentialsMapping(ProjectBean projectId,AwsProjectCredentialsBean awsCredentialsId){ 13 | super(); 14 | this.projectID = projectId; 15 | this.awsCredentialsID=awsCredentialsId; 16 | } 17 | public ProjectAwsCredentialsMapping(){ 18 | 19 | } 20 | 21 | @DatabaseField(canBeNull=false,useGetSet=true,generatedId=true) 22 | private Integer ID; 23 | 24 | @DatabaseField(foreign = true, useGetSet = true, columnName =PROJECT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 25 | private ProjectBean projectID; 26 | 27 | @DatabaseField(foreign = true, useGetSet = true, columnName = CREDENTIALS_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 28 | private AwsProjectCredentialsBean awsCredentialsID; 29 | 30 | public Integer getID(){ 31 | return ID; 32 | } 33 | 34 | public void setID(Integer ID){ 35 | this.ID=ID; 36 | } 37 | 38 | public ProjectBean getProjectID(){ 39 | return projectID; 40 | } 41 | 42 | public void setProjectID(ProjectBean projectId){ 43 | this.projectID=projectId; 44 | } 45 | 46 | public AwsProjectCredentialsBean getAwsCredentialsID(){ 47 | return awsCredentialsID; 48 | } 49 | 50 | public void setAwsCredentialsID(AwsProjectCredentialsBean awsCredentialsId){ 51 | this.awsCredentialsID=awsCredentialsId; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ProjectBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import java.sql.Date; 19 | 20 | import com.j256.ormlite.field.DatabaseField; 21 | import com.j256.ormlite.table.DatabaseTable; 22 | 23 | @DatabaseTable(tableName = "project") 24 | public class ProjectBean { 25 | 26 | public static final String ID_FIELD_NAME = "projectID"; 27 | 28 | @DatabaseField(canBeNull = false, generatedId=true, useGetSet = true, columnName=ID_FIELD_NAME) 29 | private Integer projectID; 30 | 31 | @DatabaseField(useGetSet = true) 32 | private String name; 33 | 34 | @DatabaseField(useGetSet = true) 35 | private String owner; 36 | 37 | @DatabaseField(useGetSet = true, format="yyyy-MM-dd HH:mm:ss") 38 | private Date creationTime; 39 | 40 | @DatabaseField(useGetSet = true) 41 | private String description; 42 | 43 | @DatabaseField(useGetSet = true) 44 | private Integer providerType; 45 | 46 | @DatabaseField(useGetSet = true) 47 | private boolean isDisabled; 48 | 49 | 50 | public Integer getProjectID() { 51 | return projectID; 52 | } 53 | public void setProjectID(Integer projectID) { 54 | this.projectID = projectID; 55 | } 56 | public String getName() { 57 | return name; 58 | } 59 | public void setName(String name) { 60 | this.name = name; 61 | } 62 | public String getOwner() { 63 | return owner; 64 | } 65 | public void setOwner(String owner) { 66 | this.owner = owner; 67 | } 68 | public Date getCreationTime() { 69 | return creationTime; 70 | } 71 | public void setCreationTime(Date creationTime) { 72 | this.creationTime = creationTime; 73 | } 74 | public String getDescription() { 75 | return description; 76 | } 77 | public void setDescription(String description) { 78 | this.description = description; 79 | } 80 | public Integer getProviderType() { 81 | return providerType; 82 | } 83 | public void setProviderType(Integer providerType) { 84 | this.providerType = providerType; 85 | } 86 | public boolean getIsDisabled() { 87 | return isDisabled; 88 | } 89 | public void setIsDisabled(boolean isDisabled) { 90 | this.isDisabled = isDisabled; 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ProjectProviderMappingBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "projectProviderMapping") 22 | public class ProjectProviderMappingBean { 23 | 24 | public ProjectProviderMappingBean(Integer projectID, Integer providerID) { 25 | super(); 26 | this.projectID = projectID; 27 | this.providerID = providerID; 28 | } 29 | public ProjectProviderMappingBean(){ 30 | 31 | } 32 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 33 | private Integer ID; 34 | 35 | @DatabaseField(canBeNull = false, useGetSet = true) 36 | private Integer projectID; 37 | 38 | @DatabaseField(canBeNull = false, useGetSet = true) 39 | private Integer providerID; 40 | 41 | public Integer getID() { 42 | return ID; 43 | } 44 | 45 | public void setID(Integer ID) { 46 | this.ID = ID; 47 | } 48 | public Integer getProjectID() { 49 | return projectID; 50 | } 51 | 52 | public void setProjectID(Integer projectID) { 53 | this.projectID = projectID; 54 | } 55 | public Integer getProviderID() { 56 | return providerID; 57 | } 58 | 59 | public void setProviderID(Integer providerID) { 60 | this.providerID = providerID; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ProviderBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "provider") 22 | public class ProviderBean { 23 | 24 | @DatabaseField(canBeNull = false, generatedId=true, useGetSet = true) 25 | private Integer providerID; 26 | 27 | @DatabaseField(useGetSet = true, unique = true) 28 | private String name; 29 | 30 | @DatabaseField(useGetSet = true) 31 | private boolean disabled; 32 | 33 | public Integer getProviderID() { 34 | return providerID; 35 | } 36 | 37 | public void setProviderID(Integer providerID) { 38 | this.providerID = providerID; 39 | } 40 | 41 | public String getName() { 42 | return name; 43 | } 44 | 45 | public void setName(String name) { 46 | this.name = name; 47 | } 48 | 49 | public boolean getDisabled() { 50 | return disabled; 51 | } 52 | 53 | public void setDisabled(boolean disabled) { 54 | this.disabled = disabled; 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/PuppetModuleMapping.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.table.DatabaseTable; 19 | import com.j256.ormlite.field.DatabaseField; 20 | 21 | @DatabaseTable(tableName = "puppetModuleMapping") 22 | public class PuppetModuleMapping { 23 | public final static String MODULE_ID_FIELD_NAME = "moduleID"; 24 | public final static String PROJECT_ID_FIELD_NAME = "projectID"; 25 | public final static String MACHINE_ID_FIELD_NAME = "machineID"; 26 | 27 | public PuppetModuleMapping( MachineConfigurationBean machineConfig, PuppetModuleBean puppetModule, ProjectBean project) { 28 | this.machineConfig = machineConfig; 29 | this.puppetModule = puppetModule; 30 | this.project = project; 31 | } 32 | 33 | public PuppetModuleMapping(){ 34 | 35 | } 36 | 37 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 38 | private Integer ID; 39 | 40 | @DatabaseField(foreign = true, useGetSet= true, columnName = MACHINE_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 41 | private MachineConfigurationBean machineConfig; 42 | 43 | @DatabaseField(foreign = true, useGetSet= true, columnName = MODULE_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 44 | private PuppetModuleBean puppetModule; 45 | 46 | @DatabaseField(foreign = true, columnName =PROJECT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 47 | private ProjectBean project; 48 | 49 | public Integer getID() { 50 | return ID; 51 | } 52 | 53 | public void setID(Integer ID) { 54 | this.ID = ID; 55 | } 56 | 57 | public MachineConfigurationBean getMachineConfig() { 58 | return machineConfig; 59 | } 60 | 61 | public void setMachineConfig(MachineConfigurationBean machineConfig) { 62 | this.machineConfig = machineConfig; 63 | } 64 | 65 | public PuppetModuleBean getPuppetModule() { 66 | return puppetModule; 67 | } 68 | 69 | public void setPuppetModule(PuppetModuleBean puppetModule) { 70 | this.puppetModule = puppetModule; 71 | } 72 | public ProjectBean getProject() { 73 | return project; 74 | } 75 | public void setProject(ProjectBean project) { 76 | this.project = project; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/SearchModuleBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | public class SearchModuleBean { 19 | 20 | private String uri; 21 | private String name; 22 | private Integer downloads; 23 | private String created_at; 24 | private String updated_at; 25 | private Boolean supported; 26 | private ModuleOwnerBean owner; 27 | private ModuleCurrentReleaseBean current_release; 28 | 29 | 30 | public String getFileUri() { 31 | return uri; 32 | } 33 | public void setFileUri(String fileUri) { 34 | this.uri = fileUri; 35 | } 36 | public String getModuleName() { 37 | return name; 38 | } 39 | public void setModuleName(String moduleName) { 40 | this.name = moduleName; 41 | } 42 | 43 | public String getUri() { 44 | return uri; 45 | } 46 | public void setUri(String uri) { 47 | this.uri = uri; 48 | } 49 | public String getName() { 50 | return name; 51 | } 52 | public void setName(String name) { 53 | this.name = name; 54 | } 55 | public Integer getDownloads() { 56 | return downloads; 57 | } 58 | public void setDownloads(Integer downloads) { 59 | this.downloads = downloads; 60 | } 61 | public String getCreated_at() { 62 | return created_at; 63 | } 64 | public void setCreated_at(String created_at) { 65 | this.created_at = created_at; 66 | } 67 | public String getUpdated_at() { 68 | return updated_at; 69 | } 70 | public void setUpdated_at(String updated_at) { 71 | this.updated_at = updated_at; 72 | } 73 | 74 | public Boolean getSupported() { 75 | return supported; 76 | } 77 | public void setSupported(Boolean supported) { 78 | this.supported = supported; 79 | } 80 | public ModuleOwnerBean getOwner() { 81 | return owner; 82 | } 83 | public void setOwner(ModuleOwnerBean owner) { 84 | this.owner = owner; 85 | } 86 | public ModuleCurrentReleaseBean getCurrent_release() { 87 | return current_release; 88 | } 89 | public void setCurrent_release(ModuleCurrentReleaseBean current_release) { 90 | this.current_release = current_release; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ShellScriptBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import java.sql.Date; 19 | 20 | import com.j256.ormlite.field.DatabaseField; 21 | 22 | public class ShellScriptBean { 23 | public static final String ID_FIELD_NAME = "scriptID"; 24 | 25 | @DatabaseField(canBeNull = false, generatedId=true, useGetSet = true, columnName=ID_FIELD_NAME) 26 | private Integer scriptID; 27 | 28 | @DatabaseField(useGetSet = true) 29 | private String scriptName; 30 | 31 | @DatabaseField(useGetSet = true) 32 | private Boolean isDisabled; 33 | 34 | @DatabaseField(useGetSet = true) 35 | private String scriptContent; 36 | 37 | @DatabaseField(useGetSet = true) 38 | private Integer creatorUserID; 39 | 40 | @DatabaseField(useGetSet = true, format = "yyyy-MM-dd HH:mm:ss") 41 | private Date creationTime; 42 | 43 | @DatabaseField(useGetSet = true) 44 | private String description; 45 | 46 | public Integer getScriptID() { 47 | return scriptID; 48 | } 49 | 50 | public void setScriptID(Integer scriptID) { 51 | this.scriptID = scriptID; 52 | } 53 | 54 | public String getScriptName() { 55 | return scriptName; 56 | } 57 | 58 | public void setScriptName(String scriptName) { 59 | this.scriptName = scriptName; 60 | } 61 | 62 | public Boolean getIsDisabled() { 63 | return isDisabled; 64 | } 65 | 66 | public void setIsDisabled(Boolean isDisabled) { 67 | this.isDisabled = isDisabled; 68 | } 69 | 70 | public String getScriptContent() { 71 | return scriptContent; 72 | } 73 | 74 | public void setScriptContent(String scriptContent) { 75 | this.scriptContent = scriptContent; 76 | } 77 | 78 | public Integer getCreatorUserID() { 79 | return creatorUserID; 80 | } 81 | 82 | public void setCreatorUserID(Integer creatorUserID) { 83 | this.creatorUserID = creatorUserID; 84 | } 85 | 86 | public Date getCreationTime() { 87 | return creationTime; 88 | } 89 | 90 | public void setCreationTime(Date creationTime) { 91 | this.creationTime = creationTime; 92 | } 93 | 94 | public String getDescription() { 95 | return description; 96 | } 97 | 98 | public void setDescription(String description) { 99 | this.description = description; 100 | } 101 | 102 | 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/ShellScriptMapping.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "shellScriptMapping") 22 | public class ShellScriptMapping { 23 | public final static String SCRIPT_ID_FIELD_NAME = "scriptID"; 24 | public final static String PROJECT_ID_FIELD_NAME = "projectID"; 25 | public final static String MACHINE_ID_FIELD_NAME = "machineID"; 26 | public ShellScriptMapping( MachineConfigurationBean machineConfig, ShellScriptBean script, 27 | ProjectBean project) { 28 | super(); 29 | this.machineConfig = machineConfig; 30 | this.script = script; 31 | this.project = project; 32 | } 33 | 34 | public ShellScriptMapping(){ 35 | 36 | } 37 | 38 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 39 | private Integer ID; 40 | 41 | @DatabaseField(foreign = true, columnName =MACHINE_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 42 | private MachineConfigurationBean machineConfig; 43 | 44 | @DatabaseField(foreign = true, columnName = SCRIPT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 45 | private ShellScriptBean script ; 46 | 47 | @DatabaseField(foreign = true, columnName =PROJECT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 48 | private ProjectBean project; 49 | 50 | public Integer getID() { 51 | return ID; 52 | } 53 | 54 | public void setID(Integer ID) { 55 | this.ID = ID; 56 | } 57 | 58 | public MachineConfigurationBean getMachineConfig() { 59 | return machineConfig; 60 | } 61 | public void setMachineConfig(MachineConfigurationBean machineConfig) { 62 | this.machineConfig = machineConfig; 63 | } 64 | public ShellScriptBean getScript() { 65 | return script; 66 | } 67 | public void setScript(ShellScriptBean script) { 68 | this.script = script; 69 | } 70 | public ProjectBean getProject() { 71 | return project; 72 | } 73 | public void setProject(ProjectBean project) { 74 | this.project = project; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/SyncFoldersBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "sync_folder") 22 | public class SyncFoldersBean { 23 | public static final String MACHINE_ID_FIELD_NAME = "machineID"; 24 | 25 | @DatabaseField(canBeNull = false, generatedId= true, useGetSet = true) 26 | private Integer syncFolderID; 27 | 28 | @DatabaseField(foreign = true,foreignAutoRefresh=true, maxForeignAutoRefreshLevel=1, columnName = MACHINE_ID_FIELD_NAME) 29 | MachineConfigurationBean machineConfig; 30 | 31 | @DatabaseField(useGetSet = true) 32 | private String hostFolder; 33 | 34 | @DatabaseField(useGetSet = true) 35 | private String vmFolder; 36 | 37 | public Integer getSyncFolderID() { 38 | return syncFolderID; 39 | } 40 | public void setSyncFolderID(Integer syncFolderID) { 41 | this.syncFolderID = syncFolderID; 42 | } 43 | public String getHostFolder() { 44 | return hostFolder; 45 | } 46 | public void setHostFolder(String hostFolder) { 47 | this.hostFolder = hostFolder; 48 | } 49 | public String getVmFolder() { 50 | return vmFolder; 51 | } 52 | public void setVmFolder(String vmFolder) { 53 | this.vmFolder = vmFolder; 54 | } 55 | public MachineConfigurationBean getMachineConfig() { 56 | return machineConfig; 57 | } 58 | public void setMachineConfig(MachineConfigurationBean machineConfig) { 59 | this.machineConfig = machineConfig; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/UserCredentials.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | 20 | public class UserCredentials { 21 | 22 | @DatabaseField( useGetSet = true, canBeNull = true) 23 | private String loginID; 24 | 25 | @DatabaseField(useGetSet = true, canBeNull = true) 26 | private String password; 27 | 28 | public String getLoginID() { 29 | return loginID; 30 | } 31 | 32 | public void setLoginID(String loginID) { 33 | this.loginID = loginID; 34 | } 35 | 36 | public String getPassword() { 37 | return password; 38 | } 39 | 40 | public void setPassword(String password) { 41 | this.password = password; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/UserDetailBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName = "user_detail") 22 | public class UserDetailBean { 23 | 24 | @DatabaseField(canBeNull = false, generatedId=true, useGetSet = true) 25 | private Integer userID; 26 | 27 | @DatabaseField( useGetSet = true) 28 | private String firstName; 29 | 30 | @DatabaseField( useGetSet = true) 31 | private String lastName; 32 | 33 | @DatabaseField(useGetSet = true, unique = true ) 34 | private String mailID; 35 | 36 | @DatabaseField(useGetSet = true) 37 | private String password; 38 | 39 | @DatabaseField(useGetSet = true) 40 | private Integer userType; 41 | 42 | public Integer getUserID() { 43 | return userID; 44 | } 45 | 46 | public void setUserID(Integer userID) { 47 | this.userID = userID; 48 | } 49 | public String getFirstName() { 50 | return firstName; 51 | } 52 | 53 | public void setFirstName(String firstName) { 54 | this.firstName = firstName; 55 | } 56 | 57 | public String getLastName() { 58 | return lastName; 59 | } 60 | 61 | public void setLastName(String lastName) { 62 | this.lastName = lastName; 63 | } 64 | 65 | public Integer getUserType() { 66 | return userType; 67 | } 68 | 69 | public void setUserType(Integer userType) { 70 | this.userType = userType; 71 | } 72 | 73 | public Boolean getIsDisabled() { 74 | return isDisabled; 75 | } 76 | 77 | public void setIsDisabled(Boolean isDisabled) { 78 | this.isDisabled = isDisabled; 79 | } 80 | public String getMailID() { 81 | return mailID; 82 | } 83 | 84 | public void setMailID(String mailID) { 85 | this.mailID = mailID; 86 | } 87 | 88 | public String getPassword() { 89 | return password; 90 | } 91 | 92 | public void setPassword(String password) { 93 | this.password = password; 94 | } 95 | @DatabaseField(useGetSet = true) 96 | private Boolean isDisabled; 97 | 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/UserProjectMapping.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import com.j256.ormlite.field.DatabaseField; 19 | import com.j256.ormlite.table.DatabaseTable; 20 | 21 | @DatabaseTable(tableName= "UserProjectMapping") 22 | public class UserProjectMapping { 23 | public UserProjectMapping() { 24 | 25 | } 26 | 27 | public final static String USER_ID_FIELD_NAME = "userID"; 28 | public final static String PROJECT_ID_FIELD_NAME = "projectID"; 29 | 30 | @DatabaseField(canBeNull = false, generatedId = true, useGetSet = true) 31 | private Integer ID; 32 | 33 | @DatabaseField(foreign = true, columnName = USER_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 34 | UserDetailBean user; 35 | 36 | @DatabaseField(foreign = true, columnName = PROJECT_ID_FIELD_NAME, foreignAutoRefresh=true, foreignAutoCreate=true) 37 | ProjectBean project; 38 | 39 | public Integer getID() { 40 | return ID; 41 | } 42 | 43 | public void setID(Integer ID) { 44 | this.ID = ID; 45 | } 46 | 47 | public ProjectBean getProject() { 48 | return project; 49 | } 50 | 51 | public void setProject(ProjectBean project) { 52 | this.project = project; 53 | } 54 | 55 | public UserDetailBean getUser() { 56 | return user; 57 | } 58 | 59 | public void setUser(UserDetailBean user) { 60 | this.user = user; 61 | } 62 | 63 | public UserProjectMapping(UserDetailBean user, ProjectBean project) { 64 | super(); 65 | this.user = user; 66 | this.project = project; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/db/beans/UserTypeBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.db.beans; 17 | 18 | import java.sql.Date; 19 | 20 | import com.j256.ormlite.field.DatabaseField; 21 | import com.j256.ormlite.table.DatabaseTable; 22 | @DatabaseTable(tableName = "userType") 23 | public class UserTypeBean { 24 | 25 | @DatabaseField(canBeNull = false, generatedId=true, useGetSet = true) 26 | private Integer ID; 27 | 28 | @DatabaseField( useGetSet = true) 29 | private Integer userTypeCode; 30 | 31 | @DatabaseField(useGetSet = true) 32 | private String userTypeDesc; 33 | 34 | @DatabaseField(useGetSet = true) 35 | private Boolean isDisabled; 36 | 37 | @DatabaseField(useGetSet = true, format = "yyyy-MM-dd HH:mm:ss") 38 | private Date creationTime; 39 | 40 | @DatabaseField(useGetSet = true) 41 | private Integer adminID; 42 | 43 | public Integer getID() { 44 | return ID; 45 | } 46 | 47 | public void setID(Integer ID) { 48 | this.ID = ID; 49 | } 50 | 51 | public Integer getUserTypeCode() { 52 | return userTypeCode; 53 | } 54 | 55 | public void setUserTypeCode(Integer userTypeCode) { 56 | this.userTypeCode = userTypeCode; 57 | } 58 | 59 | public String getUserTypeDesc() { 60 | return userTypeDesc; 61 | } 62 | 63 | public void setUserTypeDesc(String userTypeDesc) { 64 | this.userTypeDesc = userTypeDesc; 65 | } 66 | 67 | public Boolean getIsDisabled() { 68 | return isDisabled; 69 | } 70 | 71 | public void setIsDisabled(Boolean isDisabled) { 72 | this.isDisabled = isDisabled; 73 | } 74 | 75 | public Date getCreationTime() { 76 | return creationTime; 77 | } 78 | 79 | public void setCreationTime(Date creationTime) { 80 | this.creationTime = creationTime; 81 | } 82 | 83 | public Integer getAdminID() { 84 | return adminID; 85 | } 86 | 87 | public void setAdminID(Integer adminID) { 88 | this.adminID = adminID; 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/mail/MailManager.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.mail; 17 | 18 | import java.io.BufferedReader; 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | import java.io.InputStreamReader; 22 | 23 | import javax.ws.rs.core.MediaType; 24 | 25 | import com.sun.jersey.api.client.Client; 26 | import com.sun.jersey.api.client.ClientResponse; 27 | import com.sun.jersey.api.client.WebResource; 28 | import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter; 29 | import com.sun.jersey.core.util.MultivaluedMapImpl; 30 | 31 | 32 | public class MailManager { 33 | private static String apiKey = "key-"; 34 | private static String webResourceURL = "https://api.mailgun.net/v2/support.boxupp.com/messages"; 35 | 36 | public ClientResponse sendRegistrationMail(String emailID, String name, String password){ 37 | Client client = Client.create(); 38 | client.addFilter(new HTTPBasicAuthFilter("api","key-")); 39 | WebResource webResource = client.resource("https://api.mailgun.net/v2/support.boxupp.com/messages"); 40 | MultivaluedMapImpl formData = new MultivaluedMapImpl(); 41 | formData.add("from", "Boxupp Support "); 42 | formData.add("to", emailID); 43 | formData.add("subject", "Welcome to Boxupp"); 44 | BufferedReader fileReader = null; 45 | 46 | InputStream iStream = getClass().getResourceAsStream("/data.html"); 47 | InputStreamReader reader = new InputStreamReader(iStream); 48 | fileReader = new BufferedReader(reader); 49 | 50 | StringBuffer buffer = new StringBuffer(); 51 | String data; 52 | try { 53 | while((data = fileReader.readLine())!=null){ 54 | buffer.append(data); 55 | } 56 | } catch (IOException e) { 57 | e.printStackTrace(); 58 | } 59 | data = buffer.toString(); 60 | data = data.replaceAll("", emailID); 61 | data = data.replaceAll("", password); 62 | data = data.replaceAll("", name); 63 | formData.add("html", data); 64 | 65 | return webResource.type(MediaType.APPLICATION_FORM_URLENCODED). 66 | post(ClientResponse.class, formData); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/GitRepo.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.resources; 17 | 18 | import javax.ws.rs.Consumes; 19 | import javax.ws.rs.DELETE; 20 | import javax.ws.rs.GET; 21 | import javax.ws.rs.POST; 22 | import javax.ws.rs.Path; 23 | import javax.ws.rs.PathParam; 24 | import javax.ws.rs.Produces; 25 | import javax.ws.rs.core.MediaType; 26 | 27 | import org.codehaus.jackson.JsonNode; 28 | 29 | import com.boxupp.dao.GitRepoDAOManager; 30 | import com.boxupp.responseBeans.StatusBean; 31 | 32 | @Path("/gitRepo/") 33 | public class GitRepo { 34 | @POST 35 | @Produces(MediaType.APPLICATION_JSON) 36 | @Consumes("application/json") 37 | public StatusBean saveGitRepo(JsonNode newData) { 38 | return GitRepoDAOManager.getInstance().create(newData); 39 | } 40 | 41 | @GET 42 | @Path("/{id}") 43 | @Produces(MediaType.APPLICATION_JSON) 44 | @Consumes("application/json") 45 | public StatusBean getGitRepo(@PathParam("id") String gitRepoID) { 46 | return GitRepoDAOManager.getInstance().read(gitRepoID); 47 | } 48 | 49 | @DELETE 50 | @Path("/{id}") 51 | @Produces(MediaType.APPLICATION_JSON) 52 | public StatusBean deleteGitRepo(@PathParam("id") String gitRepoID){ 53 | return GitRepoDAOManager.getInstance().delete(gitRepoID); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/Provider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.resources; 17 | 18 | import java.util.List; 19 | 20 | import javax.ws.rs.GET; 21 | import javax.ws.rs.Path; 22 | import javax.ws.rs.PathParam; 23 | import javax.ws.rs.Produces; 24 | import javax.ws.rs.core.MediaType; 25 | 26 | import com.boxupp.dao.ProviderDAOManager; 27 | import com.boxupp.db.beans.ProviderBean; 28 | 29 | @Path("/provider/") 30 | public class Provider { 31 | 32 | @GET 33 | @Produces(MediaType.APPLICATION_JSON) 34 | public List getAllProviders(){ 35 | return ProviderDAOManager.getInstance().retireveProviders(); 36 | } 37 | 38 | @GET 39 | @Path("/{id}") 40 | @Produces(MediaType.APPLICATION_JSON) 41 | public ProviderBean getProviderData(@PathParam("id") String providerID){ 42 | return ProviderDAOManager.getInstance().read(providerID); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/SessionFilter.java: -------------------------------------------------------------------------------- 1 | package com.boxupp.resources; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.StringTokenizer; 6 | 7 | 8 | import javax.servlet.Filter; 9 | import javax.servlet.FilterChain; 10 | import javax.servlet.FilterConfig; 11 | import javax.servlet.ServletException; 12 | import javax.servlet.ServletRequest; 13 | import javax.servlet.ServletResponse; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | import javax.servlet.http.HttpSession; 17 | 18 | public class SessionFilter implements Filter { 19 | 20 | private ArrayList avoidSessionUrlList; 21 | 22 | public void init(FilterConfig config) throws ServletException { 23 | String urls = config.getInitParameter("avoid-urls"); 24 | StringTokenizer token = new StringTokenizer(urls,","); 25 | avoidSessionUrlList = new ArrayList(); 26 | 27 | while (token.hasMoreTokens()) { 28 | avoidSessionUrlList.add(token.nextToken()); 29 | } 30 | } 31 | 32 | public void doFilter(ServletRequest req, ServletResponse res, 33 | FilterChain chain) throws IOException, ServletException { 34 | HttpServletRequest request = (HttpServletRequest) req; 35 | HttpServletResponse response = (HttpServletResponse) res; 36 | String curentUrl = request.getPathInfo(); 37 | boolean isUrlAllowed = false; 38 | if(avoidSessionUrlList.contains(curentUrl)) { 39 | isUrlAllowed = true; 40 | } 41 | 42 | if (!isUrlAllowed) { 43 | HttpSession session = request.getSession(false); 44 | if (session == null) { 45 | response.sendError(401); 46 | return; 47 | } 48 | } 49 | 50 | chain.doFilter(req, res); 51 | } 52 | 53 | public void destroy() { 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/SessionTracker.java: -------------------------------------------------------------------------------- 1 | package com.boxupp.resources; 2 | 3 | import java.security.NoSuchAlgorithmException; 4 | 5 | import javax.servlet.*; 6 | import javax.servlet.http.*; 7 | 8 | 9 | public class SessionTracker extends HttpServlet { 10 | 11 | private static SessionTracker sessionTracker; 12 | 13 | public static SessionTracker getInstance(){ 14 | if(sessionTracker == null){ 15 | sessionTracker = new SessionTracker(); 16 | } 17 | return sessionTracker; 18 | } 19 | 20 | public void createSession(HttpServletRequest request,String userID) 21 | throws ServletException, NoSuchAlgorithmException 22 | { 23 | HttpSession session = request.getSession(true); 24 | if (session.isNew()){ 25 | session.setMaxInactiveInterval(3600); 26 | } 27 | } 28 | 29 | public void destroySession(HttpServletRequest request){ 30 | HttpSession session = request.getSession(); 31 | session.invalidate(); 32 | } 33 | 34 | public Boolean isSessionActive(HttpServletRequest request) { 35 | HttpSession session = request.getSession(false); 36 | 37 | if (session==null){ 38 | return false; 39 | } 40 | else{ 41 | return true; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/ShellScript.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.resources; 17 | 18 | import javax.ws.rs.Consumes; 19 | import javax.ws.rs.DELETE; 20 | import javax.ws.rs.GET; 21 | import javax.ws.rs.POST; 22 | import javax.ws.rs.PUT; 23 | import javax.ws.rs.Path; 24 | import javax.ws.rs.PathParam; 25 | import javax.ws.rs.Produces; 26 | import javax.ws.rs.core.MediaType; 27 | 28 | import org.codehaus.jackson.JsonNode; 29 | 30 | import com.boxupp.dao.ShellScriptDAOManager; 31 | import com.boxupp.db.beans.ShellScriptBean; 32 | import com.boxupp.responseBeans.StatusBean; 33 | 34 | @Path("/shellScript/") 35 | public class ShellScript { 36 | 37 | @POST 38 | @Produces(MediaType.APPLICATION_JSON) 39 | @Consumes("application/json") 40 | public StatusBean saveShellScript(JsonNode newShellScriptData) { 41 | return ShellScriptDAOManager.getInstance().create(newShellScriptData); 42 | } 43 | 44 | @GET 45 | @Path("/{id}") 46 | @Produces(MediaType.APPLICATION_JSON) 47 | public ShellScriptBean getScriptData(@PathParam("id") String shellScriptId) { 48 | return ShellScriptDAOManager.getInstance().read(shellScriptId); 49 | } 50 | 51 | @PUT 52 | @Produces(MediaType.APPLICATION_JSON) 53 | @Consumes("application/json") 54 | public StatusBean updateShellScript(JsonNode shellScriptData) { 55 | return ShellScriptDAOManager.getInstance().update(shellScriptData); 56 | } 57 | 58 | @DELETE 59 | @Path("/{id}") 60 | @Produces(MediaType.APPLICATION_JSON) 61 | public StatusBean deleteShellScript(@PathParam("id") String shellScriptId) { 62 | return ShellScriptDAOManager.getInstance().delete(shellScriptId); 63 | } 64 | /*@POST 65 | @Path("/updateScriptMapping/{id}") 66 | @Produces(MediaType.APPLICATION_JSON) 67 | @Consumes("application/json") 68 | public StatusBean updateScriptMapping(JsonNode shellScriptMapping){ 69 | return ShellScriptDAOManager.getInstance().linkScriptMachine(shellScriptMapping); 70 | }*/ 71 | 72 | @POST 73 | @Path("/updateScriptMappings") 74 | @Produces(MediaType.APPLICATION_JSON) 75 | @Consumes("application/json") 76 | public StatusBean updateShellScriptMappings(JsonNode shellScriptMapping){ 77 | return ShellScriptDAOManager.getInstance().updateScriptMapping(shellScriptMapping); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/User.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.resources; 17 | 18 | import java.util.List; 19 | 20 | import javax.ws.rs.GET; 21 | import javax.ws.rs.POST; 22 | import javax.ws.rs.Path; 23 | import javax.ws.rs.PathParam; 24 | import javax.ws.rs.Produces; 25 | import javax.ws.rs.core.MediaType; 26 | 27 | import org.codehaus.jackson.JsonNode; 28 | 29 | import com.boxupp.dao.LoginDAOManager; 30 | import com.boxupp.dao.ProjectDAOManager; 31 | import com.boxupp.dao.UserDAOManager; 32 | import com.boxupp.db.beans.ProjectBean; 33 | import com.boxupp.responseBeans.StatusBean; 34 | import com.boxupp.responseBeans.UserAuthenticationResponse; 35 | 36 | @Path("/user/") 37 | public class User { 38 | 39 | @POST 40 | @Path("/login") 41 | @Produces(MediaType.APPLICATION_JSON) 42 | public UserAuthenticationResponse getLoginUserId(JsonNode loginCredentials){ 43 | return LoginDAOManager.getInstance().loginAuthorization(loginCredentials); 44 | } 45 | 46 | @POST 47 | @Path("/signup") 48 | @Produces(MediaType.APPLICATION_JSON) 49 | public StatusBean creteNewUser(JsonNode newUserDetail){ 50 | return UserDAOManager.getInstance().create(newUserDetail); 51 | } 52 | 53 | @GET 54 | @Path("/getProjects/{id}") 55 | @Produces(MediaType.APPLICATION_JSON) 56 | public List getAllProjectsList(@PathParam("id") String userId){ 57 | return ProjectDAOManager.getInstance().retireveProjectsForUser(userId); 58 | } 59 | 60 | @GET 61 | @Path("/idCheck/{id}") 62 | @Produces(MediaType.APPLICATION_JSON) 63 | public StatusBean checkExistUser(@PathParam("id") String userId){ 64 | return UserDAOManager.getInstance().checkForExistingUser(userId); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/resources/VagrantLog.java: -------------------------------------------------------------------------------- 1 | package com.boxupp.resources; 2 | 3 | import java.util.List; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.Context; 10 | import javax.ws.rs.core.MediaType; 11 | 12 | import com.boxupp.beans.LogBean; 13 | import com.boxupp.utilities.VagrantUtilities; 14 | 15 | @Path("/vagrantLog/") 16 | public class VagrantLog { 17 | 18 | @GET 19 | @Path("/getVagrantLogFiles") 20 | @Produces(MediaType.APPLICATION_JSON) 21 | public List getVagrantLog(@Context HttpServletRequest request) { 22 | return VagrantUtilities.getInstance().getVagrantLogs(request); 23 | } 24 | 25 | @GET 26 | @Path("/getVagrantLogFileContent") 27 | @Produces(MediaType.TEXT_PLAIN) 28 | public String getVagrantLogFileContent(@Context HttpServletRequest request) { 29 | return VagrantUtilities.getInstance().getVagrantLogContent(request); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/BoxURLResponse.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class BoxURLResponse { 19 | 20 | private int statusCode; 21 | private String contentLength; 22 | 23 | public int getStatusCode() { 24 | return statusCode; 25 | } 26 | public void setStatusCode(int statusCode) { 27 | this.statusCode = statusCode; 28 | } 29 | public String getContentLength() { 30 | return contentLength; 31 | } 32 | public void setContentLength(long contentLength) { 33 | //To Change bytes to MB 34 | this.contentLength = contentLength/1048576 + "MB"; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/SnapshotData.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | import org.codehaus.jackson.JsonNode; 19 | 20 | public class SnapshotData { 21 | 22 | private JsonNode data; 23 | private boolean fileExists; 24 | 25 | public JsonNode getData() { 26 | return data; 27 | } 28 | public void setData(JsonNode data) { 29 | this.data = data; 30 | } 31 | public boolean isFileExists() { 32 | return fileExists; 33 | } 34 | public void setFileExists(boolean fileExists) { 35 | this.fileExists = fileExists; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/StatusBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | public class StatusBean{ 18 | public String statusMessage; 19 | public Integer statusCode; 20 | public Object beanData; 21 | 22 | public Object getData() { 23 | return beanData; 24 | } 25 | public void setData(Object data) { 26 | this.beanData = data; 27 | } 28 | public String getStatusMessage() { 29 | return statusMessage; 30 | } 31 | public void setStatusMessage(String statusMessage) { 32 | this.statusMessage = statusMessage; 33 | } 34 | public Integer getStatusCode() { 35 | return statusCode; 36 | } 37 | public void setStatusCode(Integer statusCode) { 38 | this.statusCode = statusCode; 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/UserAuthenticationResponse.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class UserAuthenticationResponse extends StatusBean { 19 | 20 | public Integer userID; 21 | 22 | public Integer getUserID() { 23 | return userID; 24 | } 25 | public void setUserID(Integer userID) { 26 | this.userID = userID; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantFile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantFile { 19 | 20 | private int statusCode; 21 | private boolean fileExists; 22 | private String fileContent; 23 | 24 | public int getStatusCode() { 25 | return statusCode; 26 | } 27 | public void setStatusCode(int statusCode) { 28 | this.statusCode = statusCode; 29 | } 30 | public String getFileContent() { 31 | return fileContent; 32 | } 33 | public void setFileContent(String fileContent) { 34 | this.fileContent = fileContent; 35 | } 36 | public boolean isFileExists() { 37 | return fileExists; 38 | } 39 | public void setFileExists(boolean fileExists) { 40 | this.fileExists = fileExists; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantFileStatus.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantFileStatus { 19 | 20 | private boolean fileCreated = false; 21 | private String fileCreationPath; 22 | 23 | public boolean isFileCreated() { 24 | return fileCreated; 25 | } 26 | public void setFileCreated(boolean fileCreated) { 27 | this.fileCreated = fileCreated; 28 | } 29 | public String getFileCreationPath() { 30 | return fileCreationPath; 31 | } 32 | public void setFileCreationPath(String fileCreationPath) { 33 | this.fileCreationPath = fileCreationPath; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantOutput { 19 | 20 | private String output; 21 | private boolean dataEnd = false; 22 | private boolean vagrantFileExists = true; 23 | 24 | public String getOutput() { 25 | return output; 26 | } 27 | public void setOutput(String output) { 28 | this.output = output; 29 | } 30 | public boolean isDataEnd() { 31 | return dataEnd; 32 | } 33 | public void setDataEnd(boolean dataEnd) { 34 | this.dataEnd = dataEnd; 35 | } 36 | public boolean isVagrantFileExists() { 37 | return vagrantFileExists; 38 | } 39 | public void setVagrantFileExists(boolean vagrantFileExists) { 40 | this.vagrantFileExists = vagrantFileExists; 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantParserOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantParserOutput { 19 | 20 | private int statusCode = 1; 21 | private boolean validVagrantFile = false; 22 | private String parsedData; 23 | 24 | public int getStatusCode() { 25 | return statusCode; 26 | } 27 | public void setStatusCode(int statusCode) { 28 | this.statusCode = statusCode; 29 | } 30 | public boolean isValidVagrantFile() { 31 | return validVagrantFile; 32 | } 33 | public void setValidVagrantFile(boolean validVagrantFile) { 34 | this.validVagrantFile = validVagrantFile; 35 | } 36 | public String getParsedData() { 37 | return parsedData; 38 | } 39 | public void setParsedData(String parsedData) { 40 | this.parsedData = parsedData; 41 | } 42 | 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantStatus.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantStatus { 19 | 20 | //0 : OFF 21 | //1 : RUNNING 22 | //3 : VAGRANT_FILE_NOT_PRESENT OR VAGRANT_UNINITIALIZED 23 | public int statusCode; 24 | public String vagrantStatusMessage; 25 | 26 | public int getStatusCode() { 27 | return statusCode; 28 | } 29 | 30 | public void setStatusCode(int statusCode) { 31 | this.statusCode = statusCode; 32 | } 33 | 34 | public String getVagrantStatus() { 35 | return vagrantStatusMessage; 36 | } 37 | 38 | public void setVagrantStatus(String vagrantStatus) { 39 | this.vagrantStatusMessage = vagrantStatus; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantStreamError.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantStreamError extends VagrantOutput{ 19 | 20 | private String type="error"; 21 | 22 | public String getType() { 23 | return type; 24 | } 25 | 26 | public void setType(String type) { 27 | this.type = type; 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/responseBeans/VagrantStreamOutput.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.responseBeans; 17 | 18 | public class VagrantStreamOutput extends VagrantOutput{ 19 | 20 | private String type="normal"; 21 | 22 | public String getType() { 23 | return type; 24 | } 25 | 26 | public void setType(String type) { 27 | this.type = type; 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/utilities/CommonProperties.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.utilities; 17 | 18 | public class CommonProperties { 19 | private static CommonProperties commonProperties = null; 20 | private String dockerProvider = "Docker"; 21 | private String puppetForgeDownloadAPIPath = "https://forgeapi.puppetlabs.com:443"; 22 | 23 | public static CommonProperties getInstance(){ 24 | if(commonProperties == null){ 25 | commonProperties = new CommonProperties(); 26 | } 27 | return commonProperties; 28 | } 29 | 30 | public String getPuppetForgeDownloadAPIPath() { 31 | return puppetForgeDownloadAPIPath; 32 | } 33 | 34 | public void setPuppetForgeDownloadAPIPath(String puppetForgeDownloadAPIPath) { 35 | this.puppetForgeDownloadAPIPath = puppetForgeDownloadAPIPath; 36 | } 37 | 38 | public String getDockerProvider() { 39 | return dockerProvider; 40 | } 41 | 42 | public void setDockerProvider(String dockerProvider) { 43 | this.dockerProvider = dockerProvider; 44 | } 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/vagrant/VagrantCommandParser.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.vagrant; 17 | 18 | import com.boxupp.responseBeans.VagrantStatus; 19 | 20 | public class VagrantCommandParser { 21 | 22 | public VagrantStatus parseVagrantStatusCMD(StringBuffer cmdOutput){ 23 | VagrantStatus statusBean = new VagrantStatus(); 24 | String output = cmdOutput.toString(); 25 | String vagrantFileNotPresent = "vagrant init"; 26 | String vagrantEnvUninitialized = "not created"; 27 | String vagrantEnvRunning = "running"; 28 | String vagrantEnvOff = "poweroff"; 29 | /* Case for 'vagrant init' will probably not occur ever */ 30 | if(output.indexOf(vagrantFileNotPresent) != -1){ 31 | statusBean.setStatusCode(3); 32 | statusBean.setVagrantStatus("Vagrant file not present"); 33 | } 34 | else if(output.indexOf(vagrantEnvUninitialized) != -1){ 35 | statusBean.setStatusCode(3); 36 | statusBean.setVagrantStatus("Vagrant file present but uninitialized"); 37 | } 38 | else if(output.indexOf(vagrantEnvRunning) != -1){ 39 | statusBean.setStatusCode(1); 40 | statusBean.setVagrantStatus("Vagrant environment running"); 41 | } 42 | else if(output.indexOf(vagrantEnvOff) != -1){ 43 | statusBean.setStatusCode(0); 44 | statusBean.setVagrantStatus("Vagrant environment not running"); 45 | } 46 | return statusBean; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/vagrant/VagrantCommandProcessor.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.vagrant; 17 | 18 | import java.io.IOException; 19 | 20 | import com.boxupp.responseBeans.VagrantStatus; 21 | import com.boxupp.ws.OutputConsole; 22 | 23 | public class VagrantCommandProcessor { 24 | private static VagrantCommandExecutor shellExec = new VagrantCommandExecutor(); 25 | private static VagrantCommandParser shellParser = new VagrantCommandParser(); 26 | 27 | public VagrantStatus checkVagrantStatus(String location){ 28 | shellExec.setCMDExecDir(location); 29 | StringBuffer cmdOutput; 30 | cmdOutput = shellExec.checkVagrantStatusCMD("vagrant","status"); 31 | return shellParser.parseVagrantStatusCMD(cmdOutput); 32 | } 33 | 34 | public VagrantStatus checkMachineStatus(String location, String vagrantID){ 35 | shellExec.setCMDExecDir(location); 36 | StringBuffer cmdOutput; 37 | cmdOutput = shellExec.checkVagrantStatusCMD("vagrant","status",vagrantID); 38 | return shellParser.parseVagrantStatusCMD(cmdOutput); 39 | } 40 | 41 | public String executeVagrantFile(String location, String command, Integer userID, OutputConsole consoleType) throws IOException, InterruptedException{ 42 | 43 | // VagrantOutputStream.flushData(); 44 | command = filterCommand(command); 45 | shellExec.setCMDExecDir(location); 46 | shellExec.bootVagrantMachine(consoleType, userID, command.split(" ")); 47 | return ""; 48 | 49 | } 50 | 51 | public String filterCommand(String command){ 52 | //vagrant destroy 53 | StringBuilder stringConcat = new StringBuilder(); 54 | int indexOfDestroy = command.indexOf("destroy"); 55 | int indexOfForce = command.indexOf("--force"); 56 | if((indexOfDestroy > -1) && (indexOfForce == -1)){ 57 | stringConcat.append(command.substring(0, indexOfDestroy + 7)); 58 | stringConcat.append(" --force"); 59 | stringConcat.append(command.substring(indexOfDestroy + 7, command.length())); 60 | command = stringConcat.toString(); 61 | } 62 | return command; 63 | } 64 | 65 | public static void main(String args[]) throws IOException, InterruptedException{ 66 | VagrantCommandProcessor proc = new VagrantCommandProcessor(); 67 | System.out.println(proc.filterCommand("vagrant destroy mysql")+"'"); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/velocity/VelocityInit.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.velocity; 17 | 18 | import java.util.Properties; 19 | 20 | import org.apache.velocity.Template; 21 | import org.apache.velocity.app.VelocityEngine; 22 | 23 | public class VelocityInit { 24 | 25 | public static VelocityEngine getVelocityInstance(){ 26 | VelocityEngine ve = new VelocityEngine(); 27 | setVelocityProperties(ve); 28 | return ve; 29 | } 30 | 31 | static void setVelocityProperties(VelocityEngine ve){ 32 | Properties prop = new Properties(); 33 | prop.setProperty("resource.loader", "class"); 34 | prop.setProperty("class.resource.loader.description", "Velocity Classpath Resource Loader"); 35 | prop.setProperty("class.resource.loader.class", 36 | "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); 37 | prop.setProperty("math", "org.apache.velocity.tools.generic.MathTool"); 38 | ve.init(prop); 39 | } 40 | 41 | public static Template getTemplate(VelocityEngine ve, String provider){ 42 | Template template = null; 43 | if(provider.equalsIgnoreCase("virtualBox") ){ 44 | template = ve.getTemplate("virtualBox.vm"); 45 | }else if(provider.equalsIgnoreCase("docker")){ 46 | template = ve.getTemplate("docker.vm"); 47 | } 48 | else if(provider.equalsIgnoreCase("AWS")){ 49 | template = ve.getTemplate("awsMachine.vm"); 50 | } 51 | return template; 52 | } 53 | 54 | public static Template getNodeTemplate(VelocityEngine ve){ 55 | return ve.getTemplate("node.vm"); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /src/main/java/com/boxupp/ws/OutputConsole.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.boxupp.ws; 17 | 18 | 19 | public interface OutputConsole { 20 | 21 | public void pushOutput(String data); 22 | public void pushError(String data); 23 | public void pushDataTermination(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/README.txt: -------------------------------------------------------------------------------- 1 | ********************************************************************************* 2 | *Pre-requisites for getting Boxupp up and running: * 3 | ********************************************************************************* 4 | 5 | 1. Oracle Virtualbox - a powerful x86 and AMD64/Intel64 virtualization product 6 | 7 | 2. Vagrant - a free and open-source software for creating and configuring virtual and repeatable development environments 8 | 9 | 3. Java Runtime Environment (JRE 7.0+)- a runtime environment for running Java applications 10 | 11 | 4. Vagrant docker plugin - If you want to create Containers on your machine 12 | 13 | 14 | If something doesn't seem to work as expected, please get in touch with us at support@boxupp.com -------------------------------------------------------------------------------- /src/main/resources/User Manual_v1.0.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoxUpp/boxupp/e0c97c2b6a5920d08585089ad9d6cb1f7398b430/src/main/resources/User Manual_v1.0.0.pdf -------------------------------------------------------------------------------- /src/main/resources/Vagrantfile: -------------------------------------------------------------------------------- 1 | VARANTFILE_API_VERSION ="2" 2 | Vagrant.configure("2") do|config| 3 | config.vm.box = "precise64" 4 | config.vm.box_url = "https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/virtualbox.box" 5 | config.vm.provision "docker" 6 | config.vm.provision "shell" , inline: 7 | "ps aux| grep 'sshd:' | awk '{print $2}' | xargs kill" 8 | end -------------------------------------------------------------------------------- /src/main/resources/awsMachine.vm: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | Vagrant.configure("2") do |config| 4 | 5 | #set ($identifier="machine") 6 | #set ($childStructures=$boxuppConfig) 7 | #set ($userAccountConfig=$accessKeyAndId) 8 | #set ($providerMarker=".vm.provider") 9 | #set ($boxMarker = ".vm.box") 10 | #set ($boxUrl = ".vm.box_url") 11 | #set ($providerMarker = ".vm.provider") 12 | #set ($shellProvisionMarker = ".vm.provision") 13 | #set ($manifestsPathMarker = ".manifests_path") 14 | #set ($manifestFilePathMarker = ".manifest_file") 15 | #set ($modulePathMarker = ".module_path") 16 | #set ($syncFolderMarker = ".vm.synced_folder") 17 | #set ($optionMarker=".options") 18 | #set ($hostnameMarker = ".vm.hostname") 19 | 20 | #foreach ($childBean in $childStructures) 21 | #set ($folderMappings = $childBean.getSyncFolders()) 22 | #set($identifier=$childBean.vagrantID) 23 | config.vm.define :$childBean.vagrantID do |$identifier| 24 | $identifier$boxMarker = "dummy" 25 | $identifier$boxUrl = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box" 26 | 27 | $identifier$providerMarker :aws do |aws,override| 28 | aws.access_key_id = "$userAccountConfig.awsAccessKeyId" 29 | aws.secret_access_key = "$userAccountConfig.awsSecretAccessKey" 30 | aws.keypair_name = "$userAccountConfig.awsKeyPair" 31 | 32 | aws.ami = "$childBean.machineAmi" 33 | aws.instance_type="$childBean.instanceType" 34 | aws.region="$childBean.instanceRegion" 35 | 36 | override.ssh.username = "$childBean.sshUserName" 37 | override.ssh.private_key_path = "$userAccountConfig.privateKeyPath" 38 | end 39 | 40 | $identifier$shellProvisionMarker "shell" , path: "./scripts/puppet.sh" 41 | 42 | #foreach ($syncMapping in $folderMappings) 43 | #if(!($syncMapping.hostFolder.isEmpty() && $syncMapping.vmFolder.isEmpty())) 44 | $identifier$syncFolderMarker "$syncMapping.hostFolder", "$syncMapping.vmFolder" 45 | #end 46 | #end 47 | 48 | $identifier$shellProvisionMarker "puppet" do |$identifier| 49 | $identifier$manifestsPathMarker = "manifests" 50 | $identifier$manifestFilePathMarker = "site.pp" 51 | $identifier$modulePathMarker = "../modules" 52 | end 53 | 54 | #foreach ($scriptMapping in $scriptMappings) 55 | #if($scriptMapping.machineConfig.vagrantID == $identifier) 56 | #foreach($script in $scripts) 57 | #if($script.scriptName == $scriptMapping.script.scriptName) 58 | $identifier$shellProvisionMarker "shell", path: "./scripts/$script.scriptName", privileged:"true" 59 | #end 60 | #end 61 | #end 62 | #end 63 | 64 | end 65 | #end 66 | end 67 | -------------------------------------------------------------------------------- /src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | port=9000 2 | 3 | -------------------------------------------------------------------------------- /src/main/resources/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | docker 4 | 5 | 6 | virtualBox 7 | 8 | 9 | 8585 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/data.html: -------------------------------------------------------------------------------- 1 |

Welcome !
We are excited to have you onboard and we wish this tool suffices your requirements and helps you manage your 2 | development environments better.

3 | 4 | Lets Get Started. 5 |

6 | To start using the tool please login with the following credentials - 7 |
8 | Username-
9 | Password- 10 |

11 |

12 | If you need any help getting started, schedule a Live Demo
You can also send your queries to our client services team at - support@boxupp.com 13 |

14 | You can stay up to date with the latest news on Boxupp viz. new integrations , release of new builds etc. by following us on the following sources- 15 |

16 | Facebook
17 | Twitter
18 | Linkedin
19 |

20 | Happy Browsing On The Tool 21 |

22 |

23 | Cheers!
24 | Team Boxupp -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ERROR 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | %d %p %c{1.} [%t] %m%n 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/node.vm: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | #set ($childStructures = $puppetModules) 4 | 5 | #foreach ($machineName in $childStructures.keySet()) 6 | node "$machineName" { 7 | #foreach($moduleName in $childStructures.get($machineName)) 8 | include $moduleName 9 | #end 10 | } 11 | #end 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/puppet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #Get os 4 | 5 | os="" 6 | grep "centos" /etc/issue -i -q 7 | if [ $? = '0' ];then 8 | os='centos' 9 | fi 10 | grep "redhat" /etc/issue -i -q 11 | if [ $? = '0' ];then 12 | os='redhat' 13 | fi 14 | grep "ubuntu" /etc/issue -i -q 15 | if [ $? = '0' ];then 16 | os='ubuntu' 17 | fi 18 | echo $os > /dev/null 2>&1 19 | if [ -z "$os" ];then 20 | exit 1 21 | fi 22 | 23 | 24 | #Check os 25 | case $os in "ubuntu") 26 | #Check puppetmaster 27 | dpkg -l |grep puppetmaster > /dev/null 2>&1 28 | if [ $? -ne 0 ]; then 29 | echo "Installing puppetmaster" 30 | sudo wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb && sudo dpkg -i puppetlabs-release-precise.deb && apt-get update 31 | sudo sudo apt-get install -y puppetmaster 32 | fi 33 | 34 | if [ $? -ne 0 ]; then 35 | echo "Installing puppetmaster package failed. Check network and start again." 36 | exit 1 37 | fi 38 | 39 | ;; 40 | 41 | "centos") 42 | 43 | #Check puppet-server 44 | 45 | rpm -qa |grep -i puppet-server" >/dev/null 2>&1 46 | if [ $? -ne 0 ]; then 47 | echo "Installing puppet-server" 48 | sudo rpm -ivh https://yum.puppetlabs.com/el/6.5/products/x86_64/puppetlabs-release-6-10.noarch.rpm >/dev/null 2>&1 49 | sudo yum install -y puppet-server >/dev/null 2>&1 50 | sudo /etc/init.d/iptables stop 51 | 52 | fi 53 | 54 | if [ $? -ne 0 ]; then 55 | echo "Installing puppet-server package failed. Check network and start again." 56 | exit 1 57 | fi 58 | 59 | ;; 60 | 61 | "redhat") 62 | 63 | 64 | #Check puppet-server 65 | 66 | rpm -qa |grep -i puppet-server" >/dev/null 2>&1 67 | if [ $? -ne 0 ]; then 68 | echo "Installing puppet-server" 69 | sudo rpm -ivh https://yum.puppetlabs.com/el/6.5/products/x86_64/puppetlabs-release-6-10.noarch.rpm >/dev/null 2>&1 70 | sudo yum install -y puppet-server >/dev/null 2>&1 71 | sudo /etc/init.d/iptables stop 72 | 73 | fi 74 | 75 | if [ $? -ne 0 ]; then 76 | echo "Installing puppet-server package failed. Check network and start again." 77 | exit 1 78 | fi 79 | ;; 80 | *) 81 | esac 82 | 83 | -------------------------------------------------------------------------------- /src/test/java/com/paxcel/vagrant/AppTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2014 Paxcel Technologies 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | *******************************************************************************/ 16 | package com.paxcel.vagrant; 17 | 18 | import junit.framework.Test; 19 | import junit.framework.TestCase; 20 | import junit.framework.TestSuite; 21 | 22 | /** 23 | * Unit test for simple App. 24 | */ 25 | public class AppTest 26 | extends TestCase 27 | { 28 | /** 29 | * Create the test case 30 | * 31 | * @param testName name of the test case 32 | */ 33 | public AppTest( String testName ) 34 | { 35 | super( testName ); 36 | } 37 | 38 | /** 39 | * @return the suite of tests being tested 40 | */ 41 | public static Test suite() 42 | { 43 | return new TestSuite( AppTest.class ); 44 | } 45 | 46 | /** 47 | * Rigourous Test :-) 48 | */ 49 | public void testApp() 50 | { 51 | assertTrue( true ); 52 | } 53 | } 54 | --------------------------------------------------------------------------------