You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2016/06/15 12:30:01 UTC
svn commit: r1748572 [4/23] - in
/directory/apacheds/branches/apacheds-value: ./
benchmarks/installers-maven-plugin/
benchmarks/installers-maven-plugin/.settings/
benchmarks/installers-maven-plugin/target/
benchmarks/installers-maven-plugin/target/clas...
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppCommand.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppCommand.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppCommand.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppCommand.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,114 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper command based script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto validate
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto validate
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto validate
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+:validate
+rem Find the requested command.
+for /F %%v in ('echo %1^|findstr "^console$ ^start$ ^pause$ ^resume$ ^stop$ ^restart$ ^install$ ^remove"') do call :exec set COMMAND=%%v
+
+if "%COMMAND%" == "" (
+ echo Usage: %0 { console : start : pause : resume : stop : restart : install : remove }
+ pause
+ goto :eof
+) else (
+ shift
+)
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Run the application.
+rem At runtime, the current directory will be that of wrapper.exe
+rem
+call :%COMMAND%
+if errorlevel 1 pause
+goto :eof
+
+:console
+"%_WRAPPER_EXE%" -c %_WRAPPER_CONF%
+goto :eof
+
+:start
+"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
+goto :eof
+
+:pause
+"%_WRAPPER_EXE%" -a %_WRAPPER_CONF%
+goto :eof
+
+:resume
+"%_WRAPPER_EXE%" -e %_WRAPPER_CONF%
+goto :eof
+
+:stop
+"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
+goto :eof
+
+:install
+"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
+goto :eof
+
+:remove
+"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
+goto :eof
+
+:restart
+call :stop
+call :start
+goto :eof
+
+:exec
+%*
+goto :eof
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppNoWrapper.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppNoWrapper.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppNoWrapper.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/AppNoWrapper.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,29 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem This script is an example of how to run your application without the Wrapper, but with the
+rem Wrapper helper classes. You can obtain the actual command generated by the wrapper for
+rem your application by running the Wrapper with the wrapper.java.command.loglevel=INFO
+rem property set.
+rem
+rem The wrapper.key property MUST be removed from the resulting command or it will fail to
+rem run correctly.
+rem
+java -Xms16m -Xmx64m -Djava.library.path="../lib" -Djava.class.path="../lib/wrapper.jar;../lib/wrappertest.jar" -Dwrapper.native_library="wrapper" -Dwrapper.debug="TRUE" org.tanukisoftware.wrapper.test.Main
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/InstallApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/InstallApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/InstallApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/InstallApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,67 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper general NT service install script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Install the Wrapper as an NT service.
+rem
+:startup
+"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
+if not errorlevel 1 goto :eof
+pause
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/PauseApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/PauseApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/PauseApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/PauseApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,67 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper general NT service start script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Start the Wrapper NT service.
+rem
+:startup
+"%_WRAPPER_EXE%" -a %_WRAPPER_CONF%
+if not errorlevel 1 goto :eof
+pause
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/ResumeApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/ResumeApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/ResumeApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/ResumeApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,67 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper general NT service start script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Start the Wrapper NT service.
+rem
+:startup
+"%_WRAPPER_EXE%" -e %_WRAPPER_CONF%
+if not errorlevel 1 goto :eof
+pause
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleApp.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleApp.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleApp.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleApp.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,32 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="@app.home@\conf\apacheds.conf"
+
+:startup
+"@app.home@\bin\wrapper.exe" -c %_WRAPPER_CONF%
+if not errorlevel 1 goto end
+pause
+
+:end
+set _WRAPPER_CONF=
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleInstallApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleInstallApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleInstallApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleInstallApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,32 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="@app.home@\conf\apacheds.conf"
+
+:startup
+"@app.home@\bin\wrapper.exe" -i %_WRAPPER_CONF%
+if not errorlevel 1 goto end
+pause
+
+:end
+set _WRAPPER_CONF=
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleUninstallApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleUninstallApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleUninstallApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/SimpleUninstallApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,32 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="@app.home@\conf\apacheds.conf"
+
+:startup
+"@app.home@\bin\wrapper.exe" -r %_WRAPPER_CONF%
+if not errorlevel 1 goto end
+pause
+
+:end
+set _WRAPPER_CONF=
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StartApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StartApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StartApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StartApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,67 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper general NT service start script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Start the Wrapper NT service.
+rem
+:startup
+"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
+if not errorlevel 1 goto :eof
+pause
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StopApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StopApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StopApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/StopApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,67 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper general NT service stop script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Stop the Wrapper NT service.
+rem
+:startup
+"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
+if not errorlevel 1 goto :eof
+pause
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/UninstallApp-NT.bat.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/UninstallApp-NT.bat.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/UninstallApp-NT.bat.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/UninstallApp-NT.bat.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,67 @@
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+@echo off
+setlocal
+
+rem Copyright (c) 1999, 2006 Tanuki Software Inc.
+rem
+rem Java Service Wrapper general NT service uninstall script
+rem
+
+if "%OS%"=="Windows_NT" goto nt
+echo This script only works with NT-based versions of Windows.
+goto :eof
+
+:nt
+rem
+rem Find the application home.
+rem
+rem %~dp0 is location of current script under NT
+set _REALPATH=%~dp0
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_REALPATH%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+
+rem
+rem Find the apacheds.conf
+rem
+:conf
+set _WRAPPER_CONF="%~f1"
+if not %_WRAPPER_CONF%=="" goto startup
+set _WRAPPER_CONF="%_REALPATH%..\conf\apacheds.conf"
+
+rem
+rem Uninstall the Wrapper as an NT service.
+rem
+:startup
+"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
+if not errorlevel 1 goto :eof
+pause
+
Added: directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/sh.script.in
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/sh.script.in?rev=1748572&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/sh.script.in (added)
+++ directory/apacheds/branches/apacheds-value/benchmarks/installers-maven-plugin/target/classes/org/apache/directory/server/installers/wrapper/src/sh.script.in Wed Jun 15 12:29:57 2016
@@ -0,0 +1,617 @@
+#! /bin/sh
+#
+# Shell script to start/stop Apache Directory Server
+# If you want to change apacheds service settings please modify the apacheds.conf
+# file for the instance you wish to change.
+# chkconfig: 2345 91 35
+# description: This script starts and stops @app.long.name@
+#
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+# Instances
+
+INSTANCE="$2"
+. /etc/sysconfig/apacheds
+
+#INSTANCE_HOME="/var/lib/apacheds"
+
+# Application
+APP_NAME="@app@"
+export APACHEDS_HOME
+APP_LONG_NAME="Apache Directory Server - $INSTANCE"
+
+
+# Wrapper
+WRAPPER_CMD="/opt/@app@-@app.version@/bin/apacheds"
+WRAPPER_CONF="/opt/@app@-@app.version@/conf/apacheds.conf"
+
+# Priority at which to run the wrapper. See "man nice" for valid priorities.
+# nice is only used if a priority is specified.
+PRIORITY=
+
+# Location of the pid file.
+PIDDIR="/var/run/apacheds/$INSTANCE"
+
+# If uncommented, causes the Wrapper to be shutdown using an anchor file.
+# When launched with the 'start' command, it will also ignore all INT and
+# TERM signals.
+#IGNORE_SIGNALS=true
+
+# If specified, the Wrapper will be run as the specified user.
+# IMPORTANT - Make sure that the user has the required privileges to write
+# the PID file and wrapper.log files. Failure to be able to write the log
+# file will cause the Wrapper to exit without any way to write out an error
+# message.
+# NOTE - This will set the user which is used to run the Wrapper as well as
+# the JVM and is not useful in situations where a privileged resource or
+# port needs to be allocated prior to the user being changed.
+RUN_AS_USER=$APP_NAME
+
+# Do not modify anything beyond this point
+#-----------------------------------------------------------------------------
+
+# Get the fully qualified path to the script
+case $0 in
+ /*)
+ SCRIPT="$0"
+ ;;
+ *)
+ PWD=`pwd`
+ SCRIPT="$PWD/$0"
+ ;;
+esac
+
+# Resolve the true real path without any sym links.
+CHANGED=true
+while [ "X$CHANGED" != "X" ]
+do
+ # Change spaces to ":" so the tokens can be parsed.
+ SAFESCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
+ # Get the real path to this script, resolving any symbolic links
+ TOKENS=`echo $SAFESCRIPT | sed -e 's;/; ;g'`
+ REALPATH=
+ for C in $TOKENS; do
+ # Change any ":" in the token back to a space.
+ C=`echo $C | sed -e 's;:; ;g'`
+ REALPATH="$REALPATH/$C"
+ # If REALPATH is a sym link, resolve it. Loop for nested links.
+ while [ -h "$REALPATH" ] ; do
+ LS="`ls -ld "$REALPATH"`"
+ LINK="`expr "$LS" : '.*-> \(.*\)$'`"
+ if expr "$LINK" : '/.*' > /dev/null; then
+ # LINK is absolute.
+ REALPATH="$LINK"
+ else
+ # LINK is relative.
+ REALPATH="`dirname "$REALPATH"`""/$LINK"
+ fi
+ done
+ done
+
+ if [ "$REALPATH" = "$SCRIPT" ]
+ then
+ CHANGED=""
+ else
+ SCRIPT="$REALPATH"
+ fi
+done
+
+# Change the current directory to the location of the script
+cd "`dirname "$REALPATH"`"
+REALDIR=`pwd`
+
+# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if
+# the working directory is later changed.
+FIRST_CHAR=`echo $PIDDIR | cut -c1,1`
+if [ "$FIRST_CHAR" != "/" ]
+then
+ PIDDIR=$REALDIR/$PIDDIR
+fi
+# Same test for WRAPPER_CMD
+FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1`
+if [ "$FIRST_CHAR" != "/" ]
+then
+ WRAPPER_CMD=$REALDIR/$WRAPPER_CMD
+fi
+# Same test for WRAPPER_CONF
+FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1`
+if [ "$FIRST_CHAR" != "/" ]
+then
+ WRAPPER_CONF=$REALDIR/$WRAPPER_CONF
+fi
+
+# Process ID
+ANCHORFILE="$PIDDIR/$INSTANCE.anchor"
+PIDFILE="$PIDDIR/$INSTANCE.pid"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="$LOCKDIR/$INSTANCE"
+pid=""
+
+# Resolve the location of the 'ps' command
+PSEXE="/usr/bin/ps"
+if [ ! -x "$PSEXE" ]
+then
+ PSEXE="/bin/ps"
+ if [ ! -x "$PSEXE" ]
+ then
+ echo "Unable to locate 'ps'."
+ echo "Please report this message along with the location of the command on your system."
+ exit 1
+ fi
+fi
+
+# Resolve the os
+DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
+case "$DIST_OS" in
+ 'sunos')
+ DIST_OS="solaris"
+ ;;
+ 'hp-ux' | 'hp-ux64')
+ DIST_OS="hpux"
+ ;;
+ 'darwin')
+ DIST_OS="macosx"
+ ;;
+ 'unix_sv')
+ DIST_OS="unixware"
+ ;;
+esac
+
+# Resolve the architecture
+DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]`
+if [ "$DIST_ARCH" = "unknown" ]
+then
+ DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
+fi
+case "$DIST_ARCH" in
+ 'amd64' | 'athlon' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64')
+ DIST_ARCH="x86"
+ ;;
+ 'ip27')
+ DIST_ARCH="mips"
+ ;;
+ 'power' | 'powerpc' | 'power_pc' | 'ppc64')
+ DIST_ARCH="ppc"
+ ;;
+ 'pa_risc' | 'pa-risc')
+ DIST_ARCH="parisc"
+ ;;
+ 'sun4u' | 'sparcv9')
+ DIST_ARCH="sparc"
+ ;;
+ '9000/800')
+ DIST_ARCH="parisc"
+ ;;
+esac
+
+outputFile() {
+ if [ -f "$1" ]
+ then
+ echo " $1 (Found but not executable.)";
+ else
+ echo " $1"
+ fi
+}
+
+# Decide on the wrapper binary to use.
+# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit
+# platforms, if the 64-bit binary exists then the distribution most
+# likely wants to use long names. Otherwise, look for the default.
+# For macosx, we also want to look for universal binaries.
+WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
+if [ -x "$WRAPPER_TEST_CMD" ]
+then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+else
+ if [ "$DIST_OS" = "macosx" ]
+ then
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ if [ ! -x "$WRAPPER_CMD" ]
+ then
+ echo "Unable to locate any of the following binaries:"
+ outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
+ outputFile "$WRAPPER_CMD-$DIST_OS-universal-32"
+ outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
+ outputFile "$WRAPPER_CMD-$DIST_OS-universal-64"
+ outputFile "$WRAPPER_CMD"
+ exit 1
+ fi
+ fi
+ fi
+ fi
+ else
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ if [ ! -x "$WRAPPER_CMD" ]
+ then
+ echo "Unable to locate any of the following binaries:"
+ outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32"
+ outputFile "$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64"
+ outputFile "$WRAPPER_CMD"
+ exit 1
+ fi
+ fi
+ fi
+fi
+
+# Build the nice clause
+if [ "X$PRIORITY" = "X" ]
+then
+ CMDNICE=""
+else
+ CMDNICE="nice -$PRIORITY"
+fi
+
+# Build the anchor file clause.
+if [ "X$IGNORE_SIGNALS" = "X" ]
+then
+ ANCHORPROP=
+ IGNOREPROP=
+else
+ ANCHORPROP=wrapper.anchorfile=\"$ANCHORFILE\"
+ IGNOREPROP=wrapper.ignore_signals=TRUE
+fi
+
+# Build the lock file clause. Only create a lock file if the lock directory exists on this platform.
+LOCKPROP=
+if [ -d $LOCKDIR ]
+then
+ if [ -w $LOCKDIR ]
+ then
+ LOCKPROP=wrapper.lockfile=\"$LOCKFILE\"
+ fi
+fi
+
+checkUser() {
+ # $1 touchLock flag
+ # $2 command
+ # $3 instance
+
+ # Check the configured user. If necessary rerun this script as the desired user.
+ if [ "X$RUN_AS_USER" != "X" ]
+ then
+ # Resolve the location of the 'id' command
+ IDEXE="/usr/xpg4/bin/id"
+ if [ ! -x "$IDEXE" ]
+ then
+ IDEXE="/usr/bin/id"
+ if [ ! -x "$IDEXE" ]
+ then
+ IDEXE="/bin/id"
+ if [ ! -x "$IDEXE" ]
+ then
+ echo "Unable to locate 'id'."
+ echo "Please report this message along with the location of the command on your system."
+ exit 1
+ fi
+ fi
+ fi
+
+ if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
+ then
+ # Already running as the configured user. Avoid password prompts by not calling su.
+ RUN_AS_USER=""
+ fi
+ fi
+ if [ "X$RUN_AS_USER" != "X" ]
+ then
+ # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be
+ # able to create the lock file. The Wrapper will be able to update this file once it
+ # is created but will not be able to delete it on shutdown. If $2 is defined then
+ # the lock file should be created for the current command
+ if [ "X$LOCKPROP" != "X" ]
+ then
+ if [ "X$1" != "X" ]
+ then
+ # Resolve the primary group
+ RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
+ if [ "X$RUN_AS_GROUP" = "X" ]
+ then
+ RUN_AS_GROUP=$RUN_AS_USER
+ fi
+ touch $LOCKFILE
+ chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE
+ fi
+ fi
+
+ # Still want to change users, recurse. This means that the user will only be
+ # prompted for a password once. Variables shifted by 1
+ su -m $RUN_AS_USER -c "\"$REALPATH\" $2 $3"
+ ret=$?
+
+ # Now that we are the original user again, we may need to clean up the lock file.
+ if [ "X$LOCKPROP" != "X" ]
+ then
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ # Wrapper is not running so make sure the lock file is deleted.
+ if [ -f "$LOCKFILE" ]
+ then
+ rm "$LOCKFILE"
+ fi
+ fi
+ fi
+
+ exit $ret
+ fi
+}
+
+getpid() {
+ if [ -f "$PIDFILE" ]
+ then
+ if [ -r "$PIDFILE" ]
+ then
+ pid=`cat "$PIDFILE"`
+ if [ "X$pid" != "X" ]
+ then
+ # It is possible that 'a' process with the pid exists but that it is not the
+ # correct process. This can happen in a number of cases, but the most
+ # common is during system startup after an unclean shutdown.
+ # The ps statement below looks for the specific wrapper command running as
+ # the pid. If it is not found then the pid file is considered to be stale.
+ pidtest=`$PSEXE -p $pid -o args | grep "$WRAPPER_CMD" | tail -1`
+ if [ "X$pidtest" = "X" ]
+ then
+ # This is a stale pid file.
+ rm -f "$PIDFILE"
+ echo "Removed stale pid file: $PIDFILE"
+ pid=""
+ fi
+ fi
+ else
+ echo "Cannot read $PIDFILE."
+ exit 1
+ fi
+ fi
+}
+
+testpid() {
+ pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
+ if [ "X$pid" = "X" ]
+ then
+ # Process is gone so remove the pid file.
+ rm -f "$PIDFILE"
+ pid=""
+ fi
+}
+
+usage() {
+ echo "Please enter an instance name..."
+ echo "Usage: $0 <command> <instance name>"
+ echo " Available Commands: "
+ echo " console - Run in interactive mode with log output to the console."
+ echo " Press CTRL-C to stop."
+ echo " start - Run the instance in the background"
+ echo " stop - Stop the running instance"
+ echo " repair - Repair the instance"
+ echo " restart - Restart the instance if it is already running,"
+ echo " or start if it wasn't already running"
+ echo " status - Display the status of the instance (running or stopped)"
+ echo " dump - Request a JVM dump of the running process"
+}
+
+console() {
+ echo "Running $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ # The string passed to eval must handles spaces in paths correctly.
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" set.INSTANCE_HOME=\"$INSTANCE_HOME\" set.INSTANCE=\"$INSTANCE\" wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" $ANCHORPROP $LOCKPROP wrapper.debug=true"
+ eval $COMMAND_LINE
+ else
+ echo "$APP_LONG_NAME is already running."
+ exit 1
+ fi
+}
+
+start() {
+ echo "Starting $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ # The string passed to eval must handles spaces in paths correctly.
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" set.INSTANCE_HOME=$INSTANCE_HOME set.INSTANCE=$INSTANCE wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
+ eval $COMMAND_LINE
+ else
+ echo "$APP_LONG_NAME is already running."
+ exit 1
+ fi
+}
+
+repair() {
+ echo "Repairing $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ # The string passed to eval must handles spaces in paths correctly.
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" repair \"$WRAPPER_CONF\" set.REPAIR_COMMAND=repair set.INSTANCE_HOME=$INSTANCE_HOME set.INSTANCE=$INSTANCE wrapper.syslog.ident=$APP_NAME wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
+ eval $COMMAND_LINE
+ else
+ echo "$APP_LONG_NAME is already running."
+ exit 1
+ fi
+}
+
+stopit() {
+ echo "Stopping $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ echo "$APP_LONG_NAME was not running."
+ else
+ if [ "X$IGNORE_SIGNALS" = "X" ]
+ then
+ # Running so try to stop it.
+ kill $pid
+ if [ $? -ne 0 ]
+ then
+ # An explanation for the failure should have been given
+ echo "Unable to stop $APP_LONG_NAME."
+ exit 1
+ fi
+ else
+ rm -f "$ANCHORFILE"
+ if [ -f "$ANCHORFILE" ]
+ then
+ # An explanation for the failure should have been given
+ echo "Unable to stop $APP_LONG_NAME."
+ exit 1
+ fi
+ fi
+
+ # We can not predict how long it will take for the wrapper to
+ # actually stop as it depends on settings in apacheds.conf.
+ # Loop until it does.
+ savepid=$pid
+ CNT=0
+ TOTCNT=0
+ while [ "X$pid" != "X" ]
+ do
+ # Show a waiting message every 5 seconds.
+ if [ "$CNT" -lt "5" ]
+ then
+ CNT=`expr $CNT + 1`
+ else
+ echo "Waiting for $APP_LONG_NAME to exit..."
+ CNT=0
+ fi
+ TOTCNT=`expr $TOTCNT + 1`
+
+ sleep 1
+
+ testpid
+ done
+
+ pid=$savepid
+ testpid
+ if [ "X$pid" != "X" ]
+ then
+ echo "Failed to stop $APP_LONG_NAME."
+ exit 1
+ else
+ echo "Stopped $APP_LONG_NAME."
+ fi
+ fi
+}
+
+status() {
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ echo "$APP_LONG_NAME is not running."
+ exit 1
+ else
+ echo "$APP_LONG_NAME is running ($pid)."
+ exit 0
+ fi
+}
+
+dump() {
+ echo "Dumping $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ echo "$APP_LONG_NAME was not running."
+
+ else
+ kill -3 $pid
+
+ if [ $? -ne 0 ]
+ then
+ echo "Failed to dump $APP_LONG_NAME."
+ exit 1
+ else
+ echo "Dumped $APP_LONG_NAME."
+ fi
+ fi
+}
+
+# Make sure they entered an instance name
+if [ "x"$2 = "x" ]
+then
+ usage
+ exit 1
+fi
+
+case "$1" in
+
+ 'console')
+ checkUser touchlock $1 $INSTANCE
+ console
+ ;;
+
+ 'start')
+ checkUser touchlock $1 $INSTANCE
+ start
+ ;;
+
+ 'repair')
+ checkUser touchlock $1 $INSTANCE
+ stopit
+ repair
+ start
+ ;;
+
+ 'stop')
+ checkUser "" $1 $INSTANCE
+ stopit
+ ;;
+
+ 'restart')
+ checkUser touchlock $1 $INSTANCE
+ stopit
+ start
+ ;;
+
+ 'status')
+ checkUser "" $1 $INSTANCE
+ status
+ ;;
+
+ 'dump')
+ checkUser "" $1 $INSTANCE
+ dump
+ ;;
+
+ *)
+ echo "Usage: $0 { console | start | stop | restart | status | dump } <instance name>"
+ exit 1
+ ;;
+esac
+
+exit 0
Modified: directory/apacheds/branches/apacheds-value/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java (original)
+++ directory/apacheds/branches/apacheds-value/core-annotations/src/main/java/org/apache/directory/server/core/factory/JdbmPartitionFactory.java Wed Jun 15 12:29:57 2016
@@ -49,7 +49,7 @@ public class JdbmPartitionFactory implem
{
JdbmPartition partition = new JdbmPartition( schemaManager, dnFactory );
partition.setId( id );
- partition.setSuffixDn( new Dn( suffix ) );
+ partition.setSuffixDn( new Dn( schemaManager, suffix ) );
partition.setCacheSize( cacheSize );
partition.setPartitionPath( workingDirectory.toURI() );
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java Wed Jun 15 12:29:57 2016
@@ -134,6 +134,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void close() throws IOException
{
try
@@ -152,6 +153,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean connect() throws LdapException
{
return true;
@@ -161,6 +163,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public AddResponse add( AddRequest addRequest ) throws LdapException
{
if ( addRequest == null )
@@ -204,6 +207,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void add( Entry entry ) throws LdapException
{
if ( entry == null )
@@ -226,6 +230,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public CompareResponse compare( CompareRequest compareRequest ) throws LdapException
{
if ( compareRequest == null )
@@ -257,6 +262,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean compare( Dn dn, String attributeName, byte[] value ) throws LdapException
{
CompareRequest compareRequest = new CompareRequestImpl();
@@ -273,6 +279,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean compare( Dn dn, String attributeName, String value ) throws LdapException
{
CompareRequest compareRequest = new CompareRequestImpl();
@@ -289,6 +296,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean compare( String dn, String attributeName, byte[] value ) throws LdapException
{
return compare( new Dn( schemaManager, dn ), attributeName, value );
@@ -298,6 +306,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean compare( String dn, String attributeName, String value ) throws LdapException
{
return compare( new Dn( schemaManager, dn ), attributeName, value );
@@ -307,7 +316,8 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
- public boolean compare( Dn dn, String attributeName, Value<?> value ) throws LdapException
+ @Override
+ public boolean compare( Dn dn, String attributeName, Value value ) throws LdapException
{
CompareRequest compareRequest = new CompareRequestImpl();
compareRequest.setName( dn );
@@ -315,7 +325,7 @@ public class LdapCoreSessionConnection e
if ( value.isHumanReadable() )
{
- compareRequest.setAssertionValue( value.getString() );
+ compareRequest.setAssertionValue( value.getValue() );
}
else
{
@@ -331,7 +341,8 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
- public boolean compare( String dn, String attributeName, Value<?> value ) throws LdapException
+ @Override
+ public boolean compare( String dn, String attributeName, Value value ) throws LdapException
{
return compare( new Dn( schemaManager, dn ), attributeName, value );
}
@@ -340,6 +351,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
{
if ( deleteRequest == null )
@@ -375,6 +387,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void delete( Dn dn ) throws LdapException
{
DeleteRequest deleteRequest = new DeleteRequestImpl();
@@ -389,6 +402,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void delete( String dn ) throws LdapException
{
delete( new Dn( schemaManager, dn ) );
@@ -398,6 +412,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean doesFutureExistFor( int messageId )
{
return false;
@@ -407,6 +422,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public SchemaManager getSchemaManager()
{
return schemaManager;
@@ -416,6 +432,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public LdapApiService getCodecService()
{
return codec;
@@ -425,6 +442,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public List<String> getSupportedControls() throws LdapException
{
return null;
@@ -434,15 +452,17 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean isAuthenticated()
{
- return ( session != null );
+ return session != null;
}
/**
* {@inheritDoc}
*/
+ @Override
public boolean isConnected()
{
return true;
@@ -452,6 +472,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean isControlSupported( String controlOID ) throws LdapException
{
return false;
@@ -461,6 +482,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void loadSchema() throws LdapException
{
// do nothing, cause we already have SchemaManager in the session's DirectoryService
@@ -480,6 +502,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry lookup( Dn dn, String... attributes ) throws LdapException
{
return lookup( dn, null, attributes );
@@ -489,6 +512,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry lookup( Dn dn, Control[] controls, String... attributes ) throws LdapException
{
messageId.incrementAndGet();
@@ -511,6 +535,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry lookup( String dn, String... attributes ) throws LdapException
{
Dn baseDn = new Dn( schemaManager, dn );
@@ -522,6 +547,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry lookup( String dn, Control[] controls, String... attributes ) throws LdapException
{
Dn baseDn = new Dn( schemaManager, dn );
@@ -533,6 +559,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean exists( String dn ) throws LdapException
{
return exists( new Dn( schemaManager, dn ) );
@@ -542,6 +569,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public boolean exists( Dn dn ) throws LdapException
{
try
@@ -553,6 +581,8 @@ public class LdapCoreSessionConnection e
catch ( LdapNoPermissionException lnpe )
{
// Special case to deal with insufficient permissions
+ LOG.info( lnpe.getMessage(), lnpe );
+
return false;
}
catch ( LdapException le )
@@ -565,6 +595,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry getRootDse() throws LdapException
{
return lookup( Dn.ROOT_DSE, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
@@ -574,6 +605,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry getRootDse( String... attributes ) throws LdapException
{
return lookup( Dn.ROOT_DSE, attributes );
@@ -583,6 +615,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry lookup( Dn dn ) throws LdapException
{
return lookup( dn, ( String[] ) null );
@@ -592,6 +625,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public Entry lookup( String dn ) throws LdapException
{
return lookup( new Dn( schemaManager, dn ), ( String[] ) null );
@@ -601,6 +635,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void modify( Dn dn, Modification... modifications ) throws LdapException
{
if ( dn == null )
@@ -637,6 +672,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void modify( String dn, Modification... modifications ) throws LdapException
{
modify( new Dn( schemaManager, dn ), modifications );
@@ -646,6 +682,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void modify( Entry entry, ModificationOperation modOp ) throws LdapException
{
if ( entry == null )
@@ -676,6 +713,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ModifyResponse modify( ModifyRequest modRequest ) throws LdapException
{
if ( modRequest == null )
@@ -712,6 +750,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
{
if ( modDnRequest == null )
@@ -733,21 +772,28 @@ public class LdapCoreSessionConnection e
String msg = "Modify Dn is not allowed on Root DSE.";
result.setResultCode( ResultCodeEnum.PROTOCOL_ERROR );
result.setDiagnosticMessage( msg );
+
return resp;
}
try
{
- Dn newRdn = null;
-
- if ( modDnRequest.getNewRdn() != null )
+ Rdn newRdn = modDnRequest.getNewRdn();
+
+ if ( ( newRdn != null ) && !newRdn.isSchemaAware() )
{
- newRdn = new Dn( schemaManager, modDnRequest.getNewRdn().getName() );
+ modDnRequest.setNewRdn( new Rdn( schemaManager, newRdn ) );
}
- Dn oldRdn = new Dn( schemaManager, modDnRequest.getName().getRdn().getName() );
+ Rdn oldRdn = modDnRequest.getName().getRdn();
- boolean rdnChanged = modDnRequest.getNewRdn() != null
+ if ( !modDnRequest.getName().isSchemaAware() )
+ {
+ modDnRequest.setName( new Dn( schemaManager, modDnRequest.getName() ) );
+ oldRdn = modDnRequest.getName().getRdn();
+ }
+
+ boolean rdnChanged = modDnRequest.getNewRdn() != null
&& !newRdn.getNormName().equals( oldRdn.getNormName() );
if ( rdnChanged )
@@ -790,6 +836,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void move( Dn entryDn, Dn newSuperiorDn ) throws LdapException
{
if ( entryDn == null )
@@ -806,11 +853,11 @@ public class LdapCoreSessionConnection e
throw new IllegalArgumentException( msg );
}
- ModifyDnRequest iModDnReq = new ModifyDnRequestImpl();
- iModDnReq.setName( entryDn );
- iModDnReq.setNewSuperior( newSuperiorDn );
+ ModifyDnRequest modDnReq = new ModifyDnRequestImpl();
+ modDnReq.setName( entryDn );
+ modDnReq.setNewSuperior( newSuperiorDn );
- ModifyDnResponse modifyDnResponse = modifyDn( iModDnReq );
+ ModifyDnResponse modifyDnResponse = modifyDn( modDnReq );
processResponse( modifyDnResponse );
}
@@ -818,6 +865,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void move( String entryDn, String newSuperiorDn ) throws LdapException
{
if ( entryDn == null )
@@ -841,6 +889,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void rename( Dn entryDn, Rdn newRdn, boolean deleteOldRdn ) throws LdapException
{
if ( entryDn == null )
@@ -871,6 +920,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void rename( Dn entryDn, Rdn newRdn ) throws LdapException
{
rename( entryDn, newRdn, false );
@@ -880,6 +930,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
{
rename( new Dn( schemaManager, entryDn ), new Rdn( newRdn ), deleteOldRdn );
@@ -889,6 +940,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void rename( String entryDn, String newRdn ) throws LdapException
{
if ( entryDn == null )
@@ -905,7 +957,7 @@ public class LdapCoreSessionConnection e
throw new IllegalArgumentException( msg );
}
- rename( new Dn( schemaManager, entryDn ), new Rdn( newRdn ) );
+ rename( new Dn( schemaManager, entryDn ), new Rdn( schemaManager, newRdn ) );
}
@@ -914,6 +966,7 @@ public class LdapCoreSessionConnection e
*
* @see #moveAndRename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Dn, boolean)
*/
+ @Override
public void moveAndRename( Dn entryDn, Dn newDn ) throws LdapException
{
moveAndRename( entryDn, newDn, true );
@@ -925,6 +978,7 @@ public class LdapCoreSessionConnection e
*
* @see #moveAndRename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Dn, boolean)
*/
+ @Override
public void moveAndRename( String entryDn, String newDn ) throws LdapException
{
moveAndRename( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newDn ), true );
@@ -938,6 +992,7 @@ public class LdapCoreSessionConnection e
* @param newDn The new Entry Dn
* @param deleteOldRdn Tells if the old Rdn must be removed
*/
+ @Override
public void moveAndRename( Dn entryDn, Dn newDn, boolean deleteOldRdn ) throws LdapException
{
// Check the parameters first
@@ -983,6 +1038,7 @@ public class LdapCoreSessionConnection e
* @param newDn The new Entry Dn
* @param deleteOldRdn Tells if the old Rdn must be removed
*/
+ @Override
public void moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException
{
moveAndRename( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newDn ), deleteOldRdn );
@@ -992,6 +1048,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public SearchCursor search( SearchRequest searchRequest ) throws LdapException
{
if ( searchRequest == null )
@@ -1025,6 +1082,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public EntryCursor search( Dn baseDn, String filter, SearchScope scope, String... attributes )
throws LdapException
{
@@ -1050,6 +1108,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public EntryCursor search( String baseDn, String filter, SearchScope scope, String... attributes )
throws LdapException
{
@@ -1060,6 +1119,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void unBind() throws LdapException
{
messageId.set( 0 );
@@ -1080,6 +1140,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ExtendedResponse extended( String oid ) throws LdapException
{
throw new UnsupportedOperationException(
@@ -1090,6 +1151,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
{
if ( extendedRequest == null )
@@ -1107,6 +1169,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ExtendedResponse extended( Oid oid, byte[] value ) throws LdapException
{
return extended( ( String ) null );
@@ -1116,6 +1179,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ExtendedResponse extended( Oid oid ) throws LdapException
{
return extended( ( String ) null );
@@ -1125,6 +1189,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public ExtendedResponse extended( String oid, byte[] value ) throws LdapException
{
return extended( ( String ) null );
@@ -1134,6 +1199,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void setTimeOut( long timeOut )
{
throw new UnsupportedOperationException( "setting timeout is not supported on CoreSession" );
@@ -1143,6 +1209,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void abandon( AbandonRequest abandonRequest )
{
throw new UnsupportedOperationException( "abandon operation is not supported" );
@@ -1152,6 +1219,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void abandon( int messageId )
{
abandon( null );
@@ -1161,6 +1229,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void bind() throws LdapException
{
throw new UnsupportedOperationException(
@@ -1171,6 +1240,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public void anonymousBind() throws LdapException
{
BindRequest bindRequest = new BindRequestImpl();
@@ -1186,6 +1256,7 @@ public class LdapCoreSessionConnection e
/**
* {@inheritDoc}
*/
+ @Override
public BindResponse bind( BindRequest bindRequest ) throws LdapException
{
if ( bindRequest == null )
@@ -1200,7 +1271,14 @@ public class LdapCoreSessionConnection e
BindOperationContext bindContext = new BindOperationContext( null );
bindContext.setCredentials( bindRequest.getCredentials() );
- bindContext.setDn( bindRequest.getDn().apply( directoryService.getSchemaManager() ) );
+ Dn bindDn = bindRequest.getDn();
+
+ if ( !bindDn.isSchemaAware() )
+ {
+ bindDn = new Dn( directoryService.getSchemaManager(), bindDn );
+ }
+
+ bindContext.setDn( bindDn );
bindContext.setInterceptors( directoryService.getInterceptors( OperationEnum.BIND ) );
for ( Control control : bindRequest.getControls().values() )
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapPrincipal.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapPrincipal.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/LdapPrincipal.java Wed Jun 15 12:29:57 2016
@@ -38,8 +38,6 @@ import org.apache.directory.server.i18n.
*/
public final class LdapPrincipal implements Principal, Cloneable
{
- private static final long serialVersionUID = 3906650782395676720L;
-
/** the normalized distinguished name of the principal */
private Dn dn = Dn.EMPTY_DN;
@@ -140,6 +138,7 @@ public final class LdapPrincipal impleme
/**
* Returns the normalized distinguished name of the principal as a String.
*/
+ @Override
public String getName()
{
return dn.getNormName();
@@ -181,6 +180,7 @@ public final class LdapPrincipal impleme
* Clone the object. This is done so that we don't store the
* password in a LdapPrincipal more than necessary.
*/
+ @Override
public Object clone() throws CloneNotSupportedException
{
LdapPrincipal clone = ( LdapPrincipal ) super.clone();
@@ -210,13 +210,16 @@ public final class LdapPrincipal impleme
{
this.schemaManager = schemaManager;
- try
- {
- dn.apply( schemaManager );
- }
- catch ( LdapInvalidDnException lide )
+ if ( !dn.isSchemaAware() )
{
- // TODO: manage this exception
+ try
+ {
+ dn = new Dn( schemaManager, dn );
+ }
+ catch ( LdapInvalidDnException lide )
+ {
+ // TODO: manage this exception
+ }
}
}
@@ -261,6 +264,7 @@ public final class LdapPrincipal impleme
* Returns string representation of the normalized distinguished name
* of this principal.
*/
+ @Override
public String toString()
{
StringBuilder sb = new StringBuilder();
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/ReferralManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/ReferralManager.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/ReferralManager.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/ReferralManager.java Wed Jun 15 12:29:57 2016
@@ -124,5 +124,5 @@ public interface ReferralManager
* @param suffixes The partition Dn to remove
* @exception If the removal failed
*/
- void remove( DirectoryService directoryService, Dn suffix ) throws Exception;
+ void remove( DirectoryService directoryService, Dn suffixes ) throws Exception;
}
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ClonedServerEntry.java Wed Jun 15 12:29:57 2016
@@ -105,7 +105,7 @@ public class ClonedServerEntry implement
}
- public Entry add( AttributeType attributeType, Value<?>... values ) throws LdapException
+ public Entry add( AttributeType attributeType, Value... values ) throws LdapException
{
return clonedEntry.add( attributeType, values );
}
@@ -123,7 +123,7 @@ public class ClonedServerEntry implement
}
- public Entry add( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
+ public Entry add( String upId, AttributeType attributeType, Value... values ) throws LdapException
{
return clonedEntry.add( attributeType, values );
}
@@ -141,7 +141,7 @@ public class ClonedServerEntry implement
}
- public boolean contains( AttributeType attributeType, Value<?>... values )
+ public boolean contains( AttributeType attributeType, Value... values )
{
return clonedEntry.contains( attributeType, values );
}
@@ -186,7 +186,7 @@ public class ClonedServerEntry implement
}
- public Attribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
+ public Attribute put( AttributeType attributeType, Value... values ) throws LdapException
{
return clonedEntry.put( attributeType, values );
}
@@ -204,7 +204,7 @@ public class ClonedServerEntry implement
}
- public Attribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
+ public Attribute put( String upId, AttributeType attributeType, Value... values ) throws LdapException
{
return clonedEntry.put( upId, attributeType, values );
}
@@ -222,7 +222,7 @@ public class ClonedServerEntry implement
}
- public boolean remove( AttributeType attributeType, Value<?>... values ) throws LdapException
+ public boolean remove( AttributeType attributeType, Value... values ) throws LdapException
{
return clonedEntry.remove( attributeType, values );
}
@@ -258,7 +258,7 @@ public class ClonedServerEntry implement
}
- public Entry add( String upId, Value<?>... values ) throws LdapException
+ public Entry add( String upId, Value... values ) throws LdapException
{
return clonedEntry.add( upId, values );
}
@@ -288,7 +288,7 @@ public class ClonedServerEntry implement
}
- public boolean contains( String upId, Value<?>... values )
+ public boolean contains( String upId, Value... values )
{
return clonedEntry.contains( upId, values );
}
@@ -351,7 +351,7 @@ public class ClonedServerEntry implement
}
- public Attribute put( String upId, Value<?>... values )
+ public Attribute put( String upId, Value... values )
{
return clonedEntry.put( upId, values );
}
@@ -369,7 +369,7 @@ public class ClonedServerEntry implement
}
- public boolean remove( String upId, Value<?>... values ) throws LdapException
+ public boolean remove( String upId, Value... values ) throws LdapException
{
return clonedEntry.remove( upId, values );
}
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java Wed Jun 15 12:29:57 2016
@@ -81,7 +81,7 @@ public final class ServerEntryUtils
javax.naming.directory.Attribute attribute = new BasicAttribute( attributeType.getName() );
- for ( Value<?> value : entryAttribute )
+ for ( Value value : entryAttribute )
{
attribute.add( value.getValue() );
}
@@ -289,7 +289,7 @@ public final class ServerEntryUtils
if ( existing != null )
{
- for ( Value<?> value : toBeRemoved )
+ for ( Value value : toBeRemoved )
{
existing.remove( value );
}
@@ -304,13 +304,13 @@ public final class ServerEntryUtils
if ( existing != null )
{
- for ( Value<?> value : existing )
+ for ( Value value : existing )
{
combined.add( value );
}
}
- for ( Value<?> value : toBeAdded )
+ for ( Value value : toBeAdded )
{
combined.add( value );
}
@@ -360,7 +360,7 @@ public final class ServerEntryUtils
Attribute attr = attr0.clone();
- for ( Value<?> value : attr1 )
+ for ( Value value : attr1 )
{
attr.add( value );
}
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/LeafEvaluator.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/LeafEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/LeafEvaluator.java Wed Jun 15 12:29:57 2016
@@ -185,8 +185,7 @@ public class LeafEvaluator implements Ev
* and use the comparator to determine if a match exists.
*/
Normalizer normalizer = getNormalizer( attributeType );
- Comparator comparator = getComparator( attributeType );
- Object filterValue = normalizer.normalize( node.getValue() );
+ Value filterValue = node.getValue();
/*
* Cheaper to not check isGreater in one loop - better to separate
@@ -194,12 +193,10 @@ public class LeafEvaluator implements Ev
*/
if ( isGreaterOrLesser == COMPARE_GREATER )
{
- for ( Value<?> value : attr )
+ for ( Value value : attr )
{
- Object normValue = normalizer.normalize( value );
-
// Found a value that is greater than or equal to the ava value
- if ( comparator.compare( normValue, filterValue ) >= 0 )
+ if ( value.compareTo( filterValue ) >= 0 )
{
return true;
}
@@ -207,12 +204,10 @@ public class LeafEvaluator implements Ev
}
else
{
- for ( Value<?> value : attr )
+ for ( Value value : attr )
{
- Object normValue = normalizer.normalize( value );
-
// Found a value that is less than or equal to the ava value
- if ( comparator.compare( normValue, filterValue ) <= 0 )
+ if ( value.compareTo( filterValue ) <= 0 )
{
return true;
}
@@ -269,7 +264,7 @@ public class LeafEvaluator implements Ev
// check if Ava value exists in attribute
AttributeType attributeType = node.getAttributeType();
- Value<?> value = null;
+ Value value = null;
if ( attributeType.getSyntax().isHumanReadable() )
{
@@ -279,7 +274,7 @@ public class LeafEvaluator implements Ev
}
else
{
- value = new org.apache.directory.api.ldap.model.entry.StringValue( node.getValue().getString() );
+ value = new Value( attributeType, node.getValue().getValue() );
}
}
else
@@ -292,11 +287,8 @@ public class LeafEvaluator implements Ev
return true;
}
- // get the normalized Ava filter value
- Value<?> filterValue = normalizer.normalize( value );
-
// check if the normalized value is present
- if ( attr.contains( filterValue ) )
+ if ( attr.contains( value ) )
{
return true;
}
@@ -306,11 +298,9 @@ public class LeafEvaluator implements Ev
* a lookup to work. For each value we normalize and use the comparator
* to determine if a match exists.
*/
- for ( Value<?> val : attr )
+ for ( Value val : attr )
{
- Value<?> normValue = normalizer.normalize( val );
-
- if ( 0 == comparator.compare( normValue.getValue(), filterValue.getValue() ) )
+ if ( 0 == val.compareTo( value ) )
{
return true;
}
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/NotificationCriteria.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/NotificationCriteria.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/NotificationCriteria.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/NotificationCriteria.java Wed Jun 15 12:29:57 2016
@@ -28,6 +28,7 @@ import org.apache.directory.api.ldap.mod
import org.apache.directory.api.ldap.model.message.SearchRequest;
import org.apache.directory.api.ldap.model.message.SearchScope;
import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
/**
@@ -53,24 +54,28 @@ public class NotificationCriteria
/** The event mask to use (default to everything) */
private int eventMask = EventType.ALL_EVENT_TYPES_MASK;
+ /** The SchemaManager */
+ private SchemaManager schemaManager;
/**
* Create a new instance of a NotiticationCriteria
*/
- public NotificationCriteria()
+ public NotificationCriteria( SchemaManager schemaManager )
{
+ this.schemaManager = schemaManager;
}
/**
* Create a new instance of a NotiticationCriteria initialized with a search request
*/
- public NotificationCriteria( SearchRequest req )
+ public NotificationCriteria( SchemaManager schemaManager, SearchRequest req )
{
this.scope = req.getScope();
this.aliasDerefMode = req.getDerefAliases();
this.base = req.getBase();
this.filter = req.getFilter();
+ this.schemaManager = schemaManager;
}
@@ -142,7 +147,7 @@ public class NotificationCriteria
*/
public void setFilter( String filter ) throws Exception
{
- this.filter = FilterParser.parse( filter );
+ this.filter = FilterParser.parse( schemaManager, filter );
}
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/RegistrationEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/RegistrationEntry.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/RegistrationEntry.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/RegistrationEntry.java Wed Jun 15 12:29:57 2016
@@ -19,6 +19,7 @@
*/
package org.apache.directory.server.core.api.event;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
/**
* Entry for a {@link DirectoryListener} in the {@link EventService}.
@@ -38,9 +39,9 @@ public class RegistrationEntry
* Creates a new instance of RegistrationEntry associated with a listener
* @param listener The associated listener
*/
- RegistrationEntry( DirectoryListener listener )
+ RegistrationEntry( SchemaManager schemaManager, DirectoryListener listener )
{
- this( listener, new NotificationCriteria() );
+ this( listener, new NotificationCriteria( schemaManager ) );
}
Modified: directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/SubstringEvaluator.java?rev=1748572&r1=1748571&r2=1748572&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/SubstringEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-value/core-api/src/main/java/org/apache/directory/server/core/api/event/SubstringEvaluator.java Wed Jun 15 12:29:57 2016
@@ -97,9 +97,9 @@ public class SubstringEvaluator implemen
* substring matching rule.
*/
- for ( Value<?> value : attr )
+ for ( Value value : attr )
{
- String normValue = normalizer.normalize( value.getString() );
+ String normValue = normalizer.normalize( value.getValue() );
// Once match is found cleanup and return true