import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.apache.commons.lang.builder.ToStringBuilder;
-import org.sonar.api.component.Component;
import org.sonar.api.resources.Scopes;
import static com.google.common.base.Preconditions.checkArgument;
import static org.sonar.db.component.ComponentValidator.checkComponentName;
import static org.sonar.db.component.DbTagsReader.readDbTags;
-public class ComponentDto implements Component {
+public class ComponentDto {
public static final String UUID_PATH_SEPARATOR = ".";
public static final String UUID_PATH_OF_ROOT = UUID_PATH_SEPARATOR;
return UUID_PATH_SPLITTER.splitToList(uuidPath);
}
- @Override
public String key() {
return kee;
}
return this;
}
- @Override
public String qualifier() {
return qualifier;
}
}
@CheckForNull
- @Override
public String path() {
return path;
}
return this;
}
- @Override
public String name() {
return name;
}
return this;
}
- @Override
public String longName() {
return longName;
}
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-import org.sonar.api.component.Component;
import org.sonar.api.notifications.Notification;
import org.sonar.core.issue.DefaultIssue;
import org.sonar.core.issue.FieldDiffs;
+import org.sonar.db.component.ComponentDto;
public class IssueChangeNotification extends Notification {
return this;
}
- public IssueChangeNotification setProject(Component project) {
+ public IssueChangeNotification setProject(ComponentDto project) {
setFieldValue("projectName", project.longName());
setFieldValue("projectKey", project.key());
return this;
return this;
}
- public IssueChangeNotification setComponent(Component component) {
+ public IssueChangeNotification setComponent(ComponentDto component) {
setFieldValue("componentName", component.longName());
return this;
}