rest api for label and hibernate mapping
This commit is contained in:
committed by
Ezequiel Bergamaschi
parent
504e3e18e6
commit
1b480b566a
@@ -0,0 +1,12 @@
|
||||
package com.wisemapping.service;
|
||||
|
||||
import com.wisemapping.exceptions.WiseMappingException;
|
||||
import com.wisemapping.model.Label;
|
||||
import com.wisemapping.model.User;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface LabelService {
|
||||
|
||||
void addLabel(@NotNull final Label label, @NotNull final User user) throws WiseMappingException;
|
||||
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package com.wisemapping.service;
|
||||
|
||||
import com.wisemapping.dao.LabelManager;
|
||||
import com.wisemapping.exceptions.WiseMappingException;
|
||||
import com.wisemapping.model.Label;
|
||||
import com.wisemapping.model.User;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class LabelServiceImpl implements LabelService {
|
||||
|
||||
private LabelManager labelManager;
|
||||
|
||||
public void setLabelManager(LabelManager labelManager) {
|
||||
this.labelManager = labelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLabel(@NotNull final Label label, @NotNull final User user) throws WiseMappingException {
|
||||
|
||||
label.setCreator(user);
|
||||
labelManager.addLabel(label);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user