private boolean validate ( CmsFavoriteEntry entry ) { try { String siteRoot = entry . getSiteRoot ( ) ; if ( ! m_okSiteRoots . contains ( siteRoot ) ) { m_rootCms . readResource ( siteRoot ) ; m_okSiteRoots . add ( siteRoot ) ; } CmsUUID project = entry . getProjectId ( ) ; if ( ! m_okProjects . contains ( project ) ) { m_cms . readProject ( project ) ; m_okProjects . add ( project ) ; } for ( CmsUUID id : Arrays . asList ( entry . getDetailId ( ) , entry . getStructureId ( ) ) ) { if ( ( id != null ) && ! m_okStructureIds . contains ( id ) ) { m_cms . readResource ( id , CmsResourceFilter . IGNORE_EXPIRATION . addRequireVisible ( ) ) ; m_okStructureIds . add ( id ) ; } } return true ; } catch ( Exception e ) { LOG . info ( "Favorite entry validation failed: " + e . getLocalizedMessage ( ) , e ) ; return false ; } }
Validates a favorite entry .