Subversion Repositories SmartDukaan

Rev

Rev 4213 | Rev 4218 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4213 Rev 4214
Line 47... Line 47...
47
 *
47
 *
48
 * @author rajveer
48
 * @author rajveer
49
 *
49
 *
50
 */
50
 */
51
public class NewVUI {
51
public class NewVUI {
52
    private static final long CUTOFF_TIME_FOR_CREATION_TS = 1324030341995l;
-
 
53
    private static final String ICON_JPG = "icon.jpg";
52
    private static final String ICON_JPG = "icon.jpg";
54
    private static final String THUMBNAIL_JPG = "thumbnail.jpg";
53
    private static final String THUMBNAIL_JPG = "thumbnail.jpg";
55
    private static final String DEFAULT_JPG = "default.jpg";
54
    private static final String DEFAULT_JPG = "default.jpg";
56
    private static final String SPACE = " ";
55
    private static final String SPACE = " ";
57
    private static final String DOT = ".";
56
    private static final String DOT = ".";
Line 150... Line 149...
150
 
149
 
151
        // This flag basically determines whether 'default' labelled image has changed or not
150
        // This flag basically determines whether 'default' labelled image has changed or not
152
        // If defaultImageCreationTime is zero, i.e. either the entity is old so its image/media 
151
        // If defaultImageCreationTime is zero, i.e. either the entity is old so its image/media 
153
        // object does not have creationTime field set; or, the default image itself does'not exist!
152
        // object does not have creationTime field set; or, the default image itself does'not exist!
154
        // In either case, we shuld assume that default image does not exist
153
        // In either case, we shuld assume that default image does not exist
155
        boolean existsNewVersionedDefaultJPGFile = newVersionedDefaultJPGFile.exists() && defaultImageCreationTime > CUTOFF_TIME_FOR_CREATION_TS;
154
        boolean existsNewVersionedDefaultJPGFile = newVersionedDefaultJPGFile.exists();
156
 
155
 
157
        // If default images are not generated before, or default labelled images are absent, or the global
156
        // If default images are not generated before, or default labelled images are absent, or the global
158
        // image itself got changed, we need to copy these images.
157
        // image itself got changed, we need to copy these images.
159
        if (defaultImageCreationTime == 0 && (!existsNewVersionedDefaultJPGFile ||
158
        if (defaultImageCreationTime == 0 && (!existsNewVersionedDefaultJPGFile ||
160
                globalDefaultJPGFile.lastModified() > Long.parseLong(contentVersion)))
159
                globalDefaultJPGFile.lastModified() > Long.parseLong(contentVersion)))