Skip to content

Commit

Permalink
change outdated -printpass occurrences to -printsecret
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-actoron committed Jan 14, 2021
1 parent 2e4e146 commit 289f25c
Show file tree
Hide file tree
Showing 26 changed files with 36 additions and 48 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ jadex-platform-standalone-launch/highscore.dmp
/tools/runtimetools-swing/jcc.settings.json
/platform/webservice-websocket/node_modules
/fastbuild.bat
/broken build 1
/broken build 2
/broken build 3
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void main(String[] args)
"-gui", "false",
"-welcome", "false",
"-cli", "false",
"-printpass", "false"
"-printsecret", "false"
};
String[] newargs = new String[defargs.length+args.length];
System.arraycopy(defargs, 0, newargs, 0, defargs.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void main(String[] args)
"-gui", "false",
"-welcome", "false",
"-cli", "false",
"-printpass", "false"
"-printsecret", "false"
};
String[] newargs = new String[defargs.length+args.length];
System.arraycopy(defargs, 0, newargs, 0, defargs.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void main(String[] args)
"-gui", "false",
"-welcome", "false",
"-cli", "false",
"-printpass", "false"
"-printsecret", "false"
};
String[] newargs = new String[defargs.length+args.length];
System.arraycopy(defargs, 0, newargs, 0, defargs.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected IFuture<TestReport> testRemote(final int testno, final long delay, fin
// Starter.createPlatform(new String[]{"-libpath", url, "-platformname", agent.getComponentIdentifier().getPlatformPrefix()+"_*",
// "-saveonexit", "false", "-welcome", "false", "-awareness", "false",
// // "-logging_level", "java.util.logging.Level.INFO",
// "-gui", "false", "-simulation", "false", "-printpass", "false",
// "-gui", "false", "-simulation", "false", "-printsecret", "false",
// "-superpeerclient", "false" // TODO: fails on shutdown due to auto restart
// })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import jadex.bridge.service.ServiceScope;
import jadex.bridge.service.annotation.Service;
import jadex.bridge.service.component.IRequiredServicesFeature;
import jadex.commons.SReflect;
import jadex.commons.future.DelegationResultListener;
import jadex.commons.future.ExceptionDelegationResultListener;
import jadex.commons.future.Future;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected IFuture<TestReport[]> testRemote(final int testno, final long delay, f
// Starter.createPlatform(STest.getDefaultTestConfig(), new String[]{"-libpath", url, "-platformname", agent.getId().getPlatformPrefix()+"_*",
// "-saveonexit", "false", "-welcome", "false", "-awareness", "false",
// // "-logging_level", "java.util.logging.Level.INFO",
// "-gui", "false", "-simulation", "false", "-simul", "false", "-printpass", "false",
// "-gui", "false", "-simulation", "false", "-simul", "false", "-printsecret", "false",
// "-superpeerclient", "false" // TODO: fails on shutdown due to auto restart
// }).addResultListener(agent.getFeature(IExecutionFeature.class).createResultListener(
IPlatformConfiguration conf = STest.getDefaultTestConfig(getClass());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected IFuture<TestReport> testRemote(final int testno, final long delay, fin
Starter.createPlatform(new String[]{"-libpath", url, "-platformname", agent.getId().getPlatformPrefix()+"_*",
"-saveonexit", "false", "-welcome", "false", "-awareness", "false",
// "-logging_level", "java.util.logging.Level.INFO",
"-gui", "false", "-simulation", "false", "-printpass", "false",
"-gui", "false", "-simulation", "false", "-printsecret", "false",
"-superpeerclient", "false" // TODO: fails on shutdown due to auto restart
}).addResultListener(agent.getFeature(IExecutionFeature.class).createResultListener(
new ExceptionDelegationResultListener<IExternalAccess, TestReport>(ret)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static IFuture<IExternalAccess[]> startScenario(final String[] libpaths)
{
final Future<IExternalAccess[]> ret = new Future<IExternalAccess[]>();

// String[] defargs = new String[]{"-logging", "true", "-platformname", "local", "-tcpport", "10000", "-tcpport", "10001", "-printpass", "false", "-networkname", "abc"};
// String[] defargs = new String[]{"-logging", "true", "-platformname", "local", "-tcpport", "10000", "-tcpport", "10001", "-printsecret", "false", "-networkname", "abc"};


// Starter.createPlatform(createArguments(defargs, libpaths))
Expand All @@ -49,7 +49,7 @@ public static IFuture<IExternalAccess[]> startScenario(final String[] libpaths)
{
public void resultAvailable(final IExternalAccess lplat)
{
String[] defargs = new String[]{"-platformname", "remote", "-tcpport", "11000", "-tcpport", "11001", "-printpass", "false", "-networkname", "abc"};
String[] defargs = new String[]{"-platformname", "remote", "-tcpport", "11000", "-tcpport", "11001", "-printsecret", "false", "-networkname", "abc"};

// Starter.createPlatform(createArguments(defargs, libpaths))
Starter.createPlatform(PlatformConfigurationHandler.getMinimal())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public IFuture<Void> body()
// IExternalAccess plat = Starter.createPlatform(STest.getDefaultTestConfig(), new String[]{"-libpath", url, "-platformname", agent.getComponentIdentifier().getPlatformPrefix()+"_*",
// "-saveonexit", "false", "-welcome", "false", //"-awareness", "false",
// // "-logging_level", "java.util.logging.Level.INFO",
// "-gui", "false", "-simulation", "false", "-printpass", "false", "-wstransport", "false",
// "-gui", "false", "-simulation", "false", "-printsecret", "false", "-wstransport", "false",
// "-superpeerclient", "false",
// }).get();

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/env/08 Standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PlatformConfiguration config = PlatformConfiguration.getDefault();
config.setGui(false);
config.setWelcome(false);
config.setCli(false);
config.setPrintPass(false);
config.setPrintSecret(false);
IFuture<IExternalAccess> platfut = Starter.createPlatform(config);
IExternalAccess platform = platfut.get();
IComponentManagementService cms = SServiceProvider.searchService(platform, new ServiceQuery<>( IComponentManagementService.class, ServiceScope.PLATFORM)).get();
Expand Down
2 changes: 1 addition & 1 deletion docs/platform/platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ platformConfig.setDebugFutures(true); // enables stacktraces of exceptions

```java
platformConfig.setWelcome(false);
platformConfig.setPrintPass(false);
platformConfig.setPrintSecret(false);
```

**Set platform name:**
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/ac/09 Application Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ String[] defargs = new String[]
"-gui", "false",
"-welcome", "false",
"-cli", "false",
"-printpass", "false"
"-printsecret", "false"
};
String[] newargs = new String[defargs.length+args.length];
System.arraycopy(defargs, 0, newargs, 0, defargs.length);
Expand All @@ -89,7 +89,7 @@ This code first defines a string array with default settings as follows:
- **-gui false** disables the JCC
- **-welcome false** disables printing of the welcome message with the platform startup time
- **-cli false** disables the command line interface and thus also prevents printing of the command prompt (*Host\_123&gt;*)
- **-printpass false** disables printing of platform password
- **-printsecret false** disables printing of platform password

Afterwards a new array is created and filled with first the default arguments and then with the args supplied to the main method. Therefore, in case of conflicts the arguments supplied from the outside override the default settings. Make sure that in the *createPlatform(...)* method the *newargs* array is passed instead of the *args*. Otherwise the default settings will be ignored.

Expand Down
2 changes: 1 addition & 1 deletion platform/base/dist/files/win/manage_service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FOR /F "usebackq" %%i IN (`hostname`) DO SET HOSTNAME=%%i
cd ..
java -jar "%CD%\lib\jadex-platform-standalone-launch-3.0-SNAPSHOT.jar" ^
-ssltcptransport true ^
-printpass false ^
-printsecret false ^
-welcome false ^
-cli false ^
-logging true ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testParametersEquivalence() throws ClassNotFoundException, Instantia
// rootConfig.setSaveOnExit(false);
// rootConfig.setWelcome(false);
// config.setAutoShutdown(false);
// rootConfig.setPrintPass(false);
// rootConfig.setPrintSecret(false);
// long timeout = Starter.getDefaultTimeout(null);


Expand Down
4 changes: 2 additions & 2 deletions platform/base/src/test/java/jadex/platform/PlatformsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class PlatformsTest //extends TestCase
"-gui", "false",
"-saveonexit", "false",
"-welcome", "false",
"-printpass", "false",
"-printsecret", "false",
"-multicastawareness", "false", // avoid interference with other tests
"-broadcastawareness", "false", // avoid interference with other tests
"-catalogawareness", "false", // avoid interference outside world
Expand Down Expand Up @@ -103,7 +103,7 @@ public void testPlatforms()
args = (String[])SUtil.joinArrays(args, new String[]
{
"-componentfactory", PLATFORMS[(i-1)*2],
"-conf", PLATFORMS[(i-1)*2+1],
"-conf", PLATFORMS[(i-1)*2+1]
});
}

Expand Down
2 changes: 1 addition & 1 deletion platform/base/src/test/java/jadex/platform/TestAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected IFuture<IExternalAccess> createPlatform(String[] args)
// "-binarymessages", "false",
"-gui", "false",
"-cli", "false",
"-simulation", "false", "-printpass", "false"};
"-simulation", "false", "-printsecret", "false"};

if(args!=null && args.length>0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public void initPlatforms()
successIndicator = new Future<Boolean>();

platform1 = Starter.createPlatform(
new String[]{"-platformname", "testcases_*", "-saveonexit", "false", "-welcome", "false", "-gui", "false", "-awareness", "false", "-printpass", "false",
new String[]{"-platformname", "testcases_*", "-saveonexit", "false", "-welcome", "false", "-gui", "false", "-awareness", "false", "-printsecret", "false",
"-component", "jadex/launch/test/remotereference/LocalServiceProviderAgent.class"}).get(timeout);
timeout = Starter.getDefaultTimeout(platform1.getId());

// Find local service (as local provided service proxy).
ILocalService service1 = platform1.searchService( new ServiceQuery<>( ILocalService.class, ServiceScope.PLATFORM)).get(timeout);

platform2 = Starter.createPlatform(
new String[]{"-platformname", "testcases_*", "-saveonexit", "false", "-welcome", "false", "-gui", "false", "-awareness", "false", "-printpass", "false",
new String[]{"-platformname", "testcases_*", "-saveonexit", "false", "-welcome", "false", "-gui", "false", "-awareness", "false", "-printsecret", "false",
"-component", "jadex/launch/test/remotereference/SearchServiceProviderAgent.class"}).get(timeout);

// Connect platforms by creating proxy agents.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package jadex.base;

import jadex.bridge.ClassInfo;
import jadex.bridge.service.types.monitoring.IMonitoringService;

/**
Expand Down Expand Up @@ -366,8 +365,6 @@ public interface IExtendedPlatformConfiguration
*/
public void setStrictCom(boolean value);

// todo: refactor, in SecurityAgent other names are used

// /**
// * Flag if the platform should be protected with password.
// * @return True if protected.
Expand All @@ -380,18 +377,6 @@ public interface IExtendedPlatformConfiguration
// */
// public void setUsePass(boolean value);

// /**
// * Get the print password flag on startup.
// * @return Flag if password should be printed.
// */
// public boolean getPrintPass();
//
// /**
// * Set the print password flag on startup.
// * @param value Flag if password should be printed.
// */
// public void setPrintPass(boolean value);

// will be removed
// /**
// * Flag if trusted lan is activated. (Trusts internal ips)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ public interface IPlatformConfiguration //extends IStarterConfiguration, IRootCo
// // default:
// // emptyvalue
//
// /** Flag if the platform password should be printed to the console. **/
// public static final String PRINTPASS = "printpass"; // class:
// // boolean
// // default:
// // true
/** Flag if the platform password/secret(s) should be printed to the console. **/
public static final String PRINTSECRET = "printsecret"; // class:
// boolean
// default:
// true
//
// /** Flag if trusted lan should be used. **/
// public static final String TRUSTEDLAN = "trustedlan"; // class:
Expand Down Expand Up @@ -568,7 +568,8 @@ public interface IPlatformConfiguration //extends IStarterConfiguration, IRootCo
WELCOME, GUI, CLI, CLICONSOLE, SAVEONEXIT, LOGGING, SIMULATION, ASYNCEXECUTION,
// PERSIST,
UNIQUEIDS, THREADPOOLDEFER, CHAT, AWARENESS, BINARYMESSAGES, STRICTCOM,
// USEPASS, PRINTPASS, TRUSTEDLAN,
// USEPASS, TRUSTEDLAN,
PRINTSECRET,
LOCALTRANSPORT, TCPTRANSPORT,
RELAYTRANSPORT,
// RELAYSECURITY, RELAYAWAONLY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class ComponentTestSuite extends TestSuite implements IAbortableTestSuite
// "-cli", "false",
//// "-persist", "true", // for testing persistence
//// "-deftimeout", "-1",
// "-printpass", "false",
// "-printsecret", "false",
// "-superpeerclient", "false",
// "-wstransport", "false",
// "-relaytransport", "false",
Expand Down

0 comments on commit 289f25c

Please sign in to comment.