Changeset 8634 in josm for trunk/src/org
- Timestamp:
- 2015-08-01T23:17:42+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r8568 r8634 374 374 */ 375 375 public ImageryInfo(ImageryPreferenceEntry e) { 376 super(e.name, e.url, e.id); 376 377 CheckParameterUtil.ensureParameterNotNull(e.name, "name"); 377 378 CheckParameterUtil.ensureParameterNotNull(e.url, "url"); 378 name = e.name;379 id = e.id;380 url = e.url;381 379 description = e.description; 382 380 cookies = e.cookies; … … 422 420 */ 423 421 public ImageryInfo(ImageryInfo i) { 424 this.name = i.name; 425 this.id = i.id; 426 this.url = i.url; 422 super(i.name, i.url, i.id); 427 423 this.defaultEntry = i.defaultEntry; 428 424 this.cookies = i.cookies; … … 680 676 * Returns the entry name. 681 677 * @return The entry name 682 */683 @Override684 public String getName() {685 return this.name;686 }687 688 /**689 * Returns the entry name.690 * @return The entry name691 678 * @since 6968 692 679 */ 693 680 public String getOriginalName() { 694 681 return this.origName != null ? this.origName : this.name; 695 }696 697 /**698 * Sets the entry name.699 * @param name The entry name700 */701 public void setName(String name) {702 this.name = name;703 682 } 704 683 … … 720 699 } 721 700 722 /**723 * Gets the entry id.724 *725 * Id can be null. This gets the configured id as is. Due to a user error,726 * this may not be unique. Use {@link ImageryLayerInfo#getUniqueId} to ensure727 * a unique value.728 * @return the id729 */730 public String getId() {731 return this.id;732 }733 734 /**735 * Sets the entry id.736 * @param id the entry id737 */738 public void setId(String id) {739 this.id = id;740 }741 742 701 public void clearId() { 743 702 if (this.id != null) { … … 746 705 Main.pref.putCollection("imagery.layers.addedIds", newAddedIds); 747 706 } 748 this.id = null; 749 } 750 751 /** 752 * Returns the entry URL. 753 * @return The entry URL 754 */ 755 @Override 756 public String getUrl() { 757 return this.url; 758 } 759 760 /** 761 * Sets the entry URL. 762 * @param url The entry URL 763 */ 764 public void setUrl(String url) { 765 this.url = url; 707 setId(null); 766 708 } 767 709
Note:
See TracChangeset
for help on using the changeset viewer.