public boolean isValid ( ) { if ( name == null ) { return false ; } if ( type == null || ! type . isValid ( ) ) { return false ; } else if ( type == Type . Link ) { if ( url == null ) { return false ; } } // Check actions if ( this . getActions ( ) != null ) { for ( DesktopAction a : this . getActions ( ) ) { if ( ! a . isValid ( ) ) { return false ; } } } // Everything ok return true ; }
Checks if this link is valid to be saved