Rev 1306 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package pt.estgp.estgweb.domain;
import java.io.Serializable;
import java.util.List;
/**
* @author Jorge Machado
* @date 21/Abr/2008
* @time 14:38:08
* @see pt.estgp.estgweb.domain
*/
public class BlogPostImpl
extends BlogPost
implements IOwned, IValid, IInternal, ICanLoad
{
public 1.5.0/docs/api/java/io/Serializable.html">Serializable getSerializable
()
{
return getId
();
}
/**
* Not implemeted
* @return null
*/
public List
<String
> getOwnerRoles
()
{
return null;
}
/**
* Not implemented
*/
public 1.5.0/docs/api/java/lang/String.html">String getChoosedOwnerRole
()
{
return null;
}
public boolean isValid
()
{
return isStatus
();
}
public boolean isInternal
()
{
return getBlog
().
isInternal();
}
public boolean canLoad
(GenericUserImpl u
)
{
return isStatus
() || isOwnedBy
(u
) ||
(u
!=
null && u.
isSuperuserOrAdmin());
}
public boolean canLoadInOpenTransaction
(GenericUserImpl u
)
{
return canLoad
(u
);
}
public boolean isOwnedBy
(GenericUser u
)
{
return isOwnedBy
(u,
false);
}
public boolean isOwnedBy
(GenericUser u,
boolean transaction
)
{
return super.
isOwnedBy(u,transaction
) || getBlog
().
isOwnedBy(u,transaction
);
}
}