Skip to content
Permalink
Browse files
[JENKINS-23772] Use String for image width rather than ints
  • Loading branch information
kinow committed Sep 14, 2015
1 parent 9199c2a commit d3512f0bad0df74011a5b3f9df8de7ee3ae1ec63
Showing 8 changed files with 63 additions and 50 deletions.
@@ -8,17 +8,16 @@
*/
public abstract class AbstractArchivedImagesGallery extends ImageGallery {

/**
*
*/
private static final long serialVersionUID = -2264764254582937499L;

/**
/*
* serial UID.
*/
private static final long serialVersionUID = -1798633376573726389L;
/**
* If checked, marks the build as unstable if no archives were found.
*/
private final boolean markBuildAsUnstableIfNoArchivesFound;

public AbstractArchivedImagesGallery(String title, Integer imageWidth,
public AbstractArchivedImagesGallery(String title, String imageWidth,
Boolean markBuildAsUnstableIfNoArchivesFound) {
super(title, imageWidth);
this.markBuildAsUnstableIfNoArchivesFound = markBuildAsUnstableIfNoArchivesFound;
@@ -46,21 +46,20 @@
*/
public abstract class ImageGallery implements Serializable, Describable<ImageGallery>, Comparable<ImageGallery> {

/**
*
*/
private static final long serialVersionUID = 7290410166903500439L;

/**
/*
* serial UID.
*/
private static final long serialVersionUID = -1568321312897565728L;
/**
* Title.
*/
private final String title;
/**
* Images width.
*/
private final Integer imageWidth;
private final String imageWidth;

public ImageGallery(String title, Integer imageWidth) {
public ImageGallery(String title, String imageWidth) {
this.title = title;
this.imageWidth = imageWidth;
}
@@ -75,7 +74,7 @@ public String getTitle() {
/**
* @return the imageWidth
*/
public Integer getImageWidth() {
public String getImageWidth() {
return imageWidth;
}

@@ -45,12 +45,13 @@
*/
public abstract class ComparativeArchivedImagesGallery extends AbstractArchivedImagesGallery {

/**
*
*/
private static final long serialVersionUID = -1507776620685441240L;

/**
/*
* serial UID.
*/
private static final long serialVersionUID = 8022990812020649261L;

/**
* Title.
*/
private final String title;
@@ -63,7 +64,7 @@ public abstract class ComparativeArchivedImagesGallery extends AbstractArchivedI
/**
* Images width.
*/
private final Integer imageInnerWidth;
private final String imageInnerWidth;

/**
* Constructor called from jelly.
@@ -74,7 +75,7 @@ public abstract class ComparativeArchivedImagesGallery extends AbstractArchivedI
* @param markBuildAsUnstableIfNoArchivesFound
*/
@DataBoundConstructor
public ComparativeArchivedImagesGallery(String title, String baseRootFolder, Integer imageWidth, Integer imageInnerWidth,
public ComparativeArchivedImagesGallery(String title, String baseRootFolder, String imageWidth, String imageInnerWidth,
boolean markBuildAsUnstableIfNoArchivesFound) {
super(title, imageWidth, markBuildAsUnstableIfNoArchivesFound);
this.title = title;
@@ -99,7 +100,7 @@ public String getBaseRootFolder() {
/**
* @return the imageInnerWidth
*/
public Integer getImageInnerWidth() {
public String getImageInnerWidth() {
return imageInnerWidth;
}

@@ -34,10 +34,13 @@
* @since 1.0
*/
public class ComparativeImagesGalleryBuildAction implements Action, Serializable {

private static final long serialVersionUID = -5987342090954152424L;

/**
/*
* serial UID.
*/
private static final long serialVersionUID = -4788699009385594824L;

/**
* The title.
*/
private final String title;
@@ -48,12 +51,12 @@ public class ComparativeImagesGalleryBuildAction implements Action, Serializable
/**
* The image width.
*/
private final Integer imageWidth;
private final String imageWidth;

/**
* The inner image width
*/
private Integer imageInnerWidth;
private String imageInnerWidth;

/**
* Constructor with args.
@@ -63,14 +66,14 @@ public class ComparativeImagesGalleryBuildAction implements Action, Serializable
* @param images
* @param imageWidth
*/
public ComparativeImagesGalleryBuildAction(String title, FilePairTree tree, Integer imageWidth, Integer imageInnerWidth) {
public ComparativeImagesGalleryBuildAction(String title, FilePairTree tree, String imageWidth, String imageInnerWidth) {
this.title = title;
this.tree = tree;
this.imageInnerWidth = imageInnerWidth;
if(imageWidth != null) {
this.imageWidth = imageWidth;
} else {
this.imageWidth = new Integer(0);
this.imageWidth = "0";
}
}

@@ -112,14 +115,14 @@ public String getUrlName() {
/**
* @return the imageWidth
*/
public Integer getImageWidth() {
public String getImageWidth() {
return imageWidth;
}

/**
* @return the imageInnerWidth
*/
public Integer getImageInnerWidth() {
public String getImageInnerWidth() {
return imageInnerWidth;
}
}
@@ -45,9 +45,12 @@
*/
public class InFolderComparativeArchivedImagesGallery extends ComparativeArchivedImagesGallery {

private static final long serialVersionUID = -1981209232197421074L;
/*
* serial UID.
*/
private static final long serialVersionUID = 4490034271037852059L;

/**
/**
* Constructor called from jelly.
*
* @param title Title of the image gallery
@@ -57,7 +60,7 @@ public class InFolderComparativeArchivedImagesGallery extends ComparativeArchive
* @param markBuildAsUnstableIfNoArchivesFound Mark the build as unstable if no archives found
*/
@DataBoundConstructor
public InFolderComparativeArchivedImagesGallery(String title, String baseRootFolder, Integer imageWidth, Integer imageInnerWidth,
public InFolderComparativeArchivedImagesGallery(String title, String baseRootFolder, String imageWidth, String imageInnerWidth,
boolean markBuildAsUnstableIfNoArchivesFound) {
super(title, baseRootFolder, imageWidth, imageInnerWidth, markBuildAsUnstableIfNoArchivesFound);
}
@@ -47,9 +47,12 @@
*/
public class MultipleFolderComparativeArchivedImagesGallery extends ComparativeArchivedImagesGallery {

private static Logger LOGGER = Logger.getLogger(MultipleFolderComparativeArchivedImagesGallery.class.getName());

private static final long serialVersionUID = -1981209232197421074L;
/*
* serial UID.
*/
private static final long serialVersionUID = -4861153536599621098L;

private static Logger LOGGER = Logger.getLogger(MultipleFolderComparativeArchivedImagesGallery.class.getName());

/**
* Constructor called from jelly.
@@ -58,7 +61,7 @@ public class MultipleFolderComparativeArchivedImagesGallery extends ComparativeA
* @param markBuildAsUnstableIfNoArchivesFound
*/
@DataBoundConstructor
public MultipleFolderComparativeArchivedImagesGallery(String title, String baseRootFolder, Integer imageWidth, Integer imageInnerWidth,
public MultipleFolderComparativeArchivedImagesGallery(String title, String baseRootFolder, String imageWidth, String imageInnerWidth,
boolean markBuildAsUnstableIfNoArchivesFound) {
super(title, baseRootFolder, imageWidth, imageInnerWidth, markBuildAsUnstableIfNoArchivesFound);
}
@@ -50,9 +50,12 @@
*/
public class ArchivedImagesGallery extends AbstractArchivedImagesGallery {

private static final long serialVersionUID = -9160740389012923833L;
/*
* serial UID.
*/
private static final long serialVersionUID = -4795337742069989021L;

private static Logger LOGGER = Logger.getLogger("com.tupilabs.image_gallery");
private static Logger LOGGER = Logger.getLogger("com.tupilabs.image_gallery");

/**
* Include pattern.
@@ -66,7 +69,7 @@ public class ArchivedImagesGallery extends AbstractArchivedImagesGallery {
* @param markBuildAsUnstableIfNoArchivesFound
*/
@DataBoundConstructor
public ArchivedImagesGallery(String title, String includes, Integer imageWidth,
public ArchivedImagesGallery(String title, String includes, String imageWidth,
Boolean markBuildAsUnstableIfNoArchivesFound) {
super(title, imageWidth, markBuildAsUnstableIfNoArchivesFound);
this.includes = includes;
@@ -35,10 +35,12 @@
* @since 0.1
*/
public class ArchivedImagesGalleryBuildAction implements Action, Serializable {

private static final long serialVersionUID = -5987342090954152424L;

/**
/*
* serial UID.
*/
private static final long serialVersionUID = 8754812024509410103L;
/**
* The title.
*/
private final String title;
@@ -49,21 +51,21 @@ public class ArchivedImagesGalleryBuildAction implements Action, Serializable {
/**
* The image width.
*/
private final int imageWidth;
private final String imageWidth;

/**
* Constructor with args.
* @param title
* @param images
* @param imageWidth
*/
public ArchivedImagesGalleryBuildAction(String title, String[] images, Integer imageWidth) {
public ArchivedImagesGalleryBuildAction(String title, String[] images, String imageWidth) {
this.title = title;
this.images = images;
if(imageWidth != null) {
this.imageWidth = imageWidth;
} else {
this.imageWidth = 0;
this.imageWidth = "0";
}
}

@@ -105,7 +107,7 @@ public String getUrlName() {
/**
* @return the imageWidth
*/
public int getImageWidth() {
public String getImageWidth() {
return imageWidth;
}

0 comments on commit d3512f0

Please sign in to comment.