Skip to content

Commit

Permalink
update Copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
shalousun committed Dec 20, 2020
1 parent 98aefff commit 9d1edc8
Show file tree
Hide file tree
Showing 22 changed files with 292 additions and 248 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
88 changes: 44 additions & 44 deletions src/main/java/com/smartdoc/gradle/chain/FilterChain.java
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
*
* 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.
*/
package com.smartdoc.gradle.chain;

import com.smartdoc.gradle.model.CustomArtifact;
import java.util.Objects;

/**
* @author yu 2020/1/13.
*/
public interface FilterChain {

void setNext(FilterChain nextInChain);

boolean ignoreArtifactById(CustomArtifact artifact);

default boolean ignore(FilterChain nextInChain, CustomArtifact artifact) {
if (Objects.nonNull(nextInChain)) {
return nextInChain.ignoreArtifactById(artifact);
} else {
return false;
}
}
}
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2021 smart-doc
*
* 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.
*/
package com.smartdoc.gradle.chain;

import com.smartdoc.gradle.model.CustomArtifact;
import java.util.Objects;

/**
* @author yu 2020/1/13.
*/
public interface FilterChain {

void setNext(FilterChain nextInChain);

boolean ignoreArtifactById(CustomArtifact artifact);

default boolean ignore(FilterChain nextInChain, CustomArtifact artifact) {
if (Objects.nonNull(nextInChain)) {
return nextInChain.ignoreArtifactById(artifact);
} else {
return false;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
*
* 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.
*/
package com.smartdoc.gradle.chain;

import com.smartdoc.gradle.model.CustomArtifact;

/**
* @author yu 2020/1/13.
*/
public class SpringBootArtifactFilterChain implements FilterChain {

private FilterChain filterChain;

@Override
public void setNext(FilterChain nextInChain) {
this.filterChain = nextInChain;
}

@Override
public boolean ignoreArtifactById(CustomArtifact artifact) {
String artifactId = artifact.getArtifactId();
switch (artifactId) {
case "spring-boot":
case "spring-boot-starter-actuator":
case "spring-boot-starter":
case "spring-boot-starter-undertow":
case "spring-boot-starter-aop":
case "spring-boot-starter-json":
case "spring-boot-starter-web":
case "spring-boot-starter-logging":
case "spring-boot-starter-tomcat":
return true;
default:
return this.ignore(filterChain, artifact);
}
}
}
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2021 smart-doc
*
* 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.
*/
package com.smartdoc.gradle.chain;

import com.smartdoc.gradle.model.CustomArtifact;

/**
* @author yu 2020/1/13.
*/
public class SpringBootArtifactFilterChain implements FilterChain {

private FilterChain filterChain;

@Override
public void setNext(FilterChain nextInChain) {
this.filterChain = nextInChain;
}

@Override
public boolean ignoreArtifactById(CustomArtifact artifact) {
String artifactId = artifact.getArtifactId();
switch (artifactId) {
case "spring-boot":
case "spring-boot-starter-actuator":
case "spring-boot-starter":
case "spring-boot-starter-undertow":
case "spring-boot-starter-aop":
case "spring-boot-starter-json":
case "spring-boot-starter-web":
case "spring-boot-starter-logging":
case "spring-boot-starter-tomcat":
return true;
default:
return this.ignore(filterChain, artifact);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/smartdoc/gradle/constant/TaskConstants.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2021 smart-doc
*
* 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.
*/
package com.smartdoc.gradle.constant;

import com.smartdoc.gradle.task.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartdoc/gradle/task/DocBaseTask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/smartdoc/gradle/task/OpenApiTask.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2021 smart-doc
*
* 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.
*/
package com.smartdoc.gradle.task;

import com.power.doc.builder.OpenApiBuilder;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartdoc/gradle/task/PostmanTask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartdoc/gradle/task/RestAdocTask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartdoc/gradle/task/RestHtmlTask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartdoc/gradle/task/RpcAdocTask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartdoc/gradle/task/RpcHtmlTask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* smart-doc https://github.com/shalousun/smart-doc
*
* Copyright (C) 2018-2020 smart-doc
* Copyright (C) 2018-2021 smart-doc
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand Down
Loading

0 comments on commit 9d1edc8

Please sign in to comment.