Skip to content

Commit

Permalink
Remove some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby committed Jun 26, 2019
1 parent da4d508 commit a11fa76
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 92 deletions.
5 changes: 0 additions & 5 deletions src/main/java/run/halo/app/service/impl/AdminServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,6 @@ private AuthToken buildAuthToken(@NonNull User user) {
return token;
}

/**
* Get spring logs.
*
* @return recently logs.
*/
@Override
public String getSpringLogs() {
File file = new File(haloProperties.getWorkDir(), LOGS_PATH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ private CategoryVO createTopLevelCategory() {
return topCategory;
}

/**
* Get category by slug name
*
* @param slugName slug name
* @return Category
*/
@Override
public Category getBySlugName(String slugName) {
return categoryRepository.getBySlugName(slugName).orElseThrow(() -> new NotFoundException("该分类已存在").setErrorData(slugName));
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/run/halo/app/service/impl/LinkServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ public LinkServiceImpl(LinkRepository linkRepository) {
this.linkRepository = linkRepository;
}

/**
* List link dtos.
*
* @param sort sort
* @return all links
*/
@Override
public List<LinkDTO> listDtos(Sort sort) {
Assert.notNull(sort, "Sort info must not be null");
Expand Down
24 changes: 0 additions & 24 deletions src/main/java/run/halo/app/service/impl/MailServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ public MailServiceImpl(FreeMarkerConfigurer freeMarker,

}

/**
* Sends a simple email
*
* @param to recipient
* @param subject subject
* @param content content
*/
@Override
public void sendMail(String to, String subject, String content) {
loadConfig();
Expand All @@ -63,14 +56,6 @@ public void sendMail(String to, String subject, String content) {
}
}

/**
* Sends template mail
*
* @param to recipient
* @param subject subject
* @param content content
* @param templateName template name
*/
@Override
public void sendTemplateMail(String to, String subject, Map<String, Object> content, String templateName) {
loadConfig();
Expand All @@ -93,15 +78,6 @@ public void sendTemplateMail(String to, String subject, Map<String, Object> cont
}
}

/**
* Sends mail with attachments
*
* @param to recipient
* @param subject subject
* @param content content
* @param templateName template name
* @param attachFilename attachment path
*/
@Override
public void sendAttachMail(String to, String subject, Map<String, Object> content, String templateName, String attachFilename) {
loadConfig();
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/run/halo/app/service/impl/MenuServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ public Menu createBy(MenuParam menuParam) {
return create(menuParam.convertTo());
}

/**
* Lists as menu tree.
*
* @param sort sort info must not be null
* @return a menu tree
*/
@Override
public List<MenuVO> listAsTree(Sort sort) {
Assert.notNull(sort, "Sort info must not be null");
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/run/halo/app/service/impl/PhotoServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,13 @@ public PhotoServiceImpl(PhotoRepository photoRepository) {
this.photoRepository = photoRepository;
}

/**
* List photo dtos.
*
* @param sort sort
* @return all photos
*/
@Override
public List<PhotoDTO> listDtos(Sort sort) {
Assert.notNull(sort, "Sort info must not be null");

return listAll(sort).stream().map(photo -> (PhotoDTO) new PhotoDTO().convertFrom(photo)).collect(Collectors.toList());
}

/**
* Lists photo team vos.
*
* @param sort must not be null
* @return a list of photo team vo
*/
@Override
public List<PhotoTeamVO> listTeamVos(Sort sort) {
Assert.notNull(sort, "Sort info must not be null");
Expand Down Expand Up @@ -88,13 +76,6 @@ public List<PhotoTeamVO> listTeamVos(Sort sort) {
return result;
}

/**
* List photos by team.
*
* @param team team
* @param sort sort
* @return list of photos
*/
@Override
public List<PhotoDTO> listByTeam(String team, Sort sort) {
List<Photo> photos = photoRepository.findByTeam(team, sort);
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/run/halo/app/service/impl/SheetServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ public Page<Sheet> pageBy(Pageable pageable) {
return listAll(pageable);
}

/**
* Gets sheet by post status and url.
*
* @param status post status must not be null
* @param url sheet url must not be blank
* @return sheet info
*/
@Override
public Sheet getBy(PostStatus status, String url) {
Sheet sheet = super.getBy(status, url);
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/run/halo/app/service/impl/TagServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public Tag create(Tag tag) {
return super.create(tag);
}

/**
* Get tag by slug name
*
* @param slugName slug name
* @return Tag
*/
@Override
public Tag getBySlugNameOfNonNull(String slugName) {
return tagRepository.getBySlugName(slugName).orElseThrow(() -> new NotFoundException("该标签已存在").setErrorData(slugName));
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/run/halo/app/service/impl/UserServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,11 @@ public User getByUsernameOfNonNull(String username) {
return getByUsername(username).orElseThrow(() -> new NotFoundException("The username dose not exist").setErrorData(username));
}

/**
* Gets user by email.
*
* @param email email must not be blank
* @return an optional user
*/
@Override
public Optional<User> getByEmail(String email) {
return userRepository.findByEmail(email);
}

/**
* Gets non null user by email.
*
* @param email email
* @return user info
* @throws NotFoundException throws when the username does not exist
*/
@Override
public User getByEmailOfNonNull(String email) {
return getByEmail(email).orElseThrow(() -> new NotFoundException("The email dose not exist").setErrorData(email));
Expand Down

0 comments on commit a11fa76

Please sign in to comment.