/impl/conf/language/MessageResourcesAnnouncements.properties |
---|
37,9 → 37,15 |
announcements.loading=carregando anúncio... |
announcement.style.img.left=Imagem à esquerda |
announcement.style.img.right=Imagem à direita |
announcement.style.img.top=Imagem em cima |
announcement.style.img.left=Imagem à esquerda do texto no meio |
announcement.style.img.left.top=Imagem à esquerda do texto em cima |
announcement.style.img.left.bottom=Imagem à esquerda do texto em baixo |
announcement.style.img.right=Imagem à direita do texto no meio |
announcement.style.img.right.top=Imagem à direita do texto em cima |
announcement.style.img.right.bottom=Imagem à direita do texto em baixo |
announcement.style.img.top=Imagem no topo do texto ao centro |
announcement.style.img.top.left=Imagem no topo do texto à esquerda |
announcement.style.img.top.right=Imagem no topo do texto à direita |
announcement.style.img.embedded.left=Imagem embebida à esquerda |
announcement.style.img.embedded.right=Imagem embebida à direita |
/impl/conf/language/MessageResources.properties |
---|
93,6 → 93,7 |
at=a |
loading=Carregando |
#Menus |
nav.place.root=raiz |
site.title=Escola Superior de Tecnologia e Gestão |
administration=Administração |
superuser=Super Utilizador |
250,6 → 251,8 |
profile.edit=Aqui pode editar o seu perfil |
profile.email.change=*Para alterar o seu email dirija-se aos serviços centrais |
profile.search.user=Procurar Utilizador |
profile.search.user.not.find=Não foram encontrados registo com esse valor |
profile.search.user.find=Foram encontrados {0} registo com esse valor |
#Cursos |
course.aa=Acessoria e Administração |
/impl/conf/language/MessageResourcesBlog.properties |
---|
13,4 → 13,5 |
blog.status=Válido |
submit.blog=Criar um Blog |
blog.owner=Criado por |
blog.internal=Dominio |
/impl/conf/WEB-INF/struts/struts-blog.xml |
---|
42,5 → 42,13 |
<forward name="success" path="page.load.blog"/> |
<forward name="submit" path="page.submit.blog"/> |
</action> |
<action path="/blog" |
type="pt.estgp.estgweb.web.controllers.blogs.LoadBlogController" |
scope="request" |
parameter="dispatch" |
validate="false" |
input="page.welcome"> |
<forward name="success" path="page.load.blog"/> |
</action> |
</action-mappings> |
</struts-config> |
/impl/conf/WEB-INF/struts/tiles-blog.xml |
---|
14,7 → 14,7 |
</definition> |
<definition name="page.load.blog" extends="base.layout1"> |
<put name="title" value="Create a Blog"/> |
<put name="title" value="Blog"/> |
<put name="body" value="/public/blogs/blog.jsp"/> |
</definition> |
/impl/conf/WEB-INF/struts/tiles-default.xml |
---|
63,6 → 63,7 |
</definition> |
<definition name="base.layoutCourses" extends="base.definition" path="/layout/layout1.jsp"> |
<put name="topnav" value="/user/courses/topnavCourses.jsp"/> |
<put name="navigation" value="/layout/navigationCourse.jsp" /> |
</definition> |
/impl/conf/WEB-INF/struts/tiles-ftpclient.xml |
---|
9,6 → 9,7 |
<definition name="page.courses" extends="base.layoutCourses"> |
<put name="body" value="/user/courses/courses.jsp"/> |
<put name="topnav" value="/user/courses/topnavCourses.jsp"/> |
</definition> |
</tiles-definitions> |
/impl/conf/WEB-INF/tlds/estgweb.tld |
---|
29,6 → 29,20 |
</attribute> |
</tag> |
<tag> |
<name>canAddContent</name> |
<tagclass>pt.estgp.estgweb.web.tags.CanAddContentTag</tagclass> |
<attribute> |
<name>name</name> |
<required>true</required> |
<rtexprvalue>true</rtexprvalue> |
</attribute> |
<attribute> |
<name>property</name> |
<required>false</required> |
<rtexprvalue>false</rtexprvalue> |
</attribute> |
</tag> |
<tag> |
<name>isAuthenticated</name> |
<tagclass>pt.estgp.estgweb.web.tags.IsAuthenticatedTag</tagclass> |
</tag> |
/impl/conf/app.properties |
---|
3,12 → 3,15 |
system.language=pt |
#Session Settings |
user.session.timeout.minutes=30 |
site.url=@site.url@ |
email.server=mail.estgp.pt |
email.user= |
email.password= |
email.from=jmachado@estgp.pt |
email.templates.dir=@email.templates.dir@ |
################################################## |
##Proxy Servers |
#If is an HTTP Server needs encoding config if FTP needs user pass config |
17,6 → 20,7 |
ionline.user=Baco_web |
server.estgp=http://www.estgp.pt/testes/nova_web |
#server.estgp=http://localhost:8080/estgweb |
server.estgweb=http://www.estgp.pt/testes/estgweb |
estgweb.encoding=UTF-8 |
estgp.encoding=UTF-8 |
28,16 → 32,16 |
user.student=student |
user.teacher=teacher |
user.role.0=all |
user.role.1=admin |
user.role.2=student |
user.role.3=erasmusStudent |
user.role.4=oldStudent |
user.role.5=futureStudent |
user.role.6=ci |
user.role.7=teacher |
user.role.8=teacher.eg |
user.role.9=teacher.dg |
user.role.00=all |
user.role.01=admin |
user.role.02=student |
user.role.03=erasmusStudent |
user.role.04=oldStudent |
user.role.05=futureStudent |
user.role.06=ci |
user.role.07=teacher |
user.role.08=teacher.eg |
user.role.09=teacher.dg |
user.role.10=teacher.ce |
user.role.11=worker |
user.role.12=invited |
104,7 → 108,10 |
# |
url.stat.tmp.dir=/linkchart |
url.stat.image.expire.interval.time.minutes=15 |
url.stat.click.cache.size=50 |
url.stat.click.cache.timeout=30 |
url.stat.ignore.extension.1=.js |
url.stat.ignore.extension.2=.css |
url.stat.ignore.extension.3=.jpg |
136,7 → 143,7 |
######################################################################### |
# Common Services |
# |
search.max.results=2 |
search.max.results=8 |
search.best.fragments.max.fragment.size=80 |
search.best.fragments.max.fragments=3 |
/impl/conf/berserk/sd.xml |
---|
169,6 → 169,16 |
</filterChains> |
</service> |
<service> |
<name>LoadTypeMaxAnnouncements</name> |
<implementationClass>pt.estgp.estgweb.services.announcements.LoadTypeMaxAnnouncementsService</implementationClass> |
<description>Load an Announcement views to show in list</description> |
<isTransactional>true</isTransactional> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
</filterChains> |
</service> |
<service> |
<name>LoadTopFlashNewsIterate</name> |
<implementationClass>pt.estgp.estgweb.services.announcements.LoadTopFlashNewsIterateService</implementationClass> |
<description>Load an Announcement one flash News</description> |
/impl/conf/berserk/fcd.xml |
---|
55,21 → 55,21 |
--> |
<filterChain> |
<name>InternalAnnouncement</name> |
<expression>InternalObject("serializable","pt.estgp.estgweb.domain.Announcement")</expression> |
<expression>InternalObject("serializable","pt.estgp.estgweb.domain.AnnouncementImpl")</expression> |
<description>Check if the object is internal</description> |
<invocationTiming>1</invocationTiming> |
<filterClass>pt.estgp.estgweb.filters.chains.LoadControlFilter</filterClass> |
</filterChain> |
<filterChain> |
<name>TargetRolesAnnouncement</name> |
<expression>TargetRoleUsersClass("serializable","pt.estgp.estgweb.domain.Announcement") || OwnerUsersClass("serializable","pt.estgp.estgweb.domain.Announcement")</expression> |
<expression>TargetRoleUsersClass("serializable","pt.estgp.estgweb.domain.AnnouncementImpl") || OwnerUsersClass("serializable","pt.estgp.estgweb.domain.AnnouncementImpl")</expression> |
<description>Owner of an object Control Chain</description> |
<invocationTiming>1</invocationTiming> |
<filterClass>pt.estgp.estgweb.filters.chains.LoadControlFilter</filterClass> |
</filterChain> |
<filterChain> |
<name>OwnersLoadAnnouncement</name> |
<expression>OwnerUsersClass("serializable","pt.estgp.estgweb.domain.Announcement")</expression> |
<expression>OwnerUsersClass("serializable","pt.estgp.estgweb.domain.AnnouncementImpl")</expression> |
<description>Owner of an object Control Chain</description> |
<invocationTiming>1</invocationTiming> |
<filterClass>pt.estgp.estgweb.filters.chains.LoadControlFilter</filterClass> |
108,14 → 108,14 |
<!--Profile--> |
<filterChain> |
<name>OwnerLoadProfile</name> |
<expression>OwnerUsersClass("serializable","pt.estgp.estgweb.domain.User")</expression> |
<expression>OwnerUsersClass("serializable","pt.estgp.estgweb.domain.UserImpl")</expression> |
<description>Owner of an object Control Chain</description> |
<invocationTiming>1</invocationTiming> |
<filterClass>pt.estgp.estgweb.filters.chains.LoadControlFilter</filterClass> |
</filterChain> |
<filterChain> |
<name>OwnerUpdateProfile</name> |
<expression>OwnerUsersClass("object.serializable","pt.estgp.estgweb.domain.User")</expression> |
<expression>OwnerUsersClass("object.serializable","pt.estgp.estgweb.domain.UserImpl")</expression> |
<description>Owner of an object Control Chain</description> |
<invocationTiming>1</invocationTiming> |
<filterClass>pt.estgp.estgweb.filters.chains.LoadControlFilter</filterClass> |
/impl/src/java/jomm/utils/ConfigProperties.java |
---|
119,4 → 119,14 |
{ |
return PropertiesUtils.getListValuesOrderedByPropertyName(getProperties(),propertyPrefix); |
} |
/** |
* @param propertyPrefix to load |
* @return a list of all property names hat starts with the given |
* prefix |
*/ |
public List<String> getListValsOrderedByValue(String propertyPrefix) |
{ |
return PropertiesUtils.getListValuesOrderedByValue(getProperties(),propertyPrefix); |
} |
} |
/impl/src/java/jomm/utils/PropertiesUtils.java |
---|
65,7 → 65,25 |
return props; |
} |
/** |
* @param p to use |
* @param propertyPrefix to find |
* @return a list of values |
*/ |
public static List<String> getListValuesOrderedByValue(Properties p, String propertyPrefix) |
{ |
List<String> props = new ArrayList<String>(); |
List<String> properties = PropertiesUtils.getListProperties(p,propertyPrefix); |
for (Object property1 : properties) |
{ |
String property = (String) property1; |
props.add(p.getProperty(property)); |
} |
Collections.sort(props,StringComparator.getInstance()); |
return props; |
} |
/** |
* Get property and convert it to float |
* |
/impl/src/java/jomm/utils/StringComparator.java |
---|
4,7 → 4,7 |
* |
* @author User |
*/ |
public class StringComparator implements java.util.Comparator |
public class StringComparator implements java.util.Comparator<String> |
{ |
46,8 → 46,8 |
* this fact. The recommended language is "Note: this comparator |
* imposes orderings that are inconsistent with equals." |
* |
* @param o1 the first object to be compared. |
* @param o2 the second object to be compared. |
* @param s1 the first object to be compared. |
* @param s2 the second object to be compared. |
* @return a negative integer, zero, or a positive integer as the |
* first argument is less than, equal to, or greater than the |
* second. |
55,9 → 55,8 |
* being compared by this Comparator. |
* |
*/ |
public int compare(Object o1, Object o2) { |
String s1 = (String) o1; |
String s2 = (String) o2; |
public int compare(String s1, String s2) |
{ |
int compareResult = s2.compareTo(s1); |
if(compareResult > 0) |
return -1; |
65,5 → 64,4 |
return 1; |
return 0; |
} |
} |
/impl/src/java/jomm/dao/impl/AbstractDao.java |
---|
10,6 → 10,7 |
import org.hibernate.criterion.Projections; |
import static org.hibernate.criterion.Restrictions.eq; |
import pt.estgp.estgweb.domain.DomainObject; |
import pt.estgp.estgweb.domain.DomainSerializableObject; |
import java.io.Serializable; |
import java.sql.SQLException; |
579,7 → 580,7 |
try |
{ |
Session session = getCurrentSession(); |
obj = (CLAZZ) session.load(getReferenceClass(), ((DomainObject) obj).getSerializable()); |
obj = (CLAZZ) session.load(getReferenceClass(), ((DomainSerializableObject) obj).getSerializable()); |
session.delete(obj); |
} |
catch (HibernateException e) |
/impl/src/java/jomm/web/utils/NavPlace.java |
---|
17,6 → 17,13 |
private String arg0 = null; |
private String arg1 = null; |
public NavPlace(String url,String key) |
{ |
this.url = url; |
this.key = key; |
this.pos = -1; |
} |
/** |
* Creates a new instance of NavPlace |
* |
68,14 → 75,17 |
public String getUrl() |
{ |
if(url != null) |
if(pos >= 0 && url != null) |
{ |
if(url.indexOf("?")>=0) |
return url + "&pos=" + pos; |
else |
return url + "?pos=" + pos; |
} |
return null; |
else |
{ |
return url; |
} |
} |
public void setUrl(String url) |
107,4 → 117,6 |
} |
/impl/src/java/jomm/web/ftp/impl/FtpFile.java |
---|
3,6 → 3,8 |
import java.io.InputStream; |
import java.io.IOException; |
import java.util.Date; |
import java.util.List; |
import java.util.ArrayList; |
import java.net.URL; |
import java.net.MalformedURLException; |
13,6 → 15,7 |
import com.sun.jndi.toolkit.url.UrlUtil; |
import jomm.web.ftp.IFile; |
import jomm.web.ftp.FileType; |
import jomm.web.utils.NavPlace; |
/** |
* @author Jorge Machado |
20,7 → 23,8 |
* @time 17:42:59 |
* @see jomm.web.ftp.impl |
*/ |
public class FtpFile implements IFile { |
public class FtpFile implements IFile |
{ |
private static final Logger logger = Logger.getLogger(FtpFile.class); |
33,22 → 37,22 |
FileType fileType; |
public FtpFile(FTPFile ftpFile,String completeUrl, String path) |
public FtpFile(FTPFile ftpFile, String completeUrl, String path) |
{ |
this.path = path; |
this.completeUrl = completeUrl; |
this.lastUpdate = ftpFile.getTimestamp().getTime(); |
this.name = path.substring(path.lastIndexOf("/")); |
this.name = ftpFile.getName(); |
this.directory = ftpFile.isDirectory(); |
this.size = ftpFile.getSize(); |
if(ftpFile.getType() == FTPFile.DIRECTORY_TYPE) |
if (ftpFile.getType() == FTPFile.DIRECTORY_TYPE) |
fileType = FileType.DIRECTORY; |
else if(ftpFile.getType() == FTPFile.FILE_TYPE) |
else if (ftpFile.getType() == FTPFile.FILE_TYPE) |
fileType = FileType.FILE; |
else if(ftpFile.getType() == FTPFile.UNKNOWN_TYPE) |
else if (ftpFile.getType() == FTPFile.UNKNOWN_TYPE) |
fileType = FileType.UNKNOWN; |
else if(ftpFile.getType() == FTPFile.SYMBOLIC_LINK_TYPE) |
else if (ftpFile.getType() == FTPFile.SYMBOLIC_LINK_TYPE) |
fileType = FileType.LINK; |
} |
61,7 → 65,7 |
} |
catch (MalformedURLException e) |
{ |
logger.error(e,e); |
logger.error(e, e); |
return null; |
} |
72,19 → 76,23 |
return lastUpdate; |
} |
public String getName() { |
public String getName() |
{ |
return name; |
} |
public long getSize() { |
public long getSize() |
{ |
return size; |
} |
public String getOriginalPath() { |
public String getOriginalPath() |
{ |
return path; |
} |
public boolean isDirectory() { |
public boolean isDirectory() |
{ |
return directory; |
} |
98,4 → 106,30 |
{ |
return fileType; |
} |
public List<NavPlace> getNavPlaces() |
{ |
List<NavPlace> navPlaces = new ArrayList<NavPlace>(); |
String[] paths = path.split("/"); |
String url = ""; |
for (int i = paths.length - 1; i >= 0; i--) |
{ |
if(paths[i].trim().length() > 0) |
{ |
NavPlace n; |
if(navPlaces.size() == 0) |
{ |
n = new NavPlace(null,paths[i]); |
} |
else |
{ |
n = new NavPlace(url, paths[i]); |
} |
url += "../"; |
navPlaces.add(0, n); |
} |
} |
return navPlaces; |
} |
} |
/impl/src/java/jomm/web/ftp/IFile.java |
---|
1,8 → 1,11 |
package jomm.web.ftp; |
import jomm.web.utils.NavPlace; |
import java.io.InputStream; |
import java.io.IOException; |
import java.util.Date; |
import java.util.List; |
/** |
* @author Jorge Machado |
21,4 → 24,5 |
public boolean isDirectory(); |
public FileType getType(); |
public String getCompleteUrl(); |
public List<NavPlace> getNavPlaces(); |
} |
/impl/src/java/pt/estgp/estgweb/utils/ConfigProperties.java |
---|
99,4 → 99,14 |
{ |
return getInstance().getListVals(propertyPrefix); |
} |
/** |
* @param propertyPrefix to load |
* @return a list of all values hat starts with the given |
* prefix |
*/ |
public static List<String> getListValuesOrderedByValue(String propertyPrefix) |
{ |
return getInstance().getListValsOrderedByValue(propertyPrefix); |
} |
} |
/impl/src/java/pt/estgp/estgweb/utils/RoleManager.java |
---|
25,7 → 25,7 |
private static List<String> roles = null; |
public static boolean hasRole(User u, List requiredRoles) |
public static boolean hasRole(GenericUser u, List requiredRoles) |
{ |
if(u == null) |
return false; |
36,7 → 36,7 |
} |
return false; |
} |
public static boolean hasRole(User u, String requiredRole) |
public static boolean hasRole(GenericUser u, String requiredRole) |
{ |
if(u == null) |
return false; |
/impl/src/java/pt/estgp/estgweb/Globals.java |
---|
40,4 → 40,12 |
public static final String TEACHER_ROLE = ConfigProperties.getProperty("role.teacher"); |
public static final BigDecimal SIGES_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("siges.institution.code")); |
public static final long URL_STAT_CHART_EXPIRE_INTERVAL = ConfigProperties.getIntProperty("url.stat.image.expire.interval.time.minutes"); |
public static final String URL_STAT_CHART_TMP_DIR = ConfigProperties.getProperty("url.stat.tmp.dir"); |
public static final int URL_STAT_CACHE_SIZE = ConfigProperties.getIntProperty("url.stat.click.cache.size"); |
public static final long URL_STAT_CACHE_TIMEOUT = ConfigProperties.getIntProperty("url.stat.click.cache.timeout") * 60 * 1000; |
public static final List<String> URL_STAT_IGNORE_EXTENSIONS = ConfigProperties.getListValues("url.stat.ignore.extension"); |
public static final List<String> URL_STAT_IGNORE_PREFIXS = ConfigProperties.getListValues("url.stat.ignore.prefix"); |
public static final String SITE_URL = ConfigProperties.getProperty("site.url"); |
} |
/impl/src/java/pt/estgp/estgweb/services/profile/EditUserService.java |
---|
8,8 → 8,6 |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import org.apache.log4j.Logger; |
import java.io.Serializable; |
public class EditUserService implements IService { |
private static final Logger logger = Logger.getLogger(EditUserService.class); |
20,7 → 18,7 |
logger.info("Editing user:" + userView.getId()); |
if(((UserImpl) userSession.getUser()).isSuperUserOrAdmin()) |
if(((UserImpl) userSession.getUser()).isSuperuserOrAdmin()) |
{ |
user=DaoFactory.getUserDaoImpl().get(userView.getSerializable()); |
userView.persistViewInObjectAdmin(user); |
/impl/src/java/pt/estgp/estgweb/services/announcements/LoadTypeMaxAnnouncementsService.java |
---|
New file |
0,0 → 1,46 |
package pt.estgp.estgweb.services.announcements; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.Announcement; |
import pt.estgp.estgweb.domain.UserImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import org.apache.log4j.Logger; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
* @date 4/Mar/2008 |
* @time 19:48:46 |
* @see pt.estgp.estgweb.services.announcements |
*/ |
public class LoadTypeMaxAnnouncementsService implements IService |
{ |
private static final Logger logger = Logger.getLogger(LoadTypeMaxAnnouncementsService.class); |
private static final int MAX_ANNOUNCEMENTS = ConfigProperties.getIntProperty("announcements.max.visible"); |
public List<AnnouncementView> run(String type, String subTarget, UserSession userSession) |
{ |
List<String> targetRoles = null; |
if(userSession.getUser() != null) |
targetRoles = userSession.getUser().getRolesList(); |
boolean internal = true; |
if (userSession.getUser() == null) |
internal = false; |
List<Announcement> announcements = DaoFactory.getAnnouncementDaoImpl().findAnnouncements(MAX_ANNOUNCEMENTS,targetRoles,type,subTarget,internal); |
if(announcements == null) |
return null; |
List<AnnouncementView> announcementViews = new ArrayList<AnnouncementView>(); |
for(Announcement announcement: announcements) |
{ |
AnnouncementView announcementView = new AnnouncementView(announcement); |
announcementViews.add(announcementView); |
} |
logger.info("Loading announcement views"); |
return announcementViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/announcements/LoadTargetMaxAnnouncementsService.java |
---|
26,7 → 26,7 |
{ |
List<String> targetRoles = null; |
if(userSession.getUser() != null) |
targetRoles = userSession.getUser().getTargetRolesList(); |
targetRoles = userSession.getUser().getRolesList(); |
boolean internal = true; |
if (userSession.getUser() == null) |
internal = false; |
/impl/src/java/pt/estgp/estgweb/services/urlstat/ChartBuilderService.java |
---|
19,7 → 19,6 |
import pt.estgp.estgweb.domain.UrlStatMonth; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.Globals; |
import jomm.utils.DatesUtils; |
import jomm.dao.impl.AbstractDao; |
46,8 → 45,8 |
{ |
private static final Logger logger = Logger.getLogger(ChartBuilderService.class); |
public static final long LINK_CHART_EXPIRE_INTERVAL = ConfigProperties.getIntProperty("url.stat.image.expire.interval.time.minutes") * 60 * 1000; |
public static final String LINK_CHART_TMP_DIR = ConfigProperties.getProperty("url.stat.tmp.dir"); |
public static final long LINK_CHART_EXPIRE_INTERVAL = Globals.URL_STAT_CHART_EXPIRE_INTERVAL; |
public static final String LINK_CHART_TMP_DIR = Globals.URL_STAT_CHART_TMP_DIR; |
/** |
* Return file image location |
/impl/src/java/pt/estgp/estgweb/domain/UserImpl.java |
---|
1,11 → 1,7 |
package pt.estgp.estgweb.domain; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.Globals; |
import java.io.Serializable; |
import java.util.Date; |
import java.util.List; |
import java.util.Set; |
/** |
55,59 → 51,5 |
} |
return false; |
} |
public void addRole(String role) |
{ |
setRoles(RoleManager.catRole(getRoles(), role)); |
} |
public boolean hasRole(String r) |
{ |
if (r == null || getRoles() == null || getRoles().length() == 0) |
return false; |
for (String role : RoleManager.getRolesFromSerial(getRoles())) |
{ |
if (role.equals(r)) |
return true; |
} |
return false; |
} |
/** |
* @return a list of role Strings |
*/ |
public List<String> getOwnerRoles() |
{ |
return getRolesList(); |
} |
public List<String> getRolesList() |
{ |
return RoleManager.getRolesFromSerial(getRoles()); |
} |
public Serializable getSerializable() |
{ |
return getId(); |
} |
public User getOwner() |
{ |
return this; |
} |
public boolean isSuperUser() |
{ |
return super.isSuperuser() || hasRole(Globals.SUPER_USER_ROLE); |
} |
public boolean isAdmin() |
{ |
return hasRole(Globals.ADMIN_ROLE); |
} |
public boolean isSuperUserOrAdmin() |
{ |
return isSuperUser() || isAdmin(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/TesteImpl.java |
---|
1,10 → 1,18 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
/** |
* @author Jorge Machado |
* @date 9/Abr/2008 |
* @time 16:57:12 |
* @see pt.estgp.estgweb.domain |
*/ |
public class TesteImpl extends Teste{ |
public class TesteImpl extends Teste |
{ |
public Serializable getSerializable() |
{ |
return getId(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/enums/AnnouncementStyleEnum.java |
---|
9,8 → 9,14 |
*/ |
public enum AnnouncementStyleEnum { |
imgLeft("announcement.style.img.left"), |
imgLeftTop("announcement.style.img.left.top"), |
imgLeftBottom("announcement.style.img.left.bottom"), |
imgRight("announcement.style.img.right"), |
imgRightTop("announcement.style.img.right.top"), |
imgRightBottom("announcement.style.img.right.bottom"), |
imgTop("announcement.style.img.top"), |
imgTopLeft("announcement.style.img.top.left"), |
imgTopRight("announcement.style.img.top.right"), |
imgEmbeddedLeft("announcement.style.img.embedded.left"), |
imgEmbeddedRight("announcement.style.img.embedded.right"); |
/impl/src/java/pt/estgp/estgweb/domain/StudentImpl.java |
---|
18,4 → 18,16 |
public String getManagedRole() { |
return STUDENT_ROLE; |
} |
public boolean hasCourseUnit(CourseUnit courseUnit) |
{ |
if(getSubscribedUnits() == null) |
return false; |
for(CourseUnit c: getSubscribedUnits()) |
{ |
if(c.getId() == courseUnit.getId()) |
return true; |
} |
return false; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/AnnouncementImpl.java |
---|
7,19 → 7,40 |
import java.util.List; |
import java.io.Serializable; |
import org.apache.log4j.Logger; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 10:27:25 |
* @see pt.estgp.estgweb.domain |
*/ |
public class AnnouncementImpl extends Announcement |
public class AnnouncementImpl extends Announcement implements IOwned, IContextTimerObject, ITargetRoles, IInternal |
{ |
private static final Logger logger = Logger.getLogger(AnnouncementImpl.class); |
public boolean isOwnedBy(GenericUser u) |
{ |
return u.getId() == getOwner().getId(); |
} |
public GenericUser getOwner() |
{ |
return super.getOwner(); |
} |
/** |
* Not implemented in announcements |
* @return null |
*/ |
public List<String> getOwnerRoles() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
public String getStyle() |
{ |
if(super.getStyle() == null) |
/impl/src/java/pt/estgp/estgweb/domain/IAddContents.java |
---|
New file |
0,0 → 1,14 |
package pt.estgp.estgweb.domain; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 10:28:05 |
* @see pt.estgp.estgweb.domain |
*/ |
public interface IAddContents |
{ |
public boolean canAddContent(GenericUserImpl u); |
} |
/impl/src/java/pt/estgp/estgweb/domain/CourseUnitImpl.java |
---|
1,5 → 1,7 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
/** |
* Created by IntelliJ IDEA. |
* User: Jorge Machado |
7,5 → 9,10 |
* Time: 20:21:15 |
* To change this template use File | Settings | File Templates. |
*/ |
public class CourseUnitImpl extends CourseUnit { |
public class CourseUnitImpl extends CourseUnit |
{ |
public Serializable getSerializable() |
{ |
return getId(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitBlogDaoImpl.java |
---|
New file |
0,0 → 1,19 |
package pt.estgp.estgweb.domain.dao.impl; |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
* @time 2:51:06 |
* @see pt.estgp.estgweb.domain.dao.impl |
*/ |
public class CourseUnitBlogDaoImpl extends CourseUnitBlogDao |
{ |
private CourseUnitBlogDaoImpl(){} |
public static CourseUnitBlogDaoImpl getInstance() |
{ |
if (myInstance == null) |
myInstance = new CourseUnitBlogDaoImpl(); |
return (CourseUnitBlogDaoImpl) myInstance; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/DaoFactory.java |
---|
70,7 → 70,7 |
return TesteDaoImpl.getInstance(); |
} |
public static BlogDaoImpl getBlogDaoImpl() |
public static BlogDaoImpl getBlogDaoImpl() |
{ |
return BlogDaoImpl.getInstance(); |
} |
85,6 → 85,11 |
return CourseUnitDaoImpl.getInstance(); |
} |
public static CourseUnitBlogDaoImpl getCourseUnitBlogDaoImpl() |
{ |
return CourseUnitBlogDaoImpl.getInstance(); |
} |
public static TeacherDaoImpl getTeacherDaoImpl() |
{ |
return TeacherDaoImpl.getInstance(); |
/impl/src/java/pt/estgp/estgweb/domain/DomainSerializableObject.java |
---|
New file |
0,0 → 1,14 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 10:56:46 |
* @see pt.estgp.estgweb.domain |
*/ |
public abstract class DomainSerializableObject extends DomainObject |
{ |
public abstract Serializable getSerializable(); |
} |
/impl/src/java/pt/estgp/estgweb/domain/TeacherImpl.java |
---|
17,4 → 17,16 |
public String getManagedRole() { |
return TEACHER_ROLE; |
} |
public boolean hasCourseUnit(CourseUnit courseUnit) |
{ |
if(getTeachedUnits() == null) |
return false; |
for(CourseUnit c: getTeachedUnits()) |
{ |
if(c.getId() == courseUnit.getId()) |
return true; |
} |
return false; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/DomainObject.java |
---|
1,12 → 1,6 |
package pt.estgp.estgweb.domain; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import java.util.List; |
import java.util.Date; |
import java.util.ArrayList; |
import java.io.Serializable; |
/** |
* @author Jorge Machado |
14,82 → 8,19 |
* @time 10:56:46 |
* @see pt.estgp.estgweb.domain |
*/ |
public abstract class DomainObject implements IOwned, IContextTimerObject, ITargetRoles, IInternal |
public abstract class DomainObject |
{ |
private static final Date MIN_DATE = new Date(0); |
private static final Date MAX_DATE = new Date(Integer.MAX_VALUE); |
private static final String ALL_ROLE = ConfigProperties.getProperty("user.super"); |
public void setSaveDate(Date d){} |
public Date getSaveDate() |
{ |
return null; |
} |
/** |
* can be override in proper classes |
* @return generic user owner of object |
*/ |
public GenericUser getOwner() |
public void setSaveDate(Date d) |
{ |
return null; |
} |
/** |
* can be override in proper classes |
* @return List of Strings that correpond to owner roles of object |
*/ |
public List<String> getOwnerRoles() |
{ |
return null; |
} |
/** |
* Check if this object is owned by this user or |
* if this user is in group of owners or |
* if user has some owner role |
* |
* @param u user to check |
* @return true if user is owner |
*/ |
public boolean isOwnedBy(GenericUser u) |
public Date getSaveDate() |
{ |
if(getOwner() == null && getOwnerRoles() == null) |
return false; |
if(getOwner() != null) |
{ |
if(getOwner() instanceof UserImpl && u instanceof UserImpl && u.getId() == getOwner().getId()) |
{ |
return true; |
} |
else if(getOwner() instanceof UserImpl && u instanceof GroupImpl) |
{ |
return false; |
} |
else if(getOwner() instanceof GroupImpl && u instanceof GroupImpl && getOwner().getId() == u.getId()) |
{ |
return true; |
} |
else if(getOwner() instanceof GroupImpl && u instanceof UserImpl) |
{ |
if(((UserImpl)u).hasGroup((Group) getOwner())) |
return true; |
} |
} |
if(getOwnerRoles() != null) |
{ |
if(u instanceof User) |
{ |
if(RoleManager.hasRole((User) u,getOwnerRoles())) |
return true; |
} |
} |
return false; |
} |
public String getChoosedOwnerRole() |
{ |
return null; |
} |
104,25 → 35,8 |
return MAX_DATE; |
} |
public Serializable getSerializable() |
{ |
return null; |
} |
public Class getReferenceClass() |
{ |
return this.getClass(); |
} |
public List<String> getTargetRolesList() |
{ |
List<String> roles = new ArrayList<String>(); |
roles.add(ALL_ROLE); |
return roles; |
} |
public boolean isInternal() |
{ |
return true; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/BlogImpl.java |
---|
1,11 → 1,72 |
package pt.estgp.estgweb.domain; |
import pt.estgp.estgweb.utils.RoleManager; |
import java.util.Date; |
import java.util.List; |
import java.io.Serializable; |
import org.apache.log4j.Logger; |
/** |
* @author Jorge Machado |
* @date 21/Abr/2008 |
* @time 14:37:50 |
* @see pt.estgp.estgweb.domain |
*/ |
public class BlogImpl extends Blog |
public class BlogImpl extends Blog implements IAddContents, IOwned, IInternal, ITargetRoles |
{ |
private static final Logger logger = Logger.getLogger(BlogImpl.class); |
public BlogImpl() |
{ |
} |
public BlogImpl(Date saveDate, String title, String description, String targetRoles, boolean internal, boolean status, Image image, GenericUser owner) |
{ |
super(saveDate, title, description, targetRoles, internal, status, image, owner); |
} |
public boolean canAddPost(GenericUserImpl user) |
{ |
return user.hasRole(getTargetRolesList()) || user.isSuperuserOrAdmin() || isOwnedBy(user); |
} |
public boolean canAddContent(GenericUserImpl u) |
{ |
return canAddPost(u); |
} |
public List<String> getTargetRolesList() |
{ |
return RoleManager.getRolesFromSerial(getTargetRoles()); |
} |
/** |
* Not implemented |
* @return null |
*/ |
public List<String> getOwnerRoles() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
/** |
* Not implemented here |
* @return null |
*/ |
public String getChoosedOwnerRole() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
public Serializable getSerializable() |
{ |
return getId(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/BlogPostImpl.java |
---|
1,5 → 1,8 |
package pt.estgp.estgweb.domain; |
import java.io.Serializable; |
import java.util.List; |
/** |
* @author Jorge Machado |
* @date 21/Abr/2008 |
8,4 → 11,14 |
*/ |
public class BlogPostImpl extends BlogPost |
{ |
public Serializable getSerializable() |
{ |
return getId(); |
} |
/*Not Implemented*/ |
public List<String> getOwnerRoles() |
{ |
return null; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/AnnouncementView.java |
---|
1,8 → 1,6 |
package pt.estgp.estgweb.domain.views; |
import pt.estgp.estgweb.domain.Announcement; |
import pt.estgp.estgweb.domain.Image; |
import pt.estgp.estgweb.domain.AnnouncementImpl; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.enums.AnnouncementStyleEnum; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.utils.ConfigProperties; |
11,17 → 9,23 |
import java.util.Date; |
import java.io.Serializable; |
import org.apache.log4j.Logger; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 19:34:49 |
* @see pt.estgp.estgweb.domain.views |
*/ |
public class AnnouncementView extends DomainObjectView |
public class AnnouncementView extends DomainObjectView implements IOwned, IContextTimerObject, ITargetRoles, IInternal |
{ |
private static Logger logger = Logger.getLogger(AnnouncementView.class); |
public static final int TEXT_SUMMARY_SIZE = ConfigProperties.getIntProperty("announcements.text.summary.size"); |
public static final int TEXT_SUMMARY_SIZE_SMALL = ConfigProperties.getIntProperty("announcements.text.summary.size.small"); |
private Announcement announcement; |
private long id; |
private String title; |
private String text; |
36,7 → 40,7 |
private Integer counter; |
private boolean status; |
private boolean internal; |
private long ownerID; |
private GenericUser owner; |
private String style; |
private String internalUrlServer; |
private String internalUrlPath; |
49,6 → 53,7 |
{ |
super(announcement); |
this.announcement = announcement; |
this.title = announcement.getTitle(); |
this.text = announcement.getText(); |
this.bigImage = announcement.getBigImage(); |
62,7 → 67,7 |
this.startDate = announcement.getStartDate(); |
this.expireDate = announcement.getExpireDate(); |
this.choosedOwnerRole = announcement.getChoosedOwnerRole(); |
this.ownerID=announcement.getOwner().getId(); |
this.owner = announcement.getOwner(); |
this.internalUrlServer = announcement.getInternalUrlServer(); |
this.internalUrlPath = announcement.getInternalUrlPath(); |
this.style = announcement.getStyle(); |
252,7 → 257,7 |
public long getOwnerID() { |
return ownerID; |
return getOwner().getId(); |
} |
public Integer getCounter() { |
279,19 → 284,32 |
public String getFormatedText() |
{ |
if(text == null | text.trim().length() == 0) |
if(text == null || text.trim().length() == 0) |
return ""; |
String formatedText = text.replace(" "," "); |
String formatedText = text; |
StringBuilder finalFormatedText = new StringBuilder(); |
boolean newLine = true; |
for(int i =0;i<formatedText.length();i++) |
{ |
if(formatedText.charAt(i) == '\n') |
if(newLine && formatedText.charAt(i) == ' ') |
{ |
finalFormatedText.append(" "); |
} |
else if(formatedText.charAt(i) == '\n') |
{ |
finalFormatedText.append("<br>"); |
newLine = true; |
} |
else if(formatedText.charAt(i) == '\t') |
{ |
finalFormatedText.append(" "); |
} |
else |
{ |
finalFormatedText.append(formatedText.charAt(i)); |
newLine = false; |
} |
} |
return finalFormatedText.toString(); |
} |
307,4 → 325,29 |
return getText().length() > TEXT_SUMMARY_SIZE_SMALL; |
} |
} |
public GenericUser getOwner() |
{ |
return owner; |
} |
/** |
* Not implemented |
* @return null |
*/ |
public List<String> getOwnerRoles() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
public boolean isOwnedBy(GenericUser u) |
{ |
return announcement.isOwnedBy(u); |
} |
public List<String> getTargetRolesList() |
{ |
return getTargetRoles(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/UserView.java |
---|
1,15 → 1,14 |
package pt.estgp.estgweb.domain.views; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.GenericUser; |
import pt.estgp.estgweb.domain.IOwned; |
import pt.estgp.estgweb.domain.User; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.domain.Image; |
import pt.estgp.estgweb.domain.Announcement; |
import pt.estgp.estgweb.domain.AnnouncementImpl; |
import pt.estgp.estgweb.domain.User; |
import java.io.Serializable; |
import java.util.Date; |
import java.util.List; |
import java.util.Date; |
import java.io.Serializable; |
/** |
* @author Jorge Machado |
17,8 → 16,12 |
* @time 19:34:49 |
* @see pt.estgp.estgweb.domain.views |
*/ |
public class UserView extends DomainObjectView |
public class UserView extends DomainObjectView implements IOwned |
{ |
private static final Logger logger =Logger.getLogger(UserView.class); |
private long id; |
private String name; |
private List<String> userRoles; |
31,6 → 34,7 |
private String bi; |
private Date birthDate; |
private String username; |
private User user; |
public UserView() |
{} |
39,6 → 43,7 |
{ |
super(user); |
this.user = user; |
this.id = user.getId(); |
this.name=user.getName(); |
this.address=user.getAddress(); |
169,7 → 174,7 |
public void setBirthDate(Date birthDate) { |
this.birthDate = birthDate; |
} |
} |
public String getUsername() { |
return username; |
178,4 → 183,29 |
public void setUsername(String username) { |
this.username = username; |
} |
public boolean isOwnedBy(GenericUser u) |
{ |
return u.getId() == id; |
} |
public GenericUser getOwner() |
{ |
return user; |
} |
public List<String> getOwnerRoles() |
{ |
return getUserRoles(); |
} |
/** |
* Not implemented here |
* @return null |
*/ |
public String getChoosedOwnerRole() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/BlogView.java |
---|
1,15 → 1,12 |
package pt.estgp.estgweb.domain.views; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.Image; |
import pt.estgp.estgweb.domain.User; |
import pt.estgp.estgweb.domain.GenericUser; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.utils.RoleManager; |
import java.io.Serializable; |
import java.util.List; |
import java.util.Date; |
/** |
* @author Jorge Machado |
17,12 → 14,13 |
* @time 19:34:49 |
* @see pt.estgp.estgweb.domain.views |
*/ |
public class BlogView extends DomainObjectView |
public class BlogView extends DomainObjectView implements IAddContents, IOwned, IInternal, ITargetRoles |
{ |
private static final Logger logger = Logger.getLogger(BlogView.class); |
public static final int DESC_SIZE = ConfigProperties.getIntProperty("blog.desc.summary.size"); |
private long id; |
private String title; |
private String description; |
30,18 → 28,22 |
private Image image; |
private GenericUser owner; |
private boolean status; |
private boolean internal; |
private Blog blog; |
public BlogView() |
{} |
{ |
} |
public BlogView(Blog blog) |
{ |
super(blog); |
this.blog = blog; |
this.title = blog.getTitle(); |
this.description = blog.getDescription(); |
this.image = blog.getImage(); |
this.targetRoles = RoleManager.getRolesFromSerial(blog.getTargetRoles()); |
this.status=blog.isStatus(); |
this.status = blog.isStatus(); |
this.id = blog.getId(); |
this.owner = blog.getOwner(); |
} |
55,63 → 57,104 |
blog.setStatus(status); |
} |
public void setInternal(boolean internal) |
{ |
this.internal = internal; |
} |
public long getId() { |
public long getId() |
{ |
return id; |
} |
public void setId(long id) { |
public void setId(long id) |
{ |
this.id = id; |
} |
public boolean isOwnedBy(GenericUser u) |
{ |
return blog.isOwnedBy(u); |
} |
public GenericUser getOwner() |
{ |
return owner; |
} |
public String getTitle() { |
/** |
* Not implemented in announcements |
* @return null |
*/ |
public List<String> getOwnerRoles() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
/** |
* Not implemented in announcements |
* @return null |
*/ |
public String getChoosedOwnerRole() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
public String getTitle() |
{ |
return title; |
} |
public void setTitle(String title) { |
public void setTitle(String title) |
{ |
this.title = title; |
} |
public String getDescription() { |
public String getDescription() |
{ |
return description; |
} |
public void setDescription(String description) { |
public void setDescription(String description) |
{ |
this.description = description; |
} |
public List<String> getTargetRoles() { |
public List<String> getTargetRoles() |
{ |
return targetRoles; |
} |
public void setTargetRoles(List<String> targetRoles) { |
public void setTargetRoles(List<String> targetRoles) |
{ |
this.targetRoles = targetRoles; |
} |
public Image getImage() { |
public Image getImage() |
{ |
return image; |
} |
public void setImage(Image image) { |
public void setImage(Image image) |
{ |
this.image = image; |
} |
public boolean isStatus() { |
public boolean isStatus() |
{ |
return status; |
} |
public void setStatus(boolean status) { |
public void setStatus(boolean status) |
{ |
this.status = status; |
} |
public String getDescSummary() |
{ |
return getFragment(DESC_SIZE,getDescription()); |
return getFragment(DESC_SIZE, getDescription()); |
} |
public Boolean getHaveAllText() |
131,9 → 174,24 |
public String getOwnerEmail() |
{ |
if(owner instanceof User) |
return ((User)owner).getEmail(); |
if (owner instanceof User) |
return ((User) owner).getEmail(); |
else |
return null; |
} |
public boolean canAddContent(GenericUserImpl u) |
{ |
return ((BlogImpl)blog).canAddContent(u); |
} |
public boolean isInternal() |
{ |
return internal; |
} |
public List<String> getTargetRolesList() |
{ |
return getTargetRoles(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/DomainObjectFactory.java |
---|
83,6 → 83,11 |
return new BlogImpl(); |
} |
public static CourseUnitBlogImpl createCourseUnitBlogImpl() |
{ |
return new CourseUnitBlogImpl(); |
} |
public static BlogPostImpl createBlogPostImpl() |
{ |
return new BlogPostImpl(); |
/impl/src/java/pt/estgp/estgweb/domain/CourseUnitBlogImpl.java |
---|
New file |
0,0 → 1,31 |
package pt.estgp.estgweb.domain; |
/** |
* @author Jorge Machado |
* @date 21/Abr/2008 |
* @time 14:37:50 |
* @see pt.estgp.estgweb.domain |
*/ |
public class CourseUnitBlogImpl extends CourseUnitBlog |
{ |
/** |
* Check if user has any target role and if is associated in some way with blog course unit |
* |
* @param user to check |
* @return true if can add post |
*/ |
public boolean canAddPost(UserImpl user) |
{ |
if(!super.canAddPost(user)) |
return false; |
if(user instanceof Teacher) |
{ |
return ((TeacherImpl)user).hasCourseUnit(getCourseUnit()); |
} |
else if(user instanceof Student) |
{ |
return ((StudentImpl)user).hasCourseUnit(getCourseUnit()); |
} |
return false; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/OwnedDomainObject.java |
---|
New file |
0,0 → 1,68 |
package pt.estgp.estgweb.domain; |
import java.util.List; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 10:56:46 |
* @see pt.estgp.estgweb.domain |
*/ |
public abstract class OwnedDomainObject extends DomainSerializableObject |
{ |
/** |
* can be override in proper classes |
* @return generic user owner of object |
*/ |
public abstract GenericUser getOwner(); |
/** |
* can be override in proper classes |
* @return List of Strings that correpond to owner roles of object |
*/ |
public abstract List<String> getOwnerRoles(); |
/** |
* Check if this object is owned by this user or |
* if this user is in group of owners or |
* if user has some owner role |
* |
* @param u user to check |
* @return true if user is owner |
*/ |
public boolean isOwnedBy(GenericUser u) |
{ |
if(getOwner() == null && getOwnerRoles() == null) |
return false; |
if(getOwner() != null) |
{ |
if(getOwner() instanceof UserImpl && u instanceof UserImpl && u.getId() == getOwner().getId()) |
{ |
return true; |
} |
else if(getOwner() instanceof UserImpl && u instanceof GroupImpl) |
{ |
return false; |
} |
else if(getOwner() instanceof GroupImpl && u instanceof GroupImpl && getOwner().getId() == u.getId()) |
{ |
return true; |
} |
else if(getOwner() instanceof GroupImpl && u instanceof UserImpl) |
{ |
if(((UserImpl)u).hasGroup((Group) getOwner())) |
return true; |
} |
} |
if(getOwnerRoles() != null) |
{ |
if(u instanceof GenericUserImpl) |
{ |
if(((GenericUserImpl)u).hasRole(getOwnerRoles())) |
return true; |
} |
} |
return false; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/GenericUserImpl.java |
---|
New file |
0,0 → 1,101 |
package pt.estgp.estgweb.domain; |
import pt.estgp.estgweb.utils.RoleManager; |
import pt.estgp.estgweb.Globals; |
import java.util.Date; |
import java.util.List; |
import java.io.Serializable; |
import org.apache.log4j.Logger; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
* @time 10:27:25 |
* @see pt.estgp.estgweb.domain |
*/ |
public abstract class GenericUserImpl extends GenericUser implements IOwned |
{ |
private static Logger logger = Logger.getLogger(GenericUserImpl.class); |
public GenericUserImpl() |
{ |
} |
public GenericUserImpl(Date saveDate, boolean superuser, String name, String roles) |
{ |
super(saveDate, superuser, name, roles); |
} |
public Serializable getSerializable() |
{ |
return getId(); |
} |
public void addRole(String role) |
{ |
setRoles(RoleManager.catRole(getRoles(), role)); |
} |
public boolean hasRole(String r) |
{ |
if (r == null || getRoles() == null || getRoles().length() == 0) |
return false; |
for (String role : RoleManager.getRolesFromSerial(getRoles())) |
{ |
if (role.equals(r)) |
return true; |
} |
return false; |
} |
public boolean hasRole(List<String> roles) |
{ |
return RoleManager.hasRole(this,roles); |
} |
public GenericUser getOwner() |
{ |
return this; |
} |
/** |
* @return a list of role Strings |
*/ |
public List<String> getOwnerRoles() |
{ |
return getRolesList(); |
} |
/** |
* Not implemented here |
* @return null |
*/ |
public String getChoosedOwnerRole() |
{ |
logger.warn("Invoke not implemented method in class:" + getClass().getName()); |
return null; |
} |
public List<String> getRolesList() |
{ |
return RoleManager.getRolesFromSerial(getRoles()); |
} |
public boolean isSuperuser() |
{ |
return super.isSuperuser() || hasRole(Globals.SUPER_USER_ROLE); |
} |
public boolean isAdmin() |
{ |
return hasRole(Globals.ADMIN_ROLE); |
} |
public boolean isSuperuserOrAdmin() |
{ |
return isSuperuser() || isAdmin(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/LayoutController.java |
---|
37,7 → 37,7 |
private static final Logger logger = Logger.getLogger(LayoutController.class); |
public ActionForward execute(ActionMapping mapping, |
ActionForm form , |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws IOException, ServletException |
49,17 → 49,15 |
String server = ConfigProperties.getProperty("server." + serverParameter); |
if(serverParameter== null || server == null || server.length()==0 || path == null || layout == null) |
if (serverParameter == null || server == null || server.length() == 0 || path == null || layout == null) |
throw new FileNotFoundException("url not found for server:" + server + " and path:" + path); |
logger.info("requested path:" + path); |
logger.info("requested server:" + server); |
request.setAttribute("path",path); |
request.setAttribute("server",server); |
if(path != null) |
request.setAttribute("path", path); |
request.setAttribute("server", server); |
if (path != null) |
{ |
try |
{ |
68,32 → 66,33 |
con.connect(); |
logger.info("contentPath:" + con.getContentType()); |
// if(con.getContentType() != null && con.getContentType().toLowerCase().indexOf("html") >= 0) |
if(server.startsWith("ftp://")) |
if (server.startsWith("ftp://")) |
{ |
processRequestFtp(request, path,serverParameter,server); |
processRequestFtp(request, path, serverParameter, server); |
return mapping.findForward(layout + ".ftp"); |
} |
else if(path.endsWith("html") || path.endsWith("htm") || path.endsWith("shtml") || path.endsWith("asp") || path.endsWith("jsp") || path.endsWith("aspx") || path.endsWith("/")) |
else |
if (path.endsWith("html") || path.endsWith("htm") || path.endsWith("shtml") || path.endsWith("asp") || path.endsWith("jsp") || path.endsWith("aspx") || path.endsWith("/")) |
{ |
String encoding = ConfigProperties.getProperty(serverParameter + ".encoding"); |
request.setAttribute("encoding",encoding); |
request.setAttribute("encoding", encoding); |
return mapping.findForward(layout); |
} |
else |
{ |
ActionForward forward = new ActionForward(); |
request.setAttribute("useOutputStream","true"); |
request.setAttribute("useOutputStream", "true"); |
forward.setPath("/WebProxy"); |
return forward; |
} |
} |
catch(FileNotFoundException e) |
catch (FileNotFoundException e) |
{ |
throw e; |
} |
catch(Throwable e) |
catch (Throwable e) |
{ |
logger.error(e,e); |
logger.error(e, e); |
throw new IOException(e.toString()); |
} |
} |
104,47 → 103,51 |
} |
protected void processRequestFtp(HttpServletRequest request, String path,String serverStr,String server) |
protected void processRequestFtp(HttpServletRequest request, String path, String serverStr, String server) |
throws ServletException, IOException |
{ |
try |
{ |
String user = ConfigProperties.getProperty(serverStr + ".user"); |
String pass = ConfigProperties.getProperty(serverStr + ".pass"); |
if(path != null) |
if (path != null) |
{ |
FtpServer ftpServer = getServer(server,user,pass); |
FtpServer ftpServer = getServer(server, user, pass); |
FTPClient client = ftpServer.getClient(); |
client.changeWorkingDirectory(URIUtil.encodePath(path,"ISO-8859-1")); |
FTPFile[] files = client.listFiles(); |
client.changeWorkingDirectory(URIUtil.encodePath(path, "ISO-8859-1")); |
FTPFile[] files = client.listFiles(); |
List<IFile> iFiles = new ArrayList<IFile>(); |
for(FTPFile ftpFile : files) |
for (FTPFile ftpFile : files) |
{ |
IFile iFile = new FtpFile(ftpFile,server + path + "/" + ftpFile.getName(),path); |
IFile iFile; |
if (path.endsWith("/")) |
iFile = new FtpFile(ftpFile, server + path + ftpFile.getName(), path); |
else iFile = new FtpFile(ftpFile, server + path + "/" + ftpFile.getName(), path); |
iFiles.add(iFile); |
} |
request.setAttribute("files",iFiles); |
request.setAttribute("files", iFiles); |
client.quit(); |
client.disconnect(); |
client.quit(); |
} |
else |
{ |
throw new FileNotFoundException("url not found for server:" + server + " and path:" + path); |
} |
} |
catch(Throwable e) |
catch (Throwable e) |
{ |
logger.error(e,e); |
logger.error(e, e); |
} |
} |
private static HashMap<String,FtpServer> servers = new HashMap<String,FtpServer>(); |
private static HashMap<String, FtpServer> servers = new HashMap<String, FtpServer>(); |
/** |
* Add a ftpServer to Cache |
* |
* @param urlStr to parse |
* @param user username |
* @param pass password |
* @param user username |
* @param pass password |
* @return ftpServer |
*/ |
private static synchronized FtpServer addServer(String urlStr, String user, String pass) |
154,20 → 157,20 |
URL url = new URL(urlStr); |
String host = url.getHost(); |
int port = url.getPort(); |
if(port <= 0) |
if (port <= 0) |
port = 21; |
logger.info("Connecting to " + host + "in port:" + port); |
FtpServer ftpServer = new FtpServer(host,port,user,pass); |
servers.put(urlStr,ftpServer); |
FtpServer ftpServer = new FtpServer(host, port, user, pass); |
servers.put(urlStr, ftpServer); |
return ftpServer; |
} |
catch (MalformedURLException e) |
{ |
logger.error(e,e); |
logger.error(e, e); |
} |
catch (IOException e) |
{ |
logger.error(e,e); |
logger.error(e, e); |
} |
return null; |
} |
175,8 → 178,8 |
private static FtpServer getServer(String urlStr, String user, String pass) |
{ |
FtpServer ftpServer = servers.get(urlStr); |
if(ftpServer == null) |
ftpServer = addServer(urlStr,user,pass); |
if (ftpServer == null) |
ftpServer = addServer(urlStr, user, pass); |
return ftpServer; |
} |
191,7 → 194,7 |
public FtpServer(String host, int port) |
{ |
this.host = host; |
if(port > 0) |
if (port > 0) |
this.port = port; |
} |
206,43 → 209,51 |
public FTPClient getClient() throws IOException |
{ |
FTPClient ftp = new FTPClient(); |
ftp.connect(host,port); |
if(username != null) |
ftp.connect(host, port); |
if (username != null) |
ftp.user(username); |
if(password != null) |
if (password != null) |
ftp.pass(password); |
return ftp; |
} |
public String getHost() { |
public String getHost() |
{ |
return host; |
} |
public void setHost(String host) { |
public void setHost(String host) |
{ |
this.host = host; |
} |
public int getPort() { |
public int getPort() |
{ |
return port; |
} |
public void setPort(int port) { |
public void setPort(int port) |
{ |
this.port = port; |
} |
public String getUsername() { |
public String getUsername() |
{ |
return username; |
} |
public void setUsername(String username) { |
public void setUsername(String username) |
{ |
this.username = username; |
} |
public String getPassword() { |
public String getPassword() |
{ |
return password; |
} |
public void setPassword(String password) { |
public void setPassword(String password) |
{ |
this.password = password; |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/Globals.java |
---|
18,6 → 18,7 |
public static final String PORTAL_ROLE_VIEW_FUTURE_STUDENT ="?role=futureStudent&menu=menu.futurosAlunos"; |
public static final String PORTAL_ROLE_VIEW_OLD_STUDENT ="?role=oldStudent&menu=menu.antigosAlunos"; |
public static final String PORTAL_ROLE_VIEW_TEACHER ="?role=teacher&menu=menu.docentes"; |
public static String getStartLinkPortalMenu(String layout) |
/impl/src/java/pt/estgp/estgweb/web/form/AddRolesForm.java |
---|
17,7 → 17,7 |
protected String role; |
protected static List<String> targetRoles = Globals.USER_ROLES; |
protected List<String> selectedRoles; |
protected String targetRolesStr; |
protected String targetRolesStr = Globals.ALL_ROLE; |
public String getRole() { |
/impl/src/java/pt/estgp/estgweb/web/controllers/profile/ProfileController.java |
---|
32,8 → 32,8 |
private static final Logger logger = Logger.getLogger(ProfileController.class); |
private static final String TARGET_ROLES_KEY = AddRolesForm.TARGET_ROLES_KEY; |
public ActionForward editUser(ActionMapping mapping, |
ActionForm form , |
HttpServletRequest request, |
54,7 → 54,7 |
if(userSession.getUser().getId()==user.getId()){ |
userSession.setUser(user); |
request.setAttribute(Globals.USER_SESSION_KEY,userSession); |
logger.info("Puting new user info in session:" + user.getId()); |
logger.info("Puting new user info in session:" + user.getId()); |
} |
addMessage(request,"profile.edited.sucess"); |
return mapping.findForward("success"); |
95,7 → 95,7 |
pF.setUserView(uV); |
pF.setSelectedRoles(uV.getUserRoles()); |
userSession.put(TARGET_ROLES_KEY, (Serializable) uV.getUserRoles()); |
userSession.serialize(request,response); |
userSession.serialize(request,response); |
return mapping.findForward("load"); |
} |
catch(FilterChainFailedException e) |
124,6 → 124,10 |
List<UserView> uVs = (List<UserView>) sm.execute(RequestUtils.getRequester(request, response),"SearchUser",args,names); |
profileForm.setUsersFind(uVs); |
request.setAttribute("ProfileForm",profileForm); |
if(uVs.size()!=0) |
addMessage(request,"profile.search.user.find",""+uVs.size()); |
else |
addMessage(request,"profile.search.user.not.find"); |
return mapping.findForward("search"); |
} |
catch(FilterChainFailedException e) |
/impl/src/java/pt/estgp/estgweb/web/controllers/blogs/LoadBlogController.java |
---|
New file |
0,0 → 1,56 |
package pt.estgp.estgweb.web.controllers.blogs; |
import org.apache.log4j.Logger; |
import org.apache.struts.action.ActionForm; |
import org.apache.struts.action.ActionForward; |
import org.apache.struts.action.ActionMapping; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.web.controllers.ApplicationController; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
import pt.utl.ist.berserk.logic.serviceManager.exceptions.FilterChainFailedException; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
/** |
* @author Jorge Machado |
* @date 26/Fev/2008 |
* @time 18:01:54 |
* @see pt.estgp.estgweb.web |
*/ |
public class LoadBlogController extends ApplicationController |
{ |
private static final Logger logger = Logger.getLogger(LoadBlogController.class); |
public ActionForward execute(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
try |
{ |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{Long.parseLong(request.getParameter("id"))}; |
BlogView bV = (BlogView) sm.execute(RequestUtils.getRequester(request, response), "LoadBlog", args, names); |
request.setAttribute("BlogView", bV); |
return mapping.findForward("success"); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
return mapping.findForward("error500"); |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/controllers/blogs/BlogsController.java |
---|
25,7 → 25,8 |
* @time 18:01:54 |
* @see pt.estgp.estgweb.web |
*/ |
public class BlogsController extends AddRolesController { |
public class BlogsController extends AddRolesController |
{ |
private static final Logger logger = Logger.getLogger(BlogsController.class); |
33,21 → 34,26 |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable, ServletException { |
try { |
throws Throwable, ServletException |
{ |
try |
{ |
BlogForm blogForm = (BlogForm) form; |
if (blogForm.getBlogView().getId() <= 0) { |
if (blogForm.getBlogView().getId() <= 0) |
{ |
Blog blog = DomainObjectFactory.createBlogImpl(); |
blogForm.getBlogView().persistViewInObject(blog); |
IServiceManager sm = ServiceManager.getInstance(); |
if (blogForm.getImage().getFileSize() != 0) { |
if (blogForm.getImage().getFileSize() != 0) |
{ |
FormFile image = blogForm.getImage(); |
InputStream stream = image.getInputStream(); |
ByteArrayOutputStream b = new ByteArrayOutputStream(); |
int readedBytes; |
byte[] buf = new byte[1024]; |
while ((readedBytes = stream.read(buf)) > 0) { |
while ((readedBytes = stream.read(buf)) > 0) |
{ |
b.write(buf, 0, readedBytes); |
} |
b.close(); |
66,7 → 72,9 |
addMessage(request, "blog.created.success", "" + bV.getId()); |
request.setAttribute("BlogView", bV); |
return mapping.findForward("success"); |
} else { |
} |
else |
{ |
BlogView bV = blogForm.getBlogView(); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"object"}; |
76,36 → 84,14 |
return mapping.findForward("success"); |
} |
} |
catch (FilterChainFailedException e) { |
return mapping.findForward("error401"); |
} |
catch (Throwable e) { |
logger.error(e, e); |
throw e; |
} |
} |
public ActionForward load(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable, ServletException { |
try |
catch (FilterChainFailedException e) |
{ |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{Long.parseLong(request.getParameter("id"))}; |
BlogView bV = (BlogView) sm.execute(RequestUtils.getRequester(request, response), "LoadBlog", args, names); |
request.setAttribute("BlogView", bV); |
return mapping.findForward("success"); |
} |
catch (FilterChainFailedException e) { |
return mapping.findForward("error401"); |
} |
catch (Throwable e) { |
catch (Throwable e) |
{ |
logger.error(e, e); |
throw e; |
} |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/filters/UrlStatFilter.java |
---|
22,8 → 22,7 |
import jomm.utils.MyCalendar; |
/** |
* |
* @author Jorge Machado |
* @author Jorge Machado |
*/ |
public class UrlStatFilter implements Filter |
31,20 → 30,19 |
private static Logger logger = Logger.getLogger(UrlStatFilter.class); |
public static List<String> ignoreEstensions = ConfigProperties.getListValues("url.stat.ignore.extension"); |
public static List<String> ignorePrefixs = ConfigProperties.getListValues("url.stat.ignore.prefix"); |
public static MyCalendar myCalendar = new MyCalendar(); |
public static int day = myCalendar.getDay(); |
public static int month = myCalendar.getMonth(); |
public static int year = myCalendar.getYear(); |
public static final int MAX_MAP_SYZE = 4; |
public static final List<String> URL_STAT_IGNORE_EXTENSIONS = Globals.URL_STAT_IGNORE_EXTENSIONS; |
public static final List<String> URL_STAT_IGNORE_PREFIXS = Globals.URL_STAT_IGNORE_PREFIXS; |
public static final int URL_STAT_CACHE_SIZE = Globals.URL_STAT_CACHE_SIZE; |
public static final long URL_STAT_CACHE_TIMEOUT = Globals.URL_STAT_CACHE_TIMEOUT; |
public static final long SAVE_INTERVAL = 30 * 60 * 1000; |
public static long lastUpdate = new Date().getTime(); |
public static HashMap<String, IntegerContainer> urlStat = new HashMap<String,IntegerContainer>(); |
public static HashMap<String, IntegerContainer> urlStat = new HashMap<String, IntegerContainer>(); |
public UrlStatFilter() |
{ |
56,12 → 54,10 |
} |
/** |
* |
* @param request The servlet request we are processing |
* @param chain The filter chain we are processing |
* |
* @exception java.io.IOException if an input/output error occurs |
* @exception javax.servlet.ServletException if a servlet error occurs |
* @param chain The filter chain we are processing |
* @throws java.io.IOException if an input/output error occurs |
* @throws javax.servlet.ServletException if a servlet error occurs |
*/ |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) |
throws IOException, ServletException |
72,16 → 68,16 |
UserSessionImpl userSession = (UserSessionImpl) request.getAttribute(Globals.USER_SESSION_KEY); |
MyCalendar c = new MyCalendar(); |
int nowDay = c.getDay(); |
if(nowDay != day || (c.getTimeInMillis() - lastUpdate > SAVE_INTERVAL)) |
if (nowDay != day || (c.getTimeInMillis() - lastUpdate > URL_STAT_CACHE_TIMEOUT)) |
{ |
try |
{ |
updateStats(hrequest, hresponse,c.getTimeInMillis()); |
updateStats(hrequest, hresponse, c.getTimeInMillis()); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
((HttpServletResponse)response).sendError(500); |
logger.error(e, e); |
((HttpServletResponse) response).sendError(500); |
} |
} |
90,92 → 86,92 |
year = c.getYear(); |
String relativePath = hrequest.getServletPath(); |
if(relativePath == null) |
if (relativePath == null) |
relativePath = ""; |
if(hrequest.getPathInfo() != null && hrequest.getPathInfo().length() > 0) |
if (hrequest.getPathInfo() != null && hrequest.getPathInfo().length() > 0) |
{ |
relativePath += hrequest.getPathInfo(); |
} |
for(String ignore: ignoreEstensions) |
for (String ignore : URL_STAT_IGNORE_EXTENSIONS) |
{ |
if(relativePath.endsWith(ignore)) |
if (relativePath.endsWith(ignore)) |
{ |
chain.doFilter(request,response); |
chain.doFilter(request, response); |
return; |
} |
} |
if(hrequest.getQueryString() != null && hrequest.getQueryString().length() > 0) |
if (hrequest.getQueryString() != null && hrequest.getQueryString().length() > 0) |
relativePath += "?" + hrequest.getQueryString(); |
for(String ignore: ignorePrefixs) |
for (String ignore : URL_STAT_IGNORE_PREFIXS) |
{ |
if(relativePath.startsWith(ignore)) |
if (relativePath.startsWith(ignore)) |
{ |
chain.doFilter(request,response); |
chain.doFilter(request, response); |
return; |
} |
} |
if(userSession != null) |
if (userSession != null) |
{ |
if(userSession.get(relativePath) != null) |
if (userSession.get(relativePath) != null) |
{ |
chain.doFilter(request,response); |
chain.doFilter(request, response); |
return; |
} |
userSession.put(relativePath,""); |
userSession.put(relativePath, ""); |
try |
{ |
userSession.serialize(hrequest,(HttpServletResponse)response); |
userSession.serialize(hrequest, (HttpServletResponse) response); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
((HttpServletResponse)response).sendError(500); |
logger.error(e, e); |
((HttpServletResponse) response).sendError(500); |
return; |
} |
} |
logger.info("accessing " + relativePath); |
IntegerContainer count = urlStat.get(relativePath); |
if(count == null) |
if (count == null) |
{ |
try |
{ |
createUrl(hrequest,((HttpServletResponse)response),c.getTimeInMillis(),relativePath); |
createUrl(hrequest, ((HttpServletResponse) response), c.getTimeInMillis(), relativePath); |
} |
catch (Throwable e) |
{ |
logger.error(e,e); |
((HttpServletResponse)response).sendError(500); |
logger.error(e, e); |
((HttpServletResponse) response).sendError(500); |
} |
} |
else |
{ |
count.inc(); |
} |
chain.doFilter(request,response); |
chain.doFilter(request, response); |
} |
public static synchronized void updateStats(HttpServletRequest request,HttpServletResponse response, long nowMiliseconds) throws Throwable, InvalidFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException |
public static synchronized void updateStats(HttpServletRequest request, HttpServletResponse response, long nowMiliseconds) throws Throwable, InvalidFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException |
{ |
lastUpdate = nowMiliseconds; |
IServiceManager sm = ServiceManager.getInstance(); |
Object[] args = new Object[]{urlStat,year,month,day}; |
sm.execute(RequestUtils.getRequester(request, response),"UpdateUrlStatistics",args); |
Object[] args = new Object[]{urlStat, year, month, day}; |
sm.execute(RequestUtils.getRequester(request, response), "UpdateUrlStatistics", args); |
urlStat.clear(); |
urlStat = null; |
urlStat = new HashMap<String,IntegerContainer>(); |
urlStat = new HashMap<String, IntegerContainer>(); |
} |
public static synchronized void createUrl(HttpServletRequest request,HttpServletResponse response, long nowMiliseconds, String relativePath) throws Throwable, ClassNotIFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException |
public static synchronized void createUrl(HttpServletRequest request, HttpServletResponse response, long nowMiliseconds, String relativePath) throws Throwable, ClassNotIFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException |
{ |
if(urlStat.size() >= MAX_MAP_SYZE) |
updateStats(request,response,nowMiliseconds); |
if (urlStat.size() >= URL_STAT_CACHE_SIZE) |
updateStats(request, response, nowMiliseconds); |
urlStat.put(relativePath, new IntegerContainer(1)); |
} |
188,7 → 184,8 |
{ |
int i; |
public void setI(int i) { |
public void setI(int i) |
{ |
this.i = i; |
} |
/impl/src/java/pt/estgp/estgweb/web/FTPProxy.java |
---|
99,7 → 99,12 |
List<IFile> iFiles = new ArrayList<IFile>(); |
for(FTPFile ftpFile : files) |
{ |
IFile iFile = new FtpFile(ftpFile,server + path + "/" + ftpFile.getName(),path); |
IFile iFile; |
if(path.endsWith("/")) |
iFile = new FtpFile(ftpFile,server + path + ftpFile.getName(),path); |
else |
iFile = new FtpFile(ftpFile,server + path + "/" + ftpFile.getName(),path); |
iFiles.add(iFile); |
} |
request.setAttribute("files",iFiles); |
/impl/src/java/pt/estgp/estgweb/web/tags/IsAdminTag.java |
---|
21,7 → 21,7 |
public int doEndTag() throws JspException { |
UserSessionImpl userSession = (UserSessionImpl) pageContext.getRequest().getAttribute(Globals.USER_SESSION_KEY); |
if(userSession!=null && userSession.getUser() !=null && (((UserImpl)userSession.getUser()).hasRole(Globals.ADMIN_ROLE) || ((UserImpl)userSession.getUser()).isSuperuser())) |
if(userSession != null && userSession.getUser() != null && (((UserImpl)userSession.getUser()).isSuperuserOrAdmin())) |
{ |
String toPage = bodyContent.getString().trim(); |
JspWriter writer = pageContext.getOut(); |
/impl/src/java/pt/estgp/estgweb/web/tags/CanAddContentTag.java |
---|
New file |
0,0 → 1,71 |
package pt.estgp.estgweb.web.tags; |
import org.apache.log4j.Logger; |
import org.apache.struts.util.RequestUtils; |
import javax.servlet.jsp.tagext.BodyTagSupport; |
import javax.servlet.jsp.JspException; |
import javax.servlet.jsp.JspWriter; |
import pt.estgp.estgweb.domain.*; |
public class CanAddContentTag extends BodyTagSupport |
{ |
private static final Logger logger = Logger.getLogger(CanAddContentTag.class); |
private String name; |
private String property; |
public String getName() |
{ |
return name; |
} |
public void setName(String name) |
{ |
this.name = name; |
} |
public String getProperty() |
{ |
return property; |
} |
public void setProperty(String property) |
{ |
this.property = property; |
} |
public int doStartTag() throws JspException |
{ |
return EVAL_BODY_TAG; |
} |
public int doEndTag() throws JspException |
{ |
UserSessionImpl userSession = (UserSessionImpl) pageContext.getRequest().getAttribute(pt.estgp.estgweb.Globals.USER_SESSION_KEY); |
IAddContents iAddContents = (IAddContents) RequestUtils.lookup(pageContext, name, property, null); |
if(iAddContents != null && userSession.getUser() != null && (iAddContents.canAddContent(userSession.getUser()))) |
{ |
String toPage = bodyContent.getString().trim(); |
JspWriter writer = pageContext.getOut(); |
try |
{ |
writer.write(toPage); |
} |
catch(Exception e) |
{ |
logger.error(e,e); |
throw new JspException(e); |
} |
} |
// Continue processing this page |
return EVAL_PAGE; |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/tags/IsNotAdminTag.java |
---|
10,19 → 10,23 |
import pt.estgp.estgweb.domain.UserImpl; |
import pt.estgp.estgweb.Globals; |
public class IsNotAdminTag extends BodyTagSupport { |
public class IsNotAdminTag extends BodyTagSupport |
{ |
private static final Logger logger = Logger.getLogger(IsNotAdminTag.class); |
public int doStartTag() throws JspException { |
public int doStartTag() throws JspException |
{ |
return EVAL_BODY_TAG; |
} |
public int doEndTag() throws JspException { |
public int doEndTag() throws JspException |
{ |
UserSessionImpl userSession = (UserSessionImpl) pageContext.getRequest().getAttribute(Globals.USER_SESSION_KEY); |
if(userSession == null || userSession.getUser() == null) |
if (!(userSession != null && userSession.getUser() != null && (((UserImpl) userSession.getUser()).isSuperuserOrAdmin()))) |
{ |
String toPage = bodyContent.getString().trim(); |
JspWriter writer = pageContext.getOut(); |
30,27 → 34,12 |
{ |
writer.write(toPage); |
} |
catch(Exception e) |
catch (Exception e) |
{ |
logger.error(e,e); |
logger.error(e, e); |
throw new JspException(e); |
} |
} |
else if(!(((UserImpl)userSession.getUser()).hasRole(Globals.ADMIN_ROLE)) && !((UserImpl)userSession.getUser()).isSuperuser()) |
{ |
String toPage = bodyContent.getString().trim(); |
JspWriter writer = pageContext.getOut(); |
try |
{ |
writer.write(toPage); |
} |
catch(Exception e) |
{ |
logger.error(e,e); |
throw new JspException(e); |
} |
} |
// Continue processing this page |
return EVAL_PAGE; |
} |
/impl/src/java/pt/estgp/estgweb/web/tags/CanManageTag.java |
---|
55,7 → 55,7 |
{ |
//do nothing |
} |
else if(owned != null && userSession.getUser() != null && (owned.isOwnedBy(userSession.getUser()) || ((UserImpl) userSession.getUser()).isSuperUserOrAdmin())) |
else if(owned != null && userSession.getUser() != null && (owned.isOwnedBy(userSession.getUser()) || ((UserImpl) userSession.getUser()).isSuperuserOrAdmin())) |
{ |
String toPage = bodyContent.getString().trim(); |
JspWriter writer = pageContext.getOut(); |
/impl/src/java/pt/estgp/estgweb/web/tags/PageUrlStatTag.java |
---|
9,7 → 9,6 |
import javax.servlet.jsp.JspWriter; |
import javax.servlet.http.HttpServletRequest; |
import pt.estgp.estgweb.domain.UserSessionImpl; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.web.filters.UrlStatFilter; |
39,7 → 38,7 |
HttpServletRequest hrequest = (HttpServletRequest) pageContext.getRequest(); |
String relativePath = (String) hrequest.getAttribute(Globals.ACTUAL_RELATIVE_PATH); |
for(String ignore: UrlStatFilter.ignorePrefixs) |
for(String ignore: UrlStatFilter.URL_STAT_IGNORE_PREFIXS) |
{ |
if(relativePath.startsWith(ignore)) |
{ |
/impl/src/hbm/pt/estgp/estgweb/domain/GenericUser.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.GenericUser" table="user" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
15,62 → 15,64 |
<property name="saveDate" type="timestamp"/> |
<property name="superuser" type="boolean"/> |
<property name="name" type="string"/> |
<subclass name="pt.estgp.estgweb.domain.Group"> |
<meta attribute="scope-class">public abstract</meta> |
<set name="users" table="group_users"> |
<key column="group_id"/> |
<many-to-many column="user_id" class="pt.estgp.estgweb.domain.User"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.GroupImpl" discriminator-value="GroupImpl"/> |
</subclass> |
<subclass name="pt.estgp.estgweb.domain.User"> |
<meta attribute="scope-class">public abstract</meta> |
<property name="username" type="string" unique="true" length="50"/> |
<property name="password" type="string"/> |
<property name="roles" type="text"/> |
<property name="address" type="text"/> |
<property name="zip" type="string"/> |
<property name="country" type="string"/> |
<property name="email" type="string"/> |
<property name="outEmail" type="string"/> |
<property name="phonenumber" type="string"/> |
<property name="sex" type="string"/> |
<property name="bi" type="string"/> |
<property name="birthDate" type="date"/> |
<set name="groups" table="group_users"> |
<key column="user_id"/> |
<many-to-many column="group_id" class="pt.estgp.estgweb.domain.Group"/> |
</set> |
<set name="courses" order-by="course.name asc" lazy="true"> |
<key column="user_id"/> |
<one-to-many class="pt.estgp.estgweb.domain.CourseUserAssociation"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.UserImpl" discriminator-value="UserImpl"> |
<subclass name="pt.estgp.estgweb.domain.UserManagedRoleImpl"> |
<subclass name="pt.estgp.estgweb.domain.Student"> |
<meta attribute="extends">pt.estgp.estgweb.domain.UserManagedRoleImpl</meta> |
<meta attribute="scope-class">public abstract</meta> |
<property name="sigesCode" type="int"/> |
<property name="userNameNetpa" type="string"/> |
<set name="subscribedUnits" lazy="true"> |
<key column="studentId"/> |
<many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.StudentImpl" discriminator-value="StudentImpl"/> |
<property name="roles" type="string"/> |
<subclass name="pt.estgp.estgweb.domain.GenericUserImpl"> |
<subclass name="pt.estgp.estgweb.domain.Group"> |
<meta attribute="scope-class">public abstract</meta> |
<set name="users" table="group_users"> |
<key column="group_id"/> |
<many-to-many column="user_id" class="pt.estgp.estgweb.domain.User"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.GroupImpl" discriminator-value="GroupImpl"/> |
</subclass> |
<subclass name="pt.estgp.estgweb.domain.User"> |
<meta attribute="scope-class">public abstract</meta> |
<property name="username" type="string" unique="true" length="50"/> |
<property name="password" type="string"/> |
<property name="address" type="text"/> |
<property name="zip" type="string"/> |
<property name="country" type="string"/> |
<property name="email" type="string"/> |
<property name="outEmail" type="string"/> |
<property name="phonenumber" type="string"/> |
<property name="sex" type="string"/> |
<property name="bi" type="string"/> |
<property name="birthDate" type="date"/> |
<set name="groups" table="group_users" lazy="false"> |
<key column="user_id"/> |
<many-to-many column="group_id" class="pt.estgp.estgweb.domain.Group"/> |
</set> |
<set name="courses" order-by="course.name asc" lazy="true"> |
<key column="user_id"/> |
<one-to-many class="pt.estgp.estgweb.domain.CourseUserAssociation"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.UserImpl" discriminator-value="UserImpl"> |
<subclass name="pt.estgp.estgweb.domain.UserManagedRoleImpl"> |
<subclass name="pt.estgp.estgweb.domain.Student"> |
<meta attribute="extends">pt.estgp.estgweb.domain.UserManagedRoleImpl</meta> |
<meta attribute="scope-class">public abstract</meta> |
<property name="sigesCode" type="int"/> |
<property name="userNameNetpa" type="string"/> |
<set name="subscribedUnits" lazy="true"> |
<key column="studentId"/> |
<many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.StudentImpl" discriminator-value="StudentImpl"/> |
</subclass> |
<subclass name="pt.estgp.estgweb.domain.Teacher"> |
<meta attribute="extends">pt.estgp.estgweb.domain.UserManagedRoleImpl</meta> |
<meta attribute="scope-class">public abstract</meta> |
<property name="sigesCode" type="int"/> |
<property name="userNameNetpa" type="string"/> |
<property name="academicName" type="string"/> |
<property name="employerName" type="string"/> |
<set name="teachedUnits" lazy="true"> |
<key column="studentId"/> |
<many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.TeacherImpl" discriminator-value="TeacherImpl"/> |
</subclass> |
</subclass> |
<subclass name="pt.estgp.estgweb.domain.Teacher"> |
<meta attribute="extends">pt.estgp.estgweb.domain.UserManagedRoleImpl</meta> |
<meta attribute="scope-class">public abstract</meta> |
<property name="sigesCode" type="int"/> |
<property name="userNameNetpa" type="string"/> |
<property name="academicName" type="string"/> |
<property name="employerName" type="string"/> |
<set name="teachedUnits" lazy="true"> |
<key column="studentId"/> |
<many-to-many class="pt.estgp.estgweb.domain.CourseUnit" column="courseUnitId"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.TeacherImpl" discriminator-value="TeacherImpl"/> |
</subclass> |
</subclass> |
</subclass> |
</subclass> |
/impl/src/hbm/pt/estgp/estgweb/domain/CourseUserAssociation.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.CourseUserAssociation" table="course_user_association" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/Course.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.Course" table="course" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/CourseUnit.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.CourseUnit" table="courseUnit" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/Image.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.Image" table="image" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/UserSession.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.UserSession" table="user_session" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="cookie" type="string" length="150"> |
<generator class="assigned"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/Blog.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.Blog" table="blog" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
16,9 → 16,18 |
<property name="title" type="string"/> |
<property name="description" type="text"/> |
<property name="targetRoles" type="string"/> |
<property name="internal" type="boolean"/> |
<property name="status" type="boolean" /> |
<many-to-one name="image" column="image" class="pt.estgp.estgweb.domain.Image" lazy="no-proxy" outer-join="false" cascade="all"/> |
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="proxy" outer-join="false"/> |
<subclass name="pt.estgp.estgweb.domain.BlogImpl" discriminator-value="BlogImpl"/> |
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="false" outer-join="true"/> |
<subclass name="pt.estgp.estgweb.domain.BlogImpl" discriminator-value="BlogImpl"> |
<subclass name="pt.estgp.estgweb.domain.CourseUnitBlog"> |
<meta attribute="extends">pt.estgp.estgweb.domain.BlogImpl</meta> |
<meta attribute="scope-class">public abstract</meta> |
<many-to-one name="courseUnit" class="pt.estgp.estgweb.domain.CourseUnit" lazy="proxy" outer-join="false"/> |
<subclass name="pt.estgp.estgweb.domain.CourseUnitBlogImpl" discriminator-value="CourseUnitBlogImpl"/> |
</subclass> |
</subclass> |
</class> |
</hibernate-mapping> |
/impl/src/hbm/pt/estgp/estgweb/domain/Teste.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.Teste" table="teste" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/BlogPost.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.BlogPost" table="blogpost" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/Announcement.hbm.xml |
---|
5,7 → 5,7 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.Announcement" table="announcement" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.OwnedDomainObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<id name="id" type="long"> |
<generator class="native"/> |
31,7 → 31,7 |
<property name="counter" type="integer" /> |
<many-to-one name="bigImage" column="bigImage" class="pt.estgp.estgweb.domain.Image" lazy="no-proxy" outer-join="false" cascade="all" /> |
<many-to-one name="smallImage" column="smallImage" class="pt.estgp.estgweb.domain.Image" lazy="no-proxy" outer-join="false" cascade="all"/> |
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="proxy" outer-join="false"/> |
<many-to-one name="owner" class="pt.estgp.estgweb.domain.GenericUser" lazy="false" outer-join="true"/> |
<subclass name="pt.estgp.estgweb.domain.AnnouncementImpl" discriminator-value="AnnouncementImpl"/> |
</class> |
</hibernate-mapping> |
/impl/src/hbm/pt/estgp/estgweb/domain/SessionObject.hbm.xml |
---|
5,10 → 5,11 |
<hibernate-mapping> |
<class name="pt.estgp.estgweb.domain.SessionObject" table="session_object" abstract="true"> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainObject</meta> |
<meta attribute="extends">pt.estgp.estgweb.domain.DomainSerializableObject</meta> |
<meta attribute="scope-class">public abstract</meta> |
<composite-id name="id" class="pt.estgp.estgweb.domain.SessionObjectId"> |
<meta attribute="scope-class">public</meta> |
<meta attribute="extends"></meta> |
<key-property name="keyId" type="string" column="keyId" length="150"/> |
<key-many-to-one name="userSession" class="pt.estgp.estgweb.domain.UserSession"> |
<column name="cookie"/> |
/impl/src/web/imgs/folder.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/txt.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/gz.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/rar.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/tar.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/htm.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/7zip.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/rtf.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/unknown.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/xml.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/zip.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/ppt.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/html.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/tgz.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/doc.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/xls.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/imgs/mime/pdf.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/admin/profile/findUser.jsp |
---|
23,7 → 23,6 |
</td> |
</tr> |
</table> |
<logic:present name="ProfileForm" property="usersFind"> |
<ul> |
<logic:iterate id="userView" name="ProfileForm" property="usersFind" type="pt.estgp.estgweb.domain.views.UserView"> |
31,4 → 30,5 |
</logic:iterate> |
</ul> |
</logic:present> |
</html:form> |
/impl/src/web/admin/blogs/submitBlog.jsp |
---|
30,6 → 30,17 |
</estgweb:isAdmin> |
<tr> |
<th> |
<bean:message key="blog.internal"/> |
</th> |
<td> |
<html:select property="blogView.internal"> |
<html:option value="true"><bean:message key="announcement.internal.yes"/></html:option> |
<html:option value="false"><bean:message key="announcement.internal.no"/></html:option> |
</html:select> |
</td> |
</tr> |
<tr> |
<th> |
<bean:message key="blog.target.roles"/> |
</th> |
<td> |
/impl/src/web/admin/announcements/submitAnnouncement.jsp |
---|
103,11 → 103,11 |
<logic:present name="AnnouncementsForm" property="selectedRoles"> |
<logic:notEmpty name="AnnouncementsForm" property="selectedRoles"> |
<ul> |
<table> |
<logic:iterate id="item" name="AnnouncementsForm" property="selectedRoles"> |
<li><jomm:message patternMessage="user.role.{0}" name0="item"/><input type="button" value="<bean:message key="remove"/>" onclick="AnnouncementsForm.role.value='${item}';set(this.form,'removeRole');this.form.submit();"></li> |
<tr><td><jomm:message patternMessage="user.role.{0}" name0="item"/></td><td><input type="button" value="<bean:message key="remove"/>" onclick="AnnouncementsForm.role.value='${item}';set(this.form,'removeRole');this.form.submit();"></td></tr> |
</logic:iterate> |
</ul> |
</table> |
</logic:notEmpty> |
</logic:present> |
</td> |
164,8 → 164,14 |
<td> |
<html:select property="announcementView.style"> |
<html:option value="announcement.style.img.left"><bean:message key="announcement.style.img.left"/></html:option> |
<html:option value="announcement.style.img.left.top"><bean:message key="announcement.style.img.left.top"/></html:option> |
<html:option value="announcement.style.img.left.bottom"><bean:message key="announcement.style.img.left.bottom"/></html:option> |
<html:option value="announcement.style.img.right"><bean:message key="announcement.style.img.right"/></html:option> |
<html:option value="announcement.style.img.right.top"><bean:message key="announcement.style.img.right.top"/></html:option> |
<html:option value="announcement.style.img.right.bottom"><bean:message key="announcement.style.img.right.bottom"/></html:option> |
<html:option value="announcement.style.img.top"><bean:message key="announcement.style.img.top"/></html:option> |
<html:option value="announcement.style.img.top.left"><bean:message key="announcement.style.img.top.left"/></html:option> |
<html:option value="announcement.style.img.top.right"><bean:message key="announcement.style.img.top.right"/></html:option> |
<html:option value="announcement.style.img.embedded.left"><bean:message key="announcement.style.img.embedded.left"/></html:option> |
<html:option value="announcement.style.img.embedded.right"><bean:message key="announcement.style.img.embedded.right"/></html:option> |
</html:select> |
/impl/src/web/css/style.css |
---|
1,21 → 1,28 |
|
/*********** Site Struture *************/ |
BODY *, .contentPortal, .contentPortal p, .contentPortal li { |
/*********** Site Struture *************/ |
BODY *, .contentPortal, .contentPortal p, .contentPortal li, div { |
FONT-FAMILY: "bitstream vera sans", Verdana, Arial, Helvetica, sans-serif; |
FONT-SIZE: 11px; |
} |
/****************************Text Size*************************************************/ |
form ul { |
margin-left: 15px; |
} |
UL { |
margin: 0; |
padding: 0; |
} |
h1 { |
font-size: 1.2em; |
margin: 0; |
} |
h2 { |
font-size: 1em; |
margin: 0; |
font-size: 1em; |
} |
.pFooter { |
25,20 → 32,25 |
border-bottom: 1px solid #cccccc; |
text-align: right; |
clear: both; |
margin-top:10px; |
} |
.pFooter a { |
font-style: italic; |
} |
.content .pFooter a:hover |
{ |
color:white; |
} |
#body { |
width: 950px; |
margin-left: auto; |
margin-right: auto; |
} |
#pageStructure { |
border-collapse: collapse; |
LEFT: 0; |
64,8 → 76,7 |
} |
TD.rightPage, TD.rightPagePortal { |
VERTICAL-ALIGN: top; |
/*WIDTH: 160px;*/ |
VERTICAL-ALIGN: top; /*WIDTH: 160px;*/ |
} |
.rightPagePosition { |
75,7 → 86,6 |
PADDING-BOTTOM: 20px; |
} |
/*****************************************************************************************/ |
/************************************** Content Structure ********************************/ |
91,21 → 101,43 |
.content h2 { |
font-size: 1em; |
} |
#pageStructure .content |
{ |
border: 0; |
#pageStructure .content { |
border-right: 0; |
border-top: 0; |
border-bottom: 0; |
border-left: 1px solid #8ec73f; |
margin-right:1px; |
} |
.content .imageAnnouncement img |
{ |
width:341px; |
height:167px; |
#pageStructure td.content { |
border-left: 1px solid #8ec73f; |
border-right: 1px solid #8ec73f; |
border-bottom: 1px solid #8ec73f; |
border-top: 1px solid #8ec73f; |
} |
.content |
#pageStructure td.rightPage { |
border-top: 1px solid #8ec73f; |
} |
.imageAnnouncement img, .imageBlog img |
{ |
border: 1px solid #8ec73f ; |
width: 341px; |
height: 167px; |
} |
.content .imageAnnouncement img { |
width: 341px; |
height: 167px; |
} |
.content { |
border: 1px solid #8ec73f; |
} |
.content a:link, .content a:visited { |
color: #4d4d4d; |
} |
135,12 → 167,19 |
border-bottom: #8EC73F solid 2px; |
} |
.files { |
padding-left: 10px; |
} |
.files ul { |
margin: 0; |
padding: 0; |
} |
/*****************************************************************************************/ |
/************************************* Footer Modules ***********************************/ |
#footer { |
HEIGHT: 50px; |
PADDING-TOP: 5px; |
188,7 → 227,6 |
color: #8EC73F; |
} |
/*********************************************************************************/ |
/****************** topnav **********************/ |
211,13 → 249,13 |
} |
#topnav UL { |
margin-top: 0; |
margin-left: 0; |
PADDING-RIGHT: 0; |
PADDING-LEFT: 0; |
PADDING-BOTTOM: 10px; |
MARGIN: 0; |
WIDTH: 155px; |
LINE-HEIGHT: 1.5em; |
MARGIN-bottom: 2px; |
MARGIN-right: 0; |
PADDING-TOP: 0; |
padding-left: 15px; |
LIST-STYLE-TYPE: none |
} |
230,30 → 268,27 |
PADDING-TOP: 0; |
} |
/***************************************************************** |
* Search Results |
* |
*****************************************************************/ |
* Search Results |
* |
*****************************************************************/ |
#searchResults li h1 { |
background-color: #D6F0B2; |
border-bottom: green 1px solid; |
padding:2px; |
padding: 2px; |
margin-bottom: 10px; |
color:black; |
color: black; |
} |
#searchResults |
{ |
#searchResults { |
padding-left:10px; |
padding-left: 10px; |
} |
#searchResults li a |
{ |
cursor:pointer; |
#searchResults li a { |
cursor: pointer; |
} |
#searchresults div.result { |
264,14 → 299,13 |
padding-bottom: 0; |
} |
#searchResults li .module |
{ |
position:absolute; |
visibility:hidden; |
#searchResults li .module { |
position: absolute; |
visibility: hidden; |
} |
#searchResults li .module .result h2 { |
color: black; |
padding-top: 0; |
margin-top: 10px; |
287,26 → 321,23 |
padding-top: 0; |
} |
#searchResults .googleLogo |
{ |
float:right; |
#searchResults .googleLogo { |
float: right; |
} |
#searchResults .googleLogo td |
{ |
vertical-align:middle; |
#searchResults .googleLogo td { |
vertical-align: middle; |
color: #676767; |
text-align: right; |
font-size: 11px; |
margin-right: 2px; |
} |
#searchResults .googleLogo td img |
{ |
#searchResults .googleLogo td img { |
padding-top: 3px; |
} |
/*************************************************************************************/ |
/*****************************Portal Page Template************************************/ |
360,15 → 391,13 |
} |
.portalLeftAnnouncements table { |
table-layout: fixed; |
/*width: 180px;*/ |
table-layout: fixed; /*width: 180px;*/ |
padding-top: 10px; |
font-size: 0.8em; |
} |
.portalRightAnnouncements table { |
table-layout: fixed; |
/*width: 250px;*/ |
table-layout: fixed; /*width: 250px;*/ |
font-size: 0.8em; |
} |
395,17 → 424,11 |
padding-left: 10px; |
} |
#portalMenu li.selected a { |
color: #8EC73F; |
} |
/********************************************************************************** |
* TEMPLATES ESPECIFICOS: |
* |
445,30 → 468,35 |
color: #8EC73F; |
} |
.listClean UL /*Lista sem nada*/ |
.listClean UL, .files UL /*Lista sem nada*/ |
{ |
LIST-STYLE-TYPE: none; |
padding: 0; |
margin-left: 5px; |
} |
.listCircleWhite UL /*Lista circulo branco*/ |
{ |
LIST-STYLE-TYPE: circle; |
margin-left: 15px; |
} |
.listDecimal UL /*Lista decimal*/ |
{ |
LIST-STYLE-TYPE: decimal; |
margin-left: 15px; |
} |
.listDisc UL /*Lista circulo preto*/ |
{ |
LIST-STYLE-TYPE: disc; |
margin-left: 15px; |
} |
.listSquare UL /*Lista quadrado preto*/ |
{ |
LIST-STYLE-TYPE: square; |
margin-left: 15px; |
} |
.portalLeftAnnouncements img { |
608,58 → 636,57 |
#lastnews li { |
margin: 0; |
padding: 0; |
border-bottom: 1px solid #8ec73f; |
padding-right:3px; |
padding-bottom:0; |
padding-top:0; |
padding-left:3px; |
} |
#lastnews li h2 { |
padding: 0; |
padding-left: 2px; |
margin: 1px; |
} |
#lastnews li h2 a, .linkLeftMenu a { |
#lastnews li a, .linkLeftMenu a { |
text-decoration: none; |
} |
#lastnews li h2 a:link, .linkLeftMenu a:link { |
#lastnews li a:link, .linkLeftMenu a:link { |
color: #4d4d4d; |
} |
#lastnews li h2 a:visited, .linkLeftMenu a:visited { |
#lastnews li a:visited, .linkLeftMenu a:visited { |
color: #4d4d4d; |
} |
#lastnews li h2 a:hover, .linkLeftMenu a:hover { |
#lastnews li a:hover, .linkLeftMenu a:hover { |
color: #8EC73F; |
} |
/**/ |
/*Block Menus*/ |
/*LEFT MENUS*/ |
#leftMenuModule h2 { |
MARGIN: 0; |
color: #8EC73F; |
.linkMenuBlock { |
margin-top: 15px; |
border-left: 1px solid #8ec73f; |
} |
.linkLeftMenu li |
{ |
.linkMenuBlock .linkMenuBlockTitle { |
border-bottom: 1px solid #8ec73f; |
background-color: #8ec73f; |
color: white; |
white-space: nowrap; |
text-align: right; |
padding-right: 2px; |
margin: 0; |
} |
border-bottom:1px solid #8ec73f; |
.linkLeftMenu ul { |
margin: 0; |
} |
.linkLeftMenu li:hover |
{ |
} |
#leftMenuModule UL { |
MARGIN: 0; |
/*WIDTH: 155px;*/ |
} |
.linkLeftMenu UL li |
{ |
width:110px; |
.linkLeftMenu li { |
border-bottom: 1px solid #8ec73f; |
white-space: nowrap; |
padding-right: 3px; |
padding-left: 3px; |
} |
/**************************************************************************************/ |
/******************************** Bar Module Color ************************************/ |
701,17 → 728,11 |
.form th, .boxHorizontal th { |
margin: 0; |
padding-left: 10px; |
padding-top: 3px; |
padding-bottom: 3px; |
padding-right: 15px; |
color: #4d4d4d; |
background-color: #FFFFFF; |
border: 0px solid #793B0D; |
font-size: 0.86em; |
font-weight: bold; |
font-family: Helvetica, sans-serif; |
text-align: left; |
border: 0 solid #793B0D; |
font-weight: normal; |
padding-right: 5px; |
text-align: right; |
} |
.form td, .boxHorizontal td { |
747,11 → 768,10 |
width: 100px; |
} |
.form input.readOnly { |
background-color:#cccccc; |
background-color: #cccccc; |
border-top-width: 1px; |
color:#FFFFFF; |
color: #FFFFFF; |
border-right-width: 1px; |
border-bottom-width: 1px; |
border-left-width: 1px; |
777,7 → 797,7 |
font-size: 1.1em; |
font-weight: bold; |
font-family: Helvetica, sans-serif; |
color: red; |
color: black; |
} |
.seccao .seccao h1 { |
850,8 → 870,8 |
/********************************************** Navigation Menu ********************************/ |
ul.menubar { |
margin: 0px; |
padding: 0px; |
margin: 0; |
padding: 0; |
background-color: #FFFFFF; /* IE6 Bug */ |
font-size: 100%; |
902,43 → 922,35 |
padding-bottom: 2px; |
} |
#menuTop { |
width: 100%; |
} |
#menuTop td.searchTab form { |
text-align: right; |
} |
#menuTop |
{ |
width:100%; |
#menuTop td.searchTab form table td { |
vertical-align: middle; |
} |
#menuTop td.searchTab form |
{ |
text-align:right; |
} |
#menuTop td.searchTab form table td |
{ |
vertical-align:middle; |
} |
#menuTop td.searchTab input[type="text"] |
{ |
width:200px; |
#menuTop td.searchTab input[type="text"] { |
width: 200px; |
} |
#menuTop form td,#menuTop form th |
{ |
#menuTop form td, #menuTop form th { |
font-size: 0.85em; |
} |
#menuTop td.searchTab |
{ |
float:right; |
text-align:left; |
#menuTop td.searchTab { |
float: right; |
text-align: left; |
} |
#menuTop td |
{ |
vertical-align:top; |
#menuTop td { |
vertical-align: top; |
} |
.menu a:hover { |
display: block; |
1019,7 → 1031,7 |
position: absolute; |
display: none; |
left: 149px; /* Set 1px less than menu width */ |
top: 0px; |
top: 0; |
} |
ul.menu li.submenu ul { |
1035,5 → 1047,26 |
} |
/***********************************************************************************************/ |
/*BLOG*/ |
.postHeader |
{ |
clear:both; |
} |
.toolsContainer |
{ |
background-color:#aaaaaa; |
width:100%; |
margin-bottom:5px; |
clear:both; |
} |
.tools |
{ |
text-align:right; |
padding:2px; |
} |
.tools a:hover |
{ |
color:white; |
} |
/impl/src/web/js/functions.js |
---|
1,6 → 1,5 |
function set(form, value){ |
function set(form, value) |
{ |
form.dispatch.value = value; |
} |
31,3 → 30,30 |
return(new Date(f.DateLastModified).getDate()); |
} |
function horizontal() |
{ |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i = 0; i < navItems.length; i++) |
{ |
if (navItems[i].className == "submenu") |
{ |
if (navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover = function() |
{ |
this.getElementsByTagName('ul')[0].style.display = "block"; |
this.style.backgroundColor="#cccccc"; |
} |
navItems[i].onmouseout = function() |
{ |
this.getElementsByTagName('ul')[0].style.display = "none"; |
this.style.backgroundColor=""; |
} |
} |
} |
} |
} |
/impl/src/web/layout/layout1.jsp |
---|
1,35 → 1,22 |
<%@page contentType="text/html"%> |
<%@page pageEncoding="UTF-8"%> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<%@ page contentType="text/html" %> |
<%@ page pageEncoding="UTF-8" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<html:html locale="true"> |
<head> |
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/> <%=request.getParameter("title")%></title> |
<title> |
<bean:message key="site.title"/> |
- |
<tiles:getAsString name="title"/> |
<%=request.getParameter("title")%> |
</title> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" |
onload="horizontal();"> |
<table width="100%"> |
<tr> |
<td align="center"> |
39,15 → 26,17 |
</div> |
<table class="pageDefault"> |
<tr> |
<td colspan="2"><tiles:insert attribute="navigationTop"/></td> |
<td colspan="2"> |
<tiles:insert attribute="navigationTop"/> |
</td> |
</tr> |
<tr> |
<td id="leftPage"> |
<tiles:insert attribute="navigation" /> |
<tiles:insert attribute="navigation"/> |
</td> |
<td class="content"> |
<tiles:insert attribute="topnav"/> |
<tiles:insert attribute="body" /> |
<tiles:insert attribute="body"/> |
</td> |
</tr> |
</table> |
/impl/src/web/layout/layout2.jsp |
---|
9,25 → 9,7 |
<head> |
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<table width="100%"> |
/impl/src/web/layout/layoutPortal.jsp |
---|
9,25 → 9,7 |
<head> |
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
/impl/src/web/layout/navigationLeftMenu.jsp |
---|
5,23 → 5,22 |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<div id="leftMenuModule"> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<li> |
<a href="<%=request.getContextPath()%>/student.do?role=student&menu=menu.alunos"><bean:message key="menu.alunos"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/futureStudent.do?role=futureStudent&menu=menu.futurosAlunos"><bean:message key="menu.futurosAlunos"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/oldStudent.do?role=oldStudent&menu=menu.antigosAlunos"><bean:message key="menu.antigosAlunos"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/teacher.do?role=teacher&menu=menu.docentes"><bean:message key="menu.docentes"/></a> |
</li> |
</ul> |
</div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<li> |
<a href="<%=request.getContextPath()%>/student.do?role=student&menu=menu.alunos"><bean:message key="menu.alunos"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/futureStudent.do?role=futureStudent&menu=menu.futurosAlunos"><bean:message key="menu.futurosAlunos"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/oldStudent.do?role=oldStudent&menu=menu.antigosAlunos"><bean:message key="menu.antigosAlunos"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/teacher.do?role=teacher&menu=menu.docentes"><bean:message key="menu.docentes"/></a> |
</li> |
</ul> |
</div> |
</div> |
/impl/src/web/layout/layout3.jsp |
---|
9,25 → 9,7 |
<head> |
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<table width="100%"> |
/impl/src/web/layout/layout4.jsp |
---|
9,24 → 9,7 |
<head> |
<title><bean:message key="site.title"/> - <tiles:getAsString name="title"/></title> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
/impl/src/web/layout/topnav.jsp |
---|
1,29 → 1,33 |
<%@page contentType="text/html"%> |
<%@page pageEncoding="UTF-8"%> |
<%@page import="java.util.*"%> |
<%@page import="jomm.web.utils.NavPlace"%> |
<%@page import="jomm.utils.MessageResources"%> |
<%@ page contentType="text/html" %> |
<%@ page pageEncoding="UTF-8" %> |
<%@ page import="java.util.*" %> |
<%@ page import="jomm.web.utils.NavPlace" %> |
<%@ page import="jomm.utils.MessageResources" %> |
<%@ page import="jomm.web.utils.NavPlaceServer" %> |
<%@ page import="jomm.web.utils.TopNav" %> |
<ul id="topnav"> |
<% |
TopNav topNav = NavPlaceServer.getTopNav(request); |
List<NavPlace> navKeys = topNav.getNavPlaces(); |
for (NavPlace navPlace : navKeys) |
<div id="topnav"> |
<ul> |
<% |
TopNav topNav = NavPlaceServer.getTopNav(request); |
List<NavPlace> navKeys = topNav.getNavPlaces(); |
for (NavPlace navPlace : navKeys) |
{ |
if (navPlace.getUrl() != null) |
{ |
%> |
<li class="navPlace"><a |
href="<%=request.getContextPath() + navPlace.getUrl()%>"><%=navPlace.getMessage(request)%> |
</a> ></li> |
<% |
} |
else |
{ |
if (navPlace.getUrl() != null) { |
%> |
<li class="navPlace"><a |
href="<%=request.getContextPath() + navPlace.getUrl()%>"><%=navPlace.getMessage(request)%> |
</a> ></li> |
<% |
} |
else { |
%> |
<li class="navPlace"><%=navPlace.getMessage(request)%> |
</li> |
<% |
%> |
<li class="navPlace"><%=navPlace.getMessage(request)%> |
</li> |
<% |
} |
} |
} |
%> |
</ul> |
%> |
</ul> |
</div> |
/impl/src/web/layout/navigationLeft.jsp |
---|
1,10 → 1,10 |
<%@ page contentType="text/html; charset=UTF-8" language="java"%> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<%@ page contentType="text/html; charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<div id="leftPagePosition"> |
<%--ANONIMOUS MENUS--%> |
12,41 → 12,75 |
<jsp:include page="/layout/navigationLeftMenu.jsp"/> |
<%-- USER MENUS--%> |
<div id="leftMenuModule"> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<estgweb:isAuthenticated> |
<%--SERVICES--%> |
<estgweb:isAuthenticated> |
<%--SERVICES--%> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"> |
<bean:message key="services"/> |
</div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<h2><bean:message key="services"/></h2> |
<li> |
<html:link action="/startEditProfile"><bean:message key="edit.profile"/></html:link> |
<html:link action="/startEditProfile"> |
<bean:message key="edit.profile"/> |
</html:link> |
</li> |
<li> |
<html:link action="/startSubmitAnnouncement"><bean:message key="submit.announcement"/></html:link> |
<html:link action="/startSubmitAnnouncement"> |
<bean:message key="submit.announcement"/> |
</html:link> |
</li> |
<li> |
<html:link action="/startSubmitBlog"><bean:message key="submit.blog"/></html:link> |
<html:link action="/startSubmitBlog"> |
<bean:message key="submit.blog"/> |
</html:link> |
</li> |
<estgweb:isAdmin> |
<h2><bean:message key="administrative.services"/></h2> |
</ul> |
</div> |
</div> |
</div> |
<estgweb:isAdmin> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"> |
<bean:message key="administrative.services"/> |
</div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<li> |
<html:link action="/findProfile"><bean:message key="edit.user.profile"/></html:link> |
<html:link action="/findProfile"> |
<bean:message key="edit.user.profile"/> |
</html:link> |
</li> |
</estgweb:isAdmin> |
<!--OTHER PLACES--> |
<h2><bean:message key="Others"/></h2> |
</ul> |
</div> |
</div> |
</div> |
</estgweb:isAdmin> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"> |
<bean:message key="Others"/> |
</div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<!--OTHER PLACES--> |
<ul> |
<li> |
<html:link action="/user/startCourses"><bean:message key="courses"/></html:link> |
<html:link action="/user/startCourses"> |
<bean:message key="courses"/> |
</html:link> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layout4/estgp/">ESTG SITE TESTE</a> |
</li> |
</ul> |
</estgweb:isAuthenticated> |
</div> |
</div> |
</div> |
</div> |
</estgweb:isAuthenticated> |
</div> |
/impl/src/web/layout/navigationCourse.jsp |
---|
11,54 → 11,62 |
<jsp:include page="/layout/navigationLeftAdmin.jsp"/> |
<p><bean:message key="courses"/></p> |
<ul> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.AA/AnoLectivo.2007-2008/"><bean:message key="course.aa"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.APM/AnoLectivo.2007-2008/"><bean:message key="course.apm"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.Bio/AnoLectivo.2007-2008/"><bean:message key="course.bio"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.CA/AnoLectivo.2007-2008/"><bean:message key="course.ca"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.DAM/AnoLectivo.2007-2008/"><bean:message key="course.dam"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.DC/AnoLectivo.2007-2008/"><bean:message key="course.dc"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.DCTG/AnoLectivo.2007-2008/"><bean:message key="course.dam"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EC/AnoLectivo.2007-2008/"><bean:message key="course.ec"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EEM/AnoLectivo.2007-2008/"><bean:message key="course.eem"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EERA/AnoLectivo.2007-2008/"><bean:message key="course.eera"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EI/AnoLectivo.2007-2008/"><bean:message key="course.ei"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.GE/AnoLectivo.2007-2008/"><bean:message key="course.ge"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.Gest/AnoLectivo.2007-2008/"><bean:message key="course.gest"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.ID/AnoLectivo.2007-2008/"><bean:message key="course.id"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.MKT/AnoLectivo.2007-2008/"><bean:message key="course.mkt"/></a> |
</li> |
</ul> |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"> |
<bean:message key="courses"/> |
</div> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.AA/AnoLectivo.2007-2008/"><bean:message key="course.aa"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.APM/AnoLectivo.2007-2008/"><bean:message key="course.apm"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.Bio/AnoLectivo.2007-2008/"><bean:message key="course.bio"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.CA/AnoLectivo.2007-2008/"><bean:message key="course.ca"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.DAM/AnoLectivo.2007-2008/"><bean:message key="course.dam"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.DC/AnoLectivo.2007-2008/"><bean:message key="course.dc"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.DCTG/AnoLectivo.2007-2008/"><bean:message key="course.dam"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EC/AnoLectivo.2007-2008/"><bean:message key="course.ec"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EEM/AnoLectivo.2007-2008/"><bean:message key="course.eem"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EERA/AnoLectivo.2007-2008/"><bean:message key="course.eera"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.EI/AnoLectivo.2007-2008/"><bean:message key="course.ei"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.GE/AnoLectivo.2007-2008/"><bean:message key="course.ge"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.Gest/AnoLectivo.2007-2008/"><bean:message key="course.gest"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.ID/AnoLectivo.2007-2008/"><bean:message key="course.id"/></a> |
</li> |
<li> |
<a href="<%=request.getContextPath()%>/proxy/layoutCourses/ionline/Curso.MKT/AnoLectivo.2007-2008/"><bean:message key="course.mkt"/></a> |
</li> |
</ul> |
</div> |
</div> |
</div> |
</div> |
/impl/src/web/layout/navigationTop.jsp |
---|
18,7 → 18,6 |
<td> |
<ul id="menu_dropdown" class="menubar"> |
<li class="submenu"><a href="#">Apresentação</a> |
<div class="shadow "> |
<ul class="menu"> |
<li><a href="#">Mensagem do Presidente</a></li> |
32,7 → 31,7 |
</li> |
<li class="submenu"><a href="#">Organização</a> |
<div class="shadow "> |
<div class="shadow"> |
<ul class="menu"> |
<li><a href="#">Assembleia de Representantes</a></li> |
<li><a href="#">Conselho Directivo</a></li> |
/impl/src/web/layout/layoutintranet.jsp |
---|
11,25 → 11,7 |
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/intranet.css"/> |
<jsp:include page="/layout/scripts.jsp"/> |
<script type="text/javascript"> |
function horizontal() { |
var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li"); |
for (var i=0; i< navItems.length; i++) { |
if(navItems[i].className == "submenu") |
{ |
if(navItems[i].getElementsByTagName('ul')[0] != null) |
{ |
navItems[i].onmouseover=function() { |
this.getElementsByTagName('ul')[0].style.display="block";} |
navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} |
} |
} |
} |
} |
</script> |
</head> |
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0" onload="horizontal();"> |
<div id="body"> |
/impl/src/web/layout/navigationLeftAdmin.jsp |
---|
5,28 → 5,27 |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<div id="leftMenuModule"> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul> |
<li> |
<html:link action="/Welcome"><bean:message key="Home"/></html:link> |
</li> |
<estgweb:isNotAuthenticated> |
<li> |
<html:link action="/Welcome"><bean:message key="Home"/></html:link> |
<html:link action="/StartAuthentication"><bean:message key="authenticate"/></html:link> |
</li> |
</estgweb:isNotAuthenticated> |
<estgweb:isNotAuthenticated> |
<li> |
<html:link action="/StartAuthentication"><bean:message key="authenticate"/></html:link> |
</li> |
</estgweb:isNotAuthenticated> |
<estgweb:isAuthenticated> |
<li> |
<html:link action="/Logout"><bean:message key="logout"/></html:link> |
</li> |
</estgweb:isAuthenticated> |
</ul> |
</div> |
<estgweb:isAuthenticated> |
<li> |
<html:link action="/Logout"><bean:message key="logout"/></html:link> |
</li> |
</estgweb:isAuthenticated> |
</ul> |
</div> |
</div> |
/impl/src/web/public/index.jsp |
---|
4,22 → 4,22 |
<%@ page import="pt.estgp.estgweb.domain.views.AnnouncementView" %> |
<%@ page import="java.util.List" %> |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@page language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ page language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<% |
IServiceManager sm = ServiceManager.getInstance(); |
String subTarget = null; |
String[] names = new String[]{}; |
Object[] args = new Object[]{subTarget}; |
Object[] args = new Object[]{Globals.ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS, subTarget}; |
int topAnnouncements = 1; |
int centerAnnouncements = 1; |
int bottomAnnouncements = 1; |
List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadTargetMaxAnnouncements", args, names); |
List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadTypeMaxAnnouncements", args, names); |
request.setAttribute("Announcements", announcementViews); |
%> |
<jomm:messages/> |
33,115 → 33,181 |
<div class="indexPage"> |
<h1><bean:message key="mainAnnouncements"/></h1> |
<h1> |
<bean:message key="mainAnnouncements"/> |
</h1> |
<div id="flashTopNews"> |
<table class="container"> |
<tr> |
<td class="textContainer"> |
<bean:message key="announcements.loading"/> |
</td> |
<td class="imageContainer"> |
</td> |
</tr> |
</table> |
</div> |
<div id="flashTopNews"> |
<table class="container"> |
<tr> |
<td class="textContainer"> |
<bean:message key="announcements.loading"/> |
</td> |
<td class="imageContainer"> |
</td> |
</tr> |
</table> |
</div> |
<logic:iterate id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
<logic:equal value="bottom.flash.news" name="item" property="type"> |
<logic:iterate id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
<logic:equal value="bottom.flash.news" name="item" property="type"> |
<%if(centerAnnouncements<=Globals.NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX) |
{ |
if(centerAnnouncements==1) |
{ %> |
<div id="flashCenterNews"> |
<table class="container"> |
<tr> |
<%}%> |
<td class="imageContainer"> |
<%if(item.getSmallImage() != null){%><img alt="<%=item.getTitle()%>" src="<%=request.getContextPath()%>/imageStream/<%=item.getSmallImage().getId()%>"><%}%> |
</td> |
<td class="textContainer"> |
<logic:empty name="item" property="url"> |
<h2><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.title}</html:link></h2> |
<p><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.textSummarySmall}</html:link></p> |
</logic:empty> |
<logic:notEmpty name="item" property="url"> |
<%if(!item.getHaveAllText()) |
{%> |
<h2><html:link href="${item.url}">${item.title}</html:link></h2> |
<p><html:link href="${item.url}">${item.textSummarySmall}</html:link></p> |
<%} |
else |
{%> |
<h2><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.title}</html:link></h2> |
<p><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.textSummarySmall}</html:link></p> |
<%}%> |
</logic:notEmpty> |
</td> |
<% |
if (centerAnnouncements <= Globals.NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX) |
{ |
if (centerAnnouncements == 1) |
{ |
%> |
<div id="flashCenterNews"> |
<table class="container"> |
<tr> |
<% |
} |
%> |
<td class="imageContainer"> |
<% |
if (item.getSmallImage() != null) |
{ |
%><img alt="<%=item.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=item.getSmallImage().getId()%>"><%}%> |
</td> |
<td class="textContainer"> |
<logic:empty name="item" property="url"> |
<h2> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link> |
</h2> |
<%if(centerAnnouncements==Globals.NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX) |
{%> |
</tr> |
</table> |
</div> |
<p> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.textSummarySmall}</html:link> |
</p> |
</logic:empty> |
<logic:notEmpty name="item" property="url"> |
<% |
if (!item.getHaveAllText()) |
{ |
%> |
<h2> |
<html:link href="${item.url}">${item.title}</html:link> |
</h2> |
<p> |
<html:link href="${item.url}">${item.textSummarySmall}</html:link> |
</p> |
<% |
} |
else |
{ |
%> |
<h2> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link> |
</h2> |
<p> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.textSummarySmall}</html:link> |
</p> |
<%}%> |
</logic:notEmpty> |
</td> |
<% |
} |
centerAnnouncements++; |
} |
else if(bottomAnnouncements<=Globals.NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX) |
{ |
if(bottomAnnouncements==1) |
if (centerAnnouncements == Globals.NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX) |
{ |
%> |
</tr> |
</table> |
</div> |
<% |
} |
centerAnnouncements++; |
} |
else if (bottomAnnouncements <= Globals.NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX) |
{ |
if (bottomAnnouncements == 1) |
{ |
%> |
<div id="flashBottomNews"> |
<table class="container"> |
<tr> |
<div id="flashBottomNews"> |
<table class="container"> |
<tr> |
<%}%> |
<td> |
<div class="imageContainer"> |
<% |
if (item.getSmallImage() != null) |
{ |
%><img alt="<%=item.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=item.getSmallImage().getId()%>"><%}%> |
</div> |
<div class="textContainer"> |
<logic:empty name="item" property="url"> |
<h2> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link> |
</h2> |
<p> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.textSummarySmall}</html:link> |
</p> |
</logic:empty> |
<logic:notEmpty name="item" property="url"> |
<% |
if (!item.getHaveAllText()) |
{ |
%> |
<h2> |
<html:link href="${item.url}">${item.title}</html:link> |
</h2> |
<p> |
<html:link href="${item.url}">${item.textSummarySmall}</html:link> |
</p> |
<% |
} |
else |
{ |
%> |
<h2> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link> |
</h2> |
<p> |
<html:link |
action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.textSummarySmall}</html:link> |
</p> |
<%}%> |
<td> |
<div class="imageContainer"> |
<%if(item.getSmallImage() != null){%><img alt="<%=item.getTitle()%>" src="<%=request.getContextPath()%>/imageStream/<%=item.getSmallImage().getId()%>"><%}%> |
</div> |
<div class="textContainer"> |
<logic:empty name="item" property="url"> |
<h2><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link></h2> |
<p><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.textSummarySmall}</html:link></p> |
</logic:empty> |
<logic:notEmpty name="item" property="url"> |
<%if(!item.getHaveAllText()) |
{%> |
<h2><html:link href="${item.url}">${item.title}</html:link></h2> |
<p><html:link href="${item.url}">${item.textSummarySmall}</html:link></p> |
<%} |
else |
{%> |
<h2><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.title}</html:link></h2> |
<p><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load" >${item.textSummarySmall}</html:link></p> |
<%}%> |
</logic:notEmpty> |
</div> |
</td> |
<%if(bottomAnnouncements==Globals.NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX) |
{%> |
</tr> |
</table> |
</div> |
</logic:notEmpty> |
</div> |
</td> |
<% |
} |
if (bottomAnnouncements == Globals.NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX) |
{ |
%> |
</tr> |
</table> |
</div> |
<% |
} |
bottomAnnouncements++; |
} |
%> |
</logic:equal> |
</logic:iterate> |
<%if(bottomAnnouncements>1 && bottomAnnouncements<=Globals.NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX) |
bottomAnnouncements++; |
} |
%> |
</logic:equal> |
</logic:iterate> |
<% |
if (bottomAnnouncements > 1 && bottomAnnouncements <= Globals.NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX) |
{ |
%> |
%> |
</div> |
<%}%> |
<%if(centerAnnouncements>1 && centerAnnouncements<=Globals.NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX) |
{ |
<% |
if (centerAnnouncements > 1 && centerAnnouncements <= Globals.NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX) |
{ |
%> |
</tr> |
</table> |
/impl/src/web/public/portals/menuPortal.jsp |
---|
1,71 → 1,77 |
<%@page contentType="text/html"%> |
<%@page pageEncoding="UTF-8"%> |
<%@page import="java.util.*"%> |
<%@ page contentType="text/html" %> |
<%@ page pageEncoding="UTF-8" %> |
<%@ page import="java.util.*" %> |
<%@ page import="jomm.web.utils.NavPlace" %> |
<%@ page import="jomm.web.utils.NavPlaceServer" %> |
<%@ page import="jomm.web.utils.TopNav" %> |
<%@ page import="jomm.utils.MessageResources" %> |
<% |
TopNav topNav = NavPlaceServer.getPortalMenuPlacesKey(request); |
if(topNav.getTitle() != null) |
if (topNav.getTitle() != null) |
{ |
%> |
<div class="navLeftMenu"> |
<h2><%=MessageResources.getMessage(request, topNav.getTitle())%></h2> |
<% |
} |
%> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<% |
String menuPortalPos = request.getParameter("pos"); |
int pos = 0; |
if(menuPortalPos != null) |
try |
<div class="linkMenuBlock"> |
<div class="linkMenuBlockTitle"><%=MessageResources.getMessage(request, topNav.getTitle())%></div> |
<% |
} |
%> |
<div class="linkLeftMenu"> |
<div class="listClean"> |
<ul id="portalMenu"> |
<% |
String menuPortalPos = request.getParameter("pos"); |
int pos = 0; |
if (menuPortalPos != null) |
try |
{ |
pos = Integer.parseInt(menuPortalPos); |
} |
catch (NumberFormatException e) |
{ |
} |
List<NavPlace> navKeys = topNav.getNavPlaces(); |
int i = 0; |
for (NavPlace navKey : navKeys) |
{ |
pos = Integer.parseInt(menuPortalPos); |
} |
catch(NumberFormatException e){} |
List<NavPlace> navKeys = topNav.getNavPlaces(); |
int i = 0; |
for (NavPlace navKey : navKeys) |
{ |
String selectedClass = ""; |
if(pos == i) |
selectedClass = " selected"; |
i++; |
NavPlace navPlace = (NavPlace) navKey; |
if (navPlace.getUrl() != null) |
{ |
if(!navPlace.getUrl().contains("http://")) |
String selectedClass = ""; |
if (pos == i) |
selectedClass = " selected"; |
i++; |
NavPlace navPlace = (NavPlace) navKey; |
if (navPlace.getUrl() != null) |
{ |
%> |
<li class="navPlace<%=selectedClass%>"> |
<a href="<%=request.getContextPath() + navPlace.getUrl()%>"><%=MessageResources.getMessage(request, navPlace.getKey())%></a> |
</li> |
<% |
if (!navPlace.getUrl().contains("http://")) |
{ |
%> |
<li class="navPlace<%=selectedClass%>"> |
<a href="<%=request.getContextPath() + navPlace.getUrl()%>"><%= |
MessageResources.getMessage(request, navPlace.getKey())%> |
</a> |
</li> |
<% |
} |
else |
{ |
%> |
<li class="navPlace<%=selectedClass%>"> |
<a href="<%=navPlace.getUrl()%>"><%=MessageResources.getMessage(request, navPlace.getKey())%></a> |
</li> |
<li class="navPlace<%=selectedClass%>"> |
<a href="<%=navPlace.getUrl()%>"><%=MessageResources.getMessage(request, navPlace.getKey())%> |
</a> |
</li> |
<% |
} |
} |
} |
else |
{ |
%> |
<li class="navPlace,<%=selectedClass%>"><%=MessageResources.getMessage(request, navPlace.getKey())%></li> |
<% |
else |
{ |
%> |
<li class="navPlace,<%=selectedClass%>"><%=MessageResources.getMessage(request, navPlace.getKey())%> |
</li> |
<% |
} |
} |
} |
%> |
</ul> |
%> |
</ul> |
</div> |
</div> |
</div> |
</div> |
/impl/src/web/public/blogs/blog.jsp |
---|
1,30 → 1,53 |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<jsp:useBean id="BlogView" type="pt.estgp.estgweb.domain.views.BlogView" scope="request"/> |
<div class="seccao"> |
<div class="blog"> |
<div class="seccao"> |
<div class="postHeader"> |
<h1> |
<bean:write name="BlogView" property="title"/> |
</h1> |
<h1><bean:write name="BlogView" property="title"/></h1> |
<p> |
<% |
if (BlogView.getImage() != null) |
{ |
%> |
<div class="imageBlog"> |
<img align="left" alt="<%=BlogView.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=BlogView.getImage().getId()%>"> |
</div> |
<% |
} |
%> |
${BlogView.description} |
</p> |
</div> |
<p> |
<% |
if(BlogView.getImage() != null) |
{ |
%> |
<img align="left" alt="<%=BlogView.getTitle()%>" src="<%=request.getContextPath()%>/imageStream/<%=BlogView.getImage().getId()%>"> |
<% |
} |
%> |
${BlogView.description} |
</p> |
<div class="toolsContainer"> |
<div class="tools"> |
<estgweb:canAddContent name="BlogView"> |
<a href="<%=request.getContextPath()%>/addPost">Adicionar POST</a> |
</estgweb:canAddContent> |
</div> |
</div> |
<p class="pFooter"> |
<bean:message key="blog.owner"/> <a href="mailto:${BlogView.ownerEmail}">${BlogView.owner.name}</a> <bean:message key="at"/> ${BlogView.formatedSaveDate} |
</p> |
<div class="pFooter"> |
<a href="<%=request.getContextPath()%>/blog.do?id=<%=BlogView.getId()%>"><%=Globals.SITE_URL%> |
/blog?id=<%=BlogView.getId()%> |
</a> |
<bean:message key="blog.owner"/> |
<a href="mailto:${BlogView.ownerEmail}">${BlogView.owner.name}</a> |
<bean:message key="at"/> |
${BlogView.formatedSaveDate} |
</div> |
</div> |
</div> |
/impl/src/web/public/announcements/loadAnnouncement.jsp |
---|
9,33 → 9,51 |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/estgweb.tld" prefix="estgweb" %> |
<jsp:useBean id="Announcement" type="pt.estgp.estgweb.domain.views.AnnouncementView" scope="request"/> |
<% UserSessionImpl userSession = (UserSessionImpl) UserSessionProxy.loadUserSession(request,response);%> |
<% UserSessionImpl userSession = (UserSessionImpl) UserSessionProxy.loadUserSession(request, response);%> |
<html:link href="http://www.sapo.pt"></html:link> |
<div class="seccao"> |
<h2>${Announcement.title} |
<estgweb:canManage name="Announcement"> |
<html:link action="/loadAnnouncement?id=${Announcement.id}&dispatch=edit"> <bean:message key="edit"/> </html:link> |
<html:link action="/loadAnnouncement?id=${Announcement.id}&dispatch=delete">Apagar</html:link> |
</estgweb:canManage> |
<estgweb:canManage name="Announcement"> |
<html:link action="/loadAnnouncement?id=${Announcement.id}&dispatch=edit"> |
<bean:message key="edit"/> |
</html:link> |
<html:link action="/loadAnnouncement?id=${Announcement.id}&dispatch=delete">Apagar</html:link> |
</estgweb:canManage> |
</h2> |
<% |
AnnouncementStyleEnum styleEnum = Announcement.getStyleEnum(); |
if (styleEnum == AnnouncementStyleEnum.imgEmbeddedLeft || styleEnum == AnnouncementStyleEnum.imgEmbeddedRight) { |
String align = "left"; |
if (styleEnum == AnnouncementStyleEnum.imgEmbeddedRight) |
align = "right"; |
String valign = "middle"; |
String align = "center"; |
if(styleEnum == AnnouncementStyleEnum.imgEmbeddedLeft || styleEnum == AnnouncementStyleEnum.imgTopLeft) |
align = "left"; |
else if(styleEnum == AnnouncementStyleEnum.imgEmbeddedRight || styleEnum == AnnouncementStyleEnum.imgTopRight) |
align = "right"; |
if (styleEnum == AnnouncementStyleEnum.imgLeftTop || styleEnum == AnnouncementStyleEnum.imgRightTop) |
valign = "top"; |
else if (styleEnum == AnnouncementStyleEnum.imgLeftBottom || styleEnum == AnnouncementStyleEnum.imgRightBottom) |
valign = "bottom"; |
if (styleEnum == AnnouncementStyleEnum.imgEmbeddedLeft || styleEnum == AnnouncementStyleEnum.imgEmbeddedRight) |
{ |
%> |
<p> |
<div class="imageAnnouncement"> |
<% |
if (Announcement.getBigImage() != null) { |
if (Announcement.getBigImage() != null) |
{ |
%> |
<img align="<%=align%>" alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getBigImage().getId()%>"> |
<% |
} else if (Announcement.getSmallImage() != null) { |
} |
else if (Announcement.getSmallImage() != null) |
{ |
%> |
<img align="<%=align%>" alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getSmallImage().getId()%>"> |
45,26 → 63,32 |
</div> |
${Announcement.formatedText} |
<% |
if (Announcement.getUrl() != null) { |
if (Announcement.getUrl() != null) |
{ |
%> |
<html:link href="${Announcement.url}">Ver +</html:link> |
<% |
}%> |
</p> |
<% |
} else if (styleEnum == AnnouncementStyleEnum.imgTop) { |
} |
else if (styleEnum == AnnouncementStyleEnum.imgTop || styleEnum == AnnouncementStyleEnum.imgTopLeft || styleEnum == AnnouncementStyleEnum.imgTopRight) |
{ |
%> |
<table> |
<tr> |
<td> |
<td align="<%=align%>"> |
<div class="imageAnnouncement"> |
<% |
if (Announcement.getBigImage() != null) { |
if (Announcement.getBigImage() != null) |
{ |
%> |
<img alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getBigImage().getId()%>"> |
<% |
} else if (Announcement.getSmallImage() != null) { |
} |
else if (Announcement.getSmallImage() != null) |
{ |
%> |
<img alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getSmallImage().getId()%>"> |
79,19 → 103,24 |
</tr> |
</table> |
<% |
} else if (styleEnum == AnnouncementStyleEnum.imgLeft) { |
} |
else if (styleEnum == AnnouncementStyleEnum.imgLeft || styleEnum == AnnouncementStyleEnum.imgLeftTop || styleEnum == AnnouncementStyleEnum.imgLeftBottom) |
{ |
%> |
<table> |
<tr> |
<td> |
<td valign="<%=valign%>"> |
<div class="imageAnnouncement"> |
<% |
if (Announcement.getBigImage() != null) { |
if (Announcement.getBigImage() != null) |
{ |
%> |
<img alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getBigImage().getId()%>"> |
<% |
} else if (Announcement.getSmallImage() != null) { |
} |
else if (Announcement.getSmallImage() != null) |
{ |
%> |
<img alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getSmallImage().getId()%>"> |
104,20 → 133,25 |
</tr> |
</table> |
<% |
} else if (styleEnum == AnnouncementStyleEnum.imgRight) { |
} |
else if (styleEnum == AnnouncementStyleEnum.imgRight || styleEnum == AnnouncementStyleEnum.imgRightTop || styleEnum == AnnouncementStyleEnum.imgRightBottom) |
{ |
%> |
<table> |
<tr> |
<td>${Announcement.formatedText}</td> |
<td> |
<td valign="<%=valign%>"> |
<div class="imageAnnouncement"> |
<% |
if (Announcement.getBigImage() != null) { |
if (Announcement.getBigImage() != null) |
{ |
%> |
<img alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getBigImage().getId()%>"> |
<% |
} else if (Announcement.getSmallImage() != null) { |
} |
else if (Announcement.getSmallImage() != null) |
{ |
%> |
<img alt="<%=Announcement.getTitle()%>" |
src="<%=request.getContextPath()%>/imageStream/<%=Announcement.getSmallImage().getId()%>"> |
/impl/src/web/public/announcements/announcements.jsp |
---|
3,6 → 3,7 |
<%@ page import="pt.estgp.estgweb.domain.views.AnnouncementView" %> |
<%@ page import="java.util.List" %> |
<%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
11,30 → 12,30 |
IServiceManager sm = ServiceManager.getInstance(); |
String subTarget = null; |
String[] names = new String[]{}; |
Object[] args = new Object[]{subTarget}; |
List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadTargetMaxAnnouncements", args, names); |
Object[] args = new Object[]{Globals.ANNOUNCEMENT_TYPE_NEWS,subTarget}; |
List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadTypeMaxAnnouncements", args, names); |
request.setAttribute("Announcements", announcementViews); |
%> |
<div id="lastNews"> |
<h1><bean:message key="announcements"/></h1> |
<div class="linkLeftMenu"> |
<logic:present name="Announcements"> |
<ul> |
<logic:iterate id="item" name="Announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
<logic:equal value="news" name="item" property="type"> |
<li> |
<logic:empty name="item" property="url"> |
<h2><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link></h2> |
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link> |
</logic:empty> |
<logic:notEmpty name="item" property="url"> |
<%if(!item.getHaveAllText()) |
{%> |
<h2><html:link href="${item.url}">${item.title}</html:link></h2> |
<html:link href="${item.url}">${item.title}</html:link> |
<%} |
else |
{%> |
<h2><html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link></h2> |
<html:link action="/loadAnnouncement?id=${item.id}&dispatch=load">${item.title}</html:link> |
<%}%> |
</logic:notEmpty> |
</li> |
42,5 → 43,4 |
</logic:iterate> |
</ul> |
</logic:present> |
</div> |
</div> |
/impl/src/web/user/courses/topnavCourses.jsp |
---|
New file |
0,0 → 1,12 |
<%@page contentType="text/html"%> |
<%@page pageEncoding="UTF-8"%> |
<%@page import="java.util.*"%> |
<%@ page import="jomm.web.utils.NavPlace" %> |
<%@ page import="jomm.web.utils.NavPlaceServer" %> |
<%@ page import="jomm.web.utils.TopNav" %> |
<% |
TopNav topNav = NavPlaceServer.getInstance().createTopNav(request); |
topNav.addNavPlace("/Welcome.do", "Home"); |
topNav.addNavPlace(null, "courses"); |
%> |
<jsp:include page="/layout/topnav.jsp"/> |
/impl/src/web/user/courses/courses.jsp |
---|
1,26 → 1,10 |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<p>o espaço <b>eCadeiras</b> constitui um serviço de apoio às actividades lectivas dos cursos da ESTGP. |
O seu principal objectivo consiste em armazenar informação vital ao ensino e |
às actividades da Escola. |
</p> |
<div class="seccao"> |
<h1>Informação:</h1> |
<p>Já foi criada, para cada curso, a |
estrutura de apoio ao ano lectivo 2005.2006, nomeadamente:</p> |
<ul> |
<li>uma pasta para os programas</li> |
<li>uma <u>pasta para receber os conteúdos |
das disciplinas.</u></li> |
</ul> |
<p><i>Os conteúdos do ano lectivo |
2004.2005 continuam disponíveis apenas para consulta, não podendo ser |
alterados.</i></p> |
<p>Os Docentes que necessitam de uma pasta |
para apoio a disciplinas para o próximo ano lectivo, podem solicitar a |
sua abertura ao Centro Informático.</p> |
<p>o espaço <b>eCadeiras</b> constitui um serviço de apoio às actividades lectivas dos cursos da ESTGP. |
O seu principal objectivo consiste em armazenar informação vital ao ensino e |
às actividades da Escola. |
</p> |
<div class="seccao"> |
<h1>Informação:</h1> |
<p>Já foi criada, para cada curso, a |
37,5 → 21,4 |
para apoio a disciplinas para o próximo ano lectivo, podem solicitar a |
sua abertura ao Centro Informático.</p> |
</div> |
</div> |
/impl/src/web/user/ftpclient/ftpclient.jsp |
---|
1,77 → 1,150 |
<%@ page import="org.apache.commons.net.ftp.FTPFile" %> |
<%@ page import="jomm.web.ftp.IFile" %> |
<%@ page import="java.util.List" %> |
<%@ page import="jomm.web.utils.NavPlace" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<% |
List<IFile> iFiles = (List<IFile>) request.getAttribute("files"); |
%> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<div id="topnav"> |
<ul> |
<% |
<div class="files"> |
<ul> |
<% |
for(IFile i: iFiles) |
{ |
if(i.isDirectory()) |
List<IFile> iFiles = (List<IFile>) request.getAttribute("files"); |
if (iFiles != null && iFiles.size() > 0) |
{ |
for (IFile iFile : iFiles) |
{ |
List<NavPlace> navPlaces = iFile.getNavPlaces(); |
String root = "../"; |
if(navPlaces.size() > 1) //if there is only one will be null because is the actual place |
{ |
root += navPlaces.get(0).getUrl(); |
} |
%> |
<li><img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/folder.gif"><a href="<%=i.getName()%>/"><%=i.getName()%></a></li> |
<li class="navPlace"> |
<a href="<%=root%>"><bean:message key="nav.place.root"/></a> / |
</li> |
<% |
} |
} |
for (NavPlace navPlace : navPlaces) |
{ |
if(navPlace.getUrl() == null) |
{ |
%> |
<li class="navPlace"> |
<%=navPlace.getKey()%> |
</li> |
<% |
for(IFile i: iFiles) |
{ |
if(!i.isDirectory()) |
{ |
} |
else |
{ |
%> |
<li> |
<li class="navPlace"> |
<a href="<%=navPlace.getUrl()%>"><%=navPlace.getKey()%></a> / |
</li> |
<% |
} |
} |
break; |
} |
} |
%> |
</ul> |
</div> |
<div class="files"> |
<ul> |
<% |
if(i.getName().endsWith("doc") || i.getName().endsWith("rtf")) |
for (IFile i : iFiles) |
{ |
if (i.isDirectory()) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/doc.gif"> |
<li><img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/folder.gif"> <a href="<%=i.getName()%>/"><%=i.getName()%></a></li> |
<% |
} |
} |
else if(i.getName().endsWith("pdf")) |
%> |
<% |
for (IFile i : iFiles) |
{ |
if (!i.isDirectory()) |
{ |
%> |
<li> |
<% |
if (i.getName().endsWith("doc") || i.getName().endsWith("rtf")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/doc.gif"> |
<% |
} |
else if (i.getName().endsWith("pdf")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/pdf.gif"> |
<% |
<% |
} |
else if(i.getName().endsWith("ppt")) |
else if (i.getName().endsWith("ppt")) |
{ |
%> |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/ppt.gif"> |
<% |
<% |
} |
else if(i.getName().endsWith("zip") || i.getName().endsWith(".gz") || i.getName().endsWith("tgz")) |
else if (i.getName().endsWith("zip") || i.getName().endsWith(".gz") || i.getName().endsWith("tgz")) |
{ |
%> |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/zip.gif"> |
<% |
<% |
} |
else if(i.getName().endsWith("rar")) |
else if (i.getName().endsWith("rar")) |
{ |
%> |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/rar.gif"> |
<% |
<% |
} |
else if(i.getName().endsWith("txt")) |
else if (i.getName().endsWith("html") || i.getName().endsWith("htm")) |
{ |
%> |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/html.gif"> |
<% |
} |
else if (i.getName().endsWith("xls") || i.getName().endsWith("xlsx")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/xls.gif"> |
<% |
} |
else if (i.getName().endsWith("txt")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/txt.gif"> |
<% |
} |
else if (i.getName().endsWith("xml")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/xml.gif"> |
<% |
} |
else |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/unknown.gif"> |
<% |
} |
%> |
<a href="<%=i.getCompleteUrl()%>"><%=i.getName()%> |
</a> |
</li> |
<% |
} |
} |
%> |
<a href="<%=i.getCompleteUrl()%>"><%=i.getName()%></a> |
</li> |
<% |
} |
} |
%> |
</ul> |
</ul> |
</div> |
/impl/build.properties |
---|
2,6 → 2,8 |
## Properties file to be used with ant build.xml |
## |
#No Futuro este ponto de acesso usado para publicitar coisas como URL's de Blogs pode deixar de ser diferente da configuracao de servidor |
site.url=${service.url} |
##database configuration |
database.host=localhost |
/impl/etc/todo/todo.txt |
---|
New file |
0,0 → 1,36 |
Jorge Meu |
Tirar o getSerializable de noovo do domainObject e ver de onde devem herdar |
#### |
Modulo de Gestão de utilizadores Fabio |
Eventos com controlo de listagem e controlo de Pagamentos Fabio |
#### |
No startEditProfile temos de por uma TopNav Fabio |
>>>Aqui pode editar o seu perfil |
#### |
#### |
O Login ainda não vai procurar os users à base de dados Fabio (Fluxograma de identificação, no caso do docente procura pelo email, no aluno por login que ficará preenchido com a importação) |
#### |
Criação da estrutura de Páginas para a intranet Jorge |
Curso > Disciplina (Ignorar Semestre para evitar alterações de plano curricular que envolvam apenas troca de semestres) |
### |
Listagem de Docentes a fazer por jorge |
Listagem de Alunos a fazer por jorge |
Avisos Disciplina a fazer Susana |
Disciplinas com Duvidas a fazer por jorge |
Disciplinas com Blog a fazer por jorge |
RSS disciplina incluido os três pontos anteriores Susana |
RSS aluno incluindo o RSS anterior e os avisos gerais e os avisos para alunos Susana |
RSS geral para anuncios dado o Tipo de anuncio (Destaques, SubDestaques e Noticias) Susana |
RSS geral para anuncios por Role (Aluno, Futuro Aluno, Antigo Aluno, Docentes) Susana |
TAB da disciplina definido por Jorge implementadar pela Susana (Objectivos, Programa, listagem da Intranet, Lista de Docentes, Lista de Alunos) |
Pagina da disciplina a listar conteudos da intranet Jorge |
/impl/build.xml |
---|
310,6 → 310,7 |
<replacefilter token="@out.dir@" value="${out.dir}"/> |
<replacefilter token="@email.templates.dir@" value="${email.templates.dir}"/> |
<replacefilter token="@use.ldap@" value="${use.ldap}"/> |
<replacefilter token="@site.url@" value="${site.url}"/> |
</replace> |
<replace file="${build.dir.classes}/${log4j.properties.filename}"> |
<replacefilter token="@log.file@" value="${log.file}"/> |