public NeoProjectVersionRef( final ProjectRef ref, final String versionSpec ) throws InvalidVersionSpecificationException { this( ref.getGroupId(), ref.getArtifactId(), versionSpec ); }
@Override public Set<ProjectVersionRef> getProjectsMatching( final ViewParams params, final ProjectRef projectRef ) { return byGA.containsKey( projectRef.asProjectRef() ) ? byGA.get( projectRef.asProjectRef() ) : Collections.<ProjectVersionRef> emptySet(); }
public boolean exclude(ProjectRef ref){ return excludes.stream().anyMatch(ex -> ex.matches(ref)); }
public SimpleProjectVersionRef( final ProjectRef ref, final String versionSpec ) throws InvalidVersionSpecificationException { this( ref.getGroupId(), ref.getArtifactId(), versionSpec ); }
@Override public Set<ProjectVersionRef> getProjectsMatching( final ViewParams params, final ProjectRef projectRef ) { final IndexHits<Node> hits = graph.index() .forNodes( BY_GA_IDX ) .query( GA, projectRef.asProjectRef() .toString() ); return new HashSet<ProjectVersionRef>( convertToProjects( hits ) ); }
public <T extends ProjectRef> SimpleProjectRef( final ProjectRef ref ) { this.groupId = ref.getGroupId(); this.artifactId = ref.getArtifactId(); }
.get( GA, ref.asProjectRef() );
public SimpleProjectVersionRef( final ProjectRef ref, final VersionSpec versionSpec ) { this( ref.getGroupId(), ref.getArtifactId(), versionSpec, null ); }
public NeoProjectRef(final ProjectRef ref) { if ( ref instanceof NeoProjectRef) { NeoProjectRef npr = (NeoProjectRef) ref; container = npr.container; this.groupId = npr.groupId; this.artifactId = npr.artifactId; this.groupIdProperty = npr.groupIdProperty; this.artifactIdProperty = npr.artifactIdProperty; } else { groupId = ref.getGroupId(); artifactId = ref.getArtifactId(); } }
@Override public int compareTo( final ProjectRef o ) { int comp = groupId.compareTo( o.getGroupId() ); if ( comp == 0 ) { comp = artifactId.compareTo( o.getArtifactId() ); } return comp; }
public NeoVersionlessArtifactRef( final ProjectRef ref, final TypeAndClassifier tc ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = tc == null ? new NeoTypeAndClassifier() : tc; }
public SimpleVersionlessArtifactRef( final ProjectRef ref, final String type, final String classifier ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = new SimpleTypeAndClassifier( type, classifier ); }
public SimpleVersionlessArtifactRef( final ProjectRef ref, final TypeAndClassifier tc ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = tc == null ? new SimpleTypeAndClassifier() : tc; }
public NeoVersionlessArtifactRef( final ProjectRef ref, final String type, final String classifier ) { super( ref.getGroupId(), ref.getArtifactId() ); this.tc = new NeoTypeAndClassifier( type, classifier ); }
@Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( !(obj instanceof ProjectRef) ) { return false; } final ProjectRef other = (ProjectRef) obj; if ( !artifactId.equals( other.getArtifactId() ) ) { return false; } return groupId.equals( other.getGroupId() ); }
@Override public int compareTo( final ProjectRef o ) { int comp = getGroupId().compareTo( o.getGroupId() ); if ( comp == 0 ) { comp = getArtifactId().compareTo( o.getArtifactId() ); } return comp; }
@Override public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( !(obj instanceof ProjectRef) ) { return false; } final ProjectRef other = (ProjectRef) obj; if ( !getArtifactId().equals( other.getArtifactId() ) ) { return false; } return getGroupId().equals( other.getGroupId() ); }
@Override public boolean matches( final ProjectRef ref ) { if ( equals( ref ) ) { return true; } final String gidPattern = toWildcard( getGroupId() ); if ( !ref.getGroupId() .matches( gidPattern ) ) { return false; } final String aidPattern = toWildcard( getArtifactId() ); return ref.getArtifactId().matches( aidPattern ); }
@Override public boolean matches( final ProjectRef ref ) { if ( equals( ref ) ) { return true; } final String gidPattern = toWildcard( getGroupId() ); if ( !ref.getGroupId() .matches( gidPattern ) ) { return false; } final String aidPattern = toWildcard( getArtifactId() ); return ref.getArtifactId().matches( aidPattern ); }
private void addDependencyTo( final Model model, final VersionlessArtifactRef artifact, final VersionSpec spec, final ProjectRef ga, final DependencyManagement depMgmt, final PomRequest dto ) { final Dependency d = new Dependency(); d.setGroupId( ga.getGroupId() ); d.setArtifactId( ga.getArtifactId() ); d.setVersion( spec.renderStandard() ); if ( !"jar".equals( artifact.getType() ) ) { d.setType( artifact.getType() ); } if ( artifact.getClassifier() != null ) { d.setClassifier( artifact.getClassifier() ); } if ( dto.isGraphToManagedDeps() ) { depMgmt.addDependency( d ); } else { model.addDependency( d ); } }