-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
446 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
src/main/java/com/github/davidepastore/liferay/model/DDMDocumentAndMedia.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package com.github.davidepastore.liferay.model; | ||
|
||
import com.liferay.portal.kernel.util.Validator; | ||
|
||
/** | ||
* @author Christian Palombella | ||
* | ||
*/ | ||
public class DDMDocumentAndMedia { | ||
|
||
private String classPK; | ||
private String groupId; | ||
private String title; | ||
private String type; | ||
private String uuid; | ||
|
||
public DDMDocumentAndMedia() { | ||
super(); | ||
} | ||
|
||
/** | ||
* @param classPK | ||
* @param groupId | ||
* @param title | ||
* @param type | ||
* @param uuid | ||
*/ | ||
public DDMDocumentAndMedia(String classPK, String groupId, String title, String type, String uuid) { | ||
super(); | ||
this.classPK = classPK; | ||
this.groupId = groupId; | ||
this.title = title; | ||
this.type = type; | ||
this.uuid = uuid; | ||
} | ||
|
||
public String getClassPK() { | ||
return classPK; | ||
} | ||
|
||
public void setClassPK(String classPK) { | ||
this.classPK = classPK; | ||
} | ||
|
||
public String getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public void setGroupId(String groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getUuid() { | ||
return uuid; | ||
} | ||
|
||
public void setUuid(String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
public String getUrl() { | ||
if(Validator.isNotNull(this.groupId) && Validator.isNotNull(this.classPK) && Validator.isNotNull(this.title) && Validator.isNotNull(this.uuid)) | ||
return "/documents/" + this.groupId + "/" + this.classPK + "/" + this.title + "/" + this.uuid; | ||
else return ""; | ||
} | ||
|
||
/** | ||
* Check if the object are equals. | ||
*/ | ||
@Override | ||
public boolean equals(Object obj) { | ||
return obj instanceof DDMDocumentAndMedia | ||
&& groupId.equals(((DDMDocumentAndMedia) obj) | ||
.getGroupId()) | ||
&& classPK.equals(((DDMDocumentAndMedia) obj) | ||
.getClassPK()) | ||
&& uuid.equals(((DDMDocumentAndMedia) obj) | ||
.getUuid()) | ||
&& type.equals(((DDMDocumentAndMedia) obj) | ||
.getType()) | ||
&& title.equals(((DDMDocumentAndMedia) obj) | ||
.getTitle()); | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/com/github/davidepastore/liferay/model/DDMGeolocation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.github.davidepastore.liferay.model; | ||
|
||
/** | ||
* | ||
* @author Christian Palombella | ||
* | ||
*/ | ||
public class DDMGeolocation { | ||
|
||
private Double latitude; | ||
private Double longitude; | ||
|
||
public DDMGeolocation() { | ||
super(); | ||
} | ||
|
||
public DDMGeolocation(Double latitude, Double longitude) { | ||
super(); | ||
this.latitude = latitude; | ||
this.longitude = longitude; | ||
} | ||
|
||
public Double getLatitude() { | ||
return latitude; | ||
} | ||
|
||
public void setLatitude(Double latitude) { | ||
this.latitude = latitude; | ||
} | ||
|
||
public Double getLongitude() { | ||
return longitude; | ||
} | ||
|
||
public void setLongitude(Double longitude) { | ||
this.longitude = longitude; | ||
} | ||
|
||
} |
Oops, something went wrong.