com.alogient.cameleon.sdk.content.vo.menu.BreadcrumbsVo Maven / Gradle / Ivy
The newest version!
package com.alogient.cameleon.sdk.content.vo.menu;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* User: J?r?me Mirc Date: 7-Aug-2009 Time: 6:39:51 AM
*/
public class BreadcrumbsVo implements Serializable {
/**
* Serial version unique identifier
*/
private static final long serialVersionUID = 7393141152208154091L;
private Integer navId;
private Integer pageId;
private String pageName;
private String templateName;
private String navigateUrl;
private Boolean isVisible;
private Boolean isPageInMenu;
private Date lastModified;
private Set roles = new HashSet();
/**
* @return the navId
*/
public Integer getNavId() {
return navId;
}
/**
* @param navId the navId to set
*/
public void setNavId(Integer navId) {
this.navId = navId;
}
/**
* @return the pageId
*/
public Integer getPageId() {
return pageId;
}
/**
* @param pageId the pageId to set
*/
public void setPageId(Integer pageId) {
this.pageId = pageId;
}
/**
* @return the pageName
*/
public String getPageName() {
return pageName;
}
/**
* @param pageName the pageName to set
*/
public void setPageName(String pageName) {
this.pageName = pageName;
}
/**
* @return the template name
*/
public String getTemplateName() {
return templateName;
}
/**
* @param templateName the template to set
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
* @return the navigateUrl
*/
public String getNavigateUrl() {
return navigateUrl;
}
/**
* @param navigateUrl the navigateUrl to set
*/
public void setNavigateUrl(String navigateUrl) {
this.navigateUrl = navigateUrl;
}
/**
* @return the isVisible
*/
public Boolean getIsVisible() {
return isVisible;
}
/**
* @param isVisible the isVisible to set
*/
public void setIsVisible(Boolean isVisible) {
this.isVisible = isVisible;
}
/**
* @return the isPageInMenu
*/
public Boolean getIsPageInMenu() {
return isPageInMenu;
}
/**
* @param isPageInMenu the isPageInMenu to set
*/
public void setIsPageInMenu(Boolean isPageInMenu) {
this.isPageInMenu = isPageInMenu;
}
/**
* @return the last modified date
*/
public Date getLastModified() {
return lastModified;
}
/**
* @param lastModified last modified date
*/
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
/**
* Adds a role
*
* @param role The role to add
*/
public void addRole(String role) {
roles.add(role);
}
/**
* Checks if this entry is secured or not
*
* @return true if it is secured, false otherwise
*/
public boolean isSecured() {
return roles != null && roles.size() > 0;
}
/**
* Checks this entry is available
*
* @param authRoles The roles to check for
* @return true if it is available
*/
public boolean isAuthorized(Set authRoles) {
if (roles == null || roles.size() == 0) {
return true;
} else {
for (String role : authRoles) {
if (roles.contains(role)) {
return true;
}
}
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy