com.alogient.cameleon.sdk.content.model.ResourceModel Maven / Gradle / Ivy
The newest version!
package com.alogient.cameleon.sdk.content.model;
import com.alogient.cameleon.sdk.content.util.ContentUtils;
import com.alogient.cameleon.sdk.content.util.nav.ModeType;
import java.io.Serializable;
/**
* Model representing a resource
*
* @author alord
*/
public class ResourceModel implements Serializable {
/**
* The resource fileName
*/
private String fileName;
/**
* The resource nav id
*/
private Integer navId;
/**
* The resource part id
*/
private Integer partId;
/**
* The resource culture code
*/
private String cultureCode;
/**
* The mode type
*/
private ModeType modeType;
/**
* Full ctor
* @param fileName the resource file name
* @param navId the resource nav id
* @param partId the resource part id
* @param cultureCode the culture code of this resource
* @param modeType the mode type
*/
public ResourceModel(String fileName, Integer navId, Integer partId, String cultureCode, ModeType modeType) {
this.fileName = fileName;
this.navId = navId;
this.partId = partId;
this.cultureCode = cultureCode;
this.modeType = modeType;
}
/**
* @return the resource file name
*/
public String getFileName() {
return fileName;
}
/**
* @return the resource nav id
*/
public Integer getNavId() {
return navId;
}
/**
* @return the resource part id
*/
public Integer getPartId() {
return partId;
}
/**
* @return the culture code
*/
public String getCultureCode() {
return cultureCode;
}
/**
* @return the mode type
*/
public ModeType getModeType() {
return modeType;
}
/**
* @return the URL of this resource
*/
public String getUrl() {
return ContentUtils.getRemoteDocumentURL(fileName, getNavId(), getPartId(), getCultureCode(), getModeType());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy