Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Commit 18bb3bb

Browse files
author
Christian Zirkelbach
committed
updated travisCI towards javadoc automation
1 parent 66163f0 commit 18bb3bb

File tree

14 files changed

+77
-51
lines changed

14 files changed

+77
-51
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ jobs:
3939
- stage: documentation
4040
name: "Publish documentation"
4141
if: (branch = master)
42-
script: .travis/javadoc-push.sh
42+
script: ./gradlew alljavadoc && chmod +x .travis/javadoc-push.sh && .travis/javadoc-push.sh
4343

4444
before_script:
4545
- chmod +x .travis/docker_push.sh
46-
- chmod +x .travis/javadoc-push.sh
4746

4847
branches:
4948
only:

authentication/src/main/java/net/explorviz/security/server/resources/TokenResource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public User issueToken(final UserCredentials credentials) {
6565
* This method refreshes a Json Web Token (JWT). The HTTP POST body must not contain data and the
6666
* to-be refreshed token inside of the ' Authorization: Bearer' header.
6767
*
68+
* @param context - the context of the container
6869
* @return Refreshed JWT with an incremented refresh counter.
6970
*/
7071
@POST

authentication/src/main/java/net/explorviz/security/server/resources/UserResource.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,11 @@ public List<User> createAll(final List<User> users) {
145145

146146
/**
147147
* Updates the details of a already existing user. The values of the targeted user will be
148-
* overridden by the values of {@linkplain updatedUser}. All attributes that are {@code null} are
149-
* ignored.
148+
* overridden by the values of an updatedUser. All attributes that are {@code null} are ignored.
150149
*
151-
* @param id the id of the user to update
152-
* @param updatedUser a {@link User} object containing the changes. All fields set to {@code null}
153-
* will be ignored when updating.
150+
* @param id - the id of the user to update
151+
* @param updatedUser - a {@link User} object containing the changes. All fields set to
152+
* {@code null} will be ignored when updating.
154153
* @return the updated user
155154
*/
156155
@PATCH
@@ -230,7 +229,7 @@ public User updateUser(@PathParam("id") final Long id, final User updatedUser) {
230229
/**
231230
* Retrieves all users that have a specific role.
232231
*
233-
* @param role the role to be searched for
232+
* @param role - the role to be searched for
234233
* @return a list of all users with the given role
235234
*/
236235
@GET
@@ -256,7 +255,7 @@ public List<User> usersByRole(@QueryParam("role") final String role) {
256255
/**
257256
* Retrieves a single user identified by its id.
258257
*
259-
* @param id the id of the user to return
258+
* @param id - the id of the user to return
260259
* @return the {@link User} object with the given id
261260
*/
262261
@GET
@@ -287,7 +286,8 @@ public User userById(@PathParam("id") final Long id) {
287286
/**
288287
* Removes the user with the given id.
289288
*
290-
* @param id the id of the user to delete
289+
* @param id - the id of the user to delete
290+
* @return a response on success
291291
*/
292292
@DELETE
293293
@Path("{id}")

authentication/src/main/java/net/explorviz/security/services/MongoCrudService.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,23 @@ public interface MongoCrudService<T> {
1414
/**
1515
* Persists a new entity object.
1616
*
17-
* @param entity the entity to persist
17+
* @param entity - the entity to persist
18+
* @return optional - found entity
1819
*/
1920
Optional<T> saveNewEntity(final T entity);
2021

2122

2223
/**
2324
* Updates values of an existing entity.
2425
*
25-
* @param entity the entity to update
26+
* @param entity - the entity to update
2627
*/
2728
void updateEntity(final T entity);
2829

2930
/**
3031
* Retrieves an entity by its id.
3132
*
32-
* @param id the id of the entity to find
33+
* @param id - the id of the entity to find
3334
* @return optional the entity with the given id
3435
*/
3536
Optional<T> getEntityById(final Long id);
@@ -46,16 +47,16 @@ public interface MongoCrudService<T> {
4647
/**
4748
* Deletes an entity.
4849
*
49-
* @param id the id of the entity to delete
50+
* @param id - the id of the entity to delete
5051
*/
5152
void deleteEntityById(final Long id);
5253

5354

5455
/**
5556
* Retrieves an entity by a field and its value.
5657
*
57-
* @param field name of the entity
58-
* @param value for the field
58+
* @param field - name of the entity
59+
* @param value - value for the field
5960
* @return optional - found entity
6061
*/
6162
Optional<T> findEntityByFieldValue(String field, Object value);

authentication/src/main/java/net/explorviz/security/services/UserMongoCrudService.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.explorviz.security.services;
22

33
import com.mongodb.MongoException;
4-
import java.util.ArrayList;
54
import java.util.List;
65
import java.util.Optional;
76
import java.util.stream.Collectors;
@@ -36,10 +35,10 @@ public class UserMongoCrudService implements MongoCrudService<User> {
3635
private final Datastore datastore;
3736

3837

39-
4038
/**
41-
* Creates a new {@code UserCrudMongoDb}.
39+
* Creates a new UserMongoDB
4240
*
41+
* @param datastore - the datastore instance
4342
*/
4443
@Inject
4544
public UserMongoCrudService(final Datastore datastore) {
@@ -65,12 +64,16 @@ public List<User> getAll() {
6564
}
6665

6766
@Override
67+
/**
68+
* Persists an user entity
69+
*
70+
* @param user - a user entity
71+
* @return an Optional, which contains a User or is empty
72+
*/
6873
public Optional<User> saveNewEntity(final User user) throws MongoException {
6974
// Generate an id
7075
user.setId(this.idGen.next());
7176

72-
73-
7477
this.datastore.save(user);
7578

7679
if (LOGGER.isInfoEnabled()) {
@@ -124,8 +127,6 @@ public List<User> getUsersByRole(final String roleName) throws MongoException {
124127

125128
final Role role = this.datastore.createQuery(Role.class).filter("descriptor", roleName).get();
126129

127-
final List<User> listToBeReturned = new ArrayList<>();
128-
129130
List<User> userList = this.datastore.createQuery(User.class).asList();
130131

131132
userList =

build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@ allprojects {
22
apply plugin: 'java-library'
33
}
44

5+
6+
// Aggregate Javadoc in multiproject Gradle build
7+
def exportedProjects= [
8+
':shared',
9+
':landscape',
10+
':kiekeradapter',
11+
':authentication',
12+
':analysis',
13+
':discovery'
14+
]
15+
16+
task alljavadoc(type: Javadoc) {
17+
source exportedProjects.collect { project(it).sourceSets.main.allJava }
18+
classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
19+
destinationDir = file("${buildDir}/docs/javadoc")
20+
}
21+
522
subprojects {
623

724
// BEGIN QA Tooling for subprojects

landscape/src/main/java/net/explorviz/landscape/model/application/Trace.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import net.explorviz.landscape.model.helper.BaseEntity;
88

99
/**
10-
* Model representing a trace containing severals {@link TraceStep} between two {@link Clazz}.
10+
* Model representing a trace containing severals {@link TraceStep} between two
11+
* {@link net.explorviz.landscape.model.application.Clazz}.
1112
*/
1213
@SuppressWarnings("serial")
1314
@Type("trace")
@@ -32,13 +33,12 @@ public Trace(final String traceId) {
3233
/**
3334
* Adds a new call within a trace as a {@link TraceStep}
3435
*
35-
* @param traceId
36-
* @param tracePosition
37-
* @param requests
38-
* @param averageResponseTime
39-
* @param currentTraceDuration
40-
* @param clazzCommunication
41-
* @return TraceStep
36+
* @param tracePosition - position within the trace
37+
* @param requests - total number of requests
38+
* @param averageResponseTime - average response time of the trace
39+
* @param currentTraceDuration - current duration of the trace
40+
* @param clazzCommunication - starting clazzCommunication
41+
* @return a new TraceStep
4242
*/
4343
public TraceStep addTraceStep(final int tracePosition, final int requests,
4444
final float averageResponseTime, final float currentTraceDuration,

landscape/src/main/java/net/explorviz/landscape/model/application/TraceStep.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/**
88
* Model representing detailed runtime information for {@link ClazzCommunication} between two
9-
* {@link Clazz} in a specific {@link Trace}.
9+
* {@link net.explorviz.landscape.model.application.Clazz} in a specific {@link Trace}.
1010
*/
1111
@SuppressWarnings("serial")
1212
@Type("tracestep")
@@ -31,11 +31,14 @@ public class TraceStep extends BaseEntity {
3131
/**
3232
* Creates a new TraceStep and assigns related communication information
3333
*
34-
* @param clazzCommunication
35-
* @param currentTraceDuration
36-
* @param averageResponseTime
37-
* @param requests
38-
* @param tracePosition
34+
* @param parentTrace - related Trace
35+
* @param clazzCommunication - starting clazzCommunication
36+
* @param tracePosition - position within the trace
37+
* @param requests - total number of requests
38+
* @param averageResponseTime - average response time of the trace
39+
* @param currentTraceDuration - current duration of the trace
40+
*
41+
*
3942
*/
4043
public TraceStep(final Trace parentTrace, final ClazzCommunication clazzCommunication,
4144
final int tracePosition, final int requests, final float averageResponseTime,

landscape/src/main/java/net/explorviz/landscape/model/store/helper/TimestampHelper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private TimestampHelper() {
1616
}
1717

1818
/**
19-
* Retrieves timestamps AFTER a passed {@link Timestamp}.
19+
* Retrieves timestamps AFTER a passed {@link net.explorviz.landscape.model.store.Timestamp}.
2020
*
2121
* @param allTimestamps - All timestamps within the system
2222
* @param afterTimestamp - Define the timestamp which sets the limit
@@ -58,8 +58,9 @@ public static List<Timestamp> filterTimestampsAfterTimestamp(final List<Timestam
5858
* Retrieves the a passed {@link Timestamp} within a list of timestamps if found, otherwise the
5959
* following timestamp.
6060
*
61-
* @param timestamps
62-
* @param searchedTimestamp
61+
* @param timestamps - a list of timestamps
62+
* @param searchedTimestamp - a specific timestamp to be found
63+
* @return a retrieved timestamp
6364
*/
6465
public static Timestamp getTimestampPosition(final List<Timestamp> timestamps,
6566
final long searchedTimestamp) {

landscape/src/main/java/net/explorviz/landscape/repository/RepositoryStorage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private RepositoryStorage() {
7070
/**
7171
* Registers all classes for serialization
7272
*
73-
* @return
73+
* @return an FST configuration
7474
*/
7575
public static FSTConfiguration createFSTConfiguration() {
7676
final FSTConfiguration result = FSTConfiguration.createDefaultConfiguration();

0 commit comments

Comments
 (0)