Skip to content

Commit af0250f

Browse files
committed
Fixing Java doc issues
1 parent e11f15b commit af0250f

File tree

3 files changed

+36
-45
lines changed

3 files changed

+36
-45
lines changed

puml2confluence-core/src/main/java/com/kicksolutions/confluence/ConfluenceUtils.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ private String getAuthenticationString(String userName, String password) {
198198
new StringBuilder().append(userName).append(":").append(password).toString().getBytes());
199199
}
200200

201+
/**
202+
*
203+
* @param confluenceAuthentication
204+
* @return
205+
*/
201206
private HttpHeaders buildHttpHeaders(final String confluenceAuthentication) {
202207
final HttpHeaders headers = new HttpHeaders();
203208
headers.set("Authorization", String.format("Basic %s", confluenceAuthentication));

puml2confluence-core/src/main/java/com/kicksolutions/confluence/Puml2Confluence.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ private void init(String args[]) {
6363
* @param password
6464
* @param confluenceURL
6565
* @param spaceKey
66-
* @param htmlDocumentationURL
67-
* @param clientkitURL
66+
* @param title
6867
*/
6968
private void processSwagger2Confluence(String specFile, String parentPageID, String userName, String password,
7069
String confluenceURL, String spaceKey, String title) {

puml2confluence-core/src/main/java/com/kicksolutions/confluence/PumlConfluenceUploader.java

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,89 +16,76 @@
1616
*/
1717
public class PumlConfluenceUploader {
1818
private static final Logger LOGGER = Logger.getLogger(PumlConfluenceUploader.class.getName());
19-
19+
2020
public PumlConfluenceUploader() {
2121
super();
2222
}
23-
23+
2424
/**
25-
* Title:
26-
* |
27-
* |----- V1.0 Title
28-
* |
29-
* |----- V1.1 Title
30-
*
3125
*
3226
* @param specFile
3327
* @param parentPageID
3428
* @param userName
3529
* @param password
3630
* @param confluenceURL
3731
* @param spaceKey
38-
* @param htmlDocumentationURL
39-
* @param clientkitURL
40-
* @throws IOException
32+
* @param title
33+
* @throws IOException
4134
*/
4235
public void processPuml2Confluence(String specFile, String parentPageID, String userName, String password,
43-
String confluenceURL, String spaceKey,String title) throws IOException {
44-
36+
String confluenceURL, String spaceKey, String title) throws IOException {
37+
4538
File pumlFile = new File(specFile);
46-
47-
if(pumlFile.isFile()){
48-
39+
40+
if (pumlFile.isFile()) {
41+
4942
String pumlContents = FileUtils.readFileToString(pumlFile, "UTF-8");
50-
51-
if(StringUtils.isNotEmpty(pumlContents)
52-
&& pumlContents.contains("@startuml")){
53-
String swaggerPageContent = plantUMLMacroContent(pumlContents);
54-
43+
44+
if (StringUtils.isNotEmpty(pumlContents) && pumlContents.contains("@startuml")) {
45+
String swaggerPageContent = plantUMLMacroContent(pumlContents);
46+
5547
LOGGER.log(Level.INFO, "About to generate Page -->" + title);
56-
48+
5749
ConfluenceVo parentPageVo = createSwaggerPage(new ConfluenceVo(userName, password, confluenceURL, "",
5850
parentPageID, "", title, "0", swaggerPageContent, spaceKey, false));
59-
60-
LOGGER.log(Level.INFO, "Done.... by generating Pages "+ parentPageVo.getPageID());
61-
}
62-
else{
51+
52+
LOGGER.log(Level.INFO, "Done.... by generating Pages " + parentPageVo.getPageID());
53+
} else {
6354
throw new RuntimeException("Puml File provided in input is not valid");
6455
}
65-
}
66-
else{
56+
} else {
6757
throw new RuntimeException("Puml File provided in input is not valid");
6858
}
6959
}
70-
60+
7161
/**
7262
*
73-
* @param swaggerLoctaion
74-
* @param htmlDocumentationURL
75-
* @param clientkitURL
63+
* @param pumlContents
7664
* @return
7765
*/
7866
private String plantUMLMacroContent(String pumlContents) {
79-
8067
StringBuilder macroString = new StringBuilder();
81-
macroString.append("<ac:structured-macro ac:name=\"plantuml\" ac:schema-version=\"1\" ac:macro-id=\"29f50cc-3338-43cc-9f67-15a851eb3417\">")
82-
.append("<ac:parameter ac:name=\"atlassian-macro-output-type\">INLINE</ac:parameter>")
83-
.append("<ac:plain-text-body><![CDATA[")
84-
.append(addEscapeChars(pumlContents))
85-
.append("]]></ac:plain-text-body></ac:structured-macro>");
86-
68+
macroString
69+
.append("<ac:structured-macro ac:name=\"plantuml\" ac:schema-version=\"1\" ac:macro-id=\"29f50cc-3338-43cc-9f67-15a851eb3417\">")
70+
.append("<ac:parameter ac:name=\"atlassian-macro-output-type\">INLINE</ac:parameter>")
71+
.append("<ac:plain-text-body><![CDATA[").append(addEscapeChars(pumlContents))
72+
.append("]]></ac:plain-text-body></ac:structured-macro>");
73+
8774
return macroString.toString();
8875
}
89-
76+
9077
/**
9178
*
9279
* @param inputString
9380
* @return
9481
*/
95-
private String addEscapeChars(String inputString){
82+
private String addEscapeChars(String inputString) {
9683
return inputString;
9784
}
98-
85+
9986
/**
10087
*
101-
* @param title
88+
* @param confluenceVo
10289
* @return
10390
*/
10491
private ConfluenceVo createSwaggerPage(ConfluenceVo confluenceVo) {

0 commit comments

Comments
 (0)