Rev 205 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package pt.estgp.estgweb.domain;
import java.io.Serializable;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: Jorge Machado
* Date: 7/Mai/2008
* Time: 20:21:15
* To change this template use File | Settings | File Templates.
*/
public class CourseUnitImpl
extends CourseUnit
implements ICanManage
{
public 1.5.0/docs/api/java/io/Serializable.html">Serializable getSerializable
()
{
return getId
();
}
public boolean isValid
()
{
return true; //To change body of implemented methods use File | Settings | File Templates.
}
public boolean isOwnedBy
(GenericUser u
)
{
return isOwnedBy
(u,
false);
}
public boolean isOwnedBy
(GenericUser u,
boolean transaction
)
{
return u
!=
null && u
instanceof TeacherImpl
&& ((TeacherImpl
)u
).
hasCourseUnit(getId
(),transaction
);
}
/**
* Not implemented can be variuous teachers
* @return null
* use isOwnedBy in this class
*/
public GenericUser getOwner
()
{
return null;
}
/**
* Not implemented
* @return
*/
public List
<String
> getOwnerRoles
()
{
return null;
}
/**
* Not implemented
* @return
*/
public 1.5.0/docs/api/java/lang/String.html">String getChoosedOwnerRole
()
{
return null;
}
public boolean isInternal
()
{
return true;
}
public CourseUnitBlogImpl getUnitBlog
()
{
if(getBlogs
()!=
null && getBlogs
().
size() > 0
)
return (CourseUnitBlogImpl
) getBlogs
().
iterator().
next();
return null;
}
}