Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/xmlrpc/AliasSupportedTransportFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/xmlrpc/AliasSupportedTransportFactory.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/xmlrpc/AliasSupportedTransportFactory.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/xmlrpc/AliasSupportedTransportFactory.java Sun Jul 5 10:01:19 2009 @@ -68,6 +68,7 @@ this.ks = ks; } + @Override public Object sendRequest(XmlRpcRequest req) throws XmlRpcException { XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) req.getConfig(); URL serverUrl = config.getServerURL(); @@ -103,20 +104,24 @@ return con; } + @Override protected void setRequestHeader(String header, String value) { con.setRequestProperty(header, value); } + @Override protected void close() throws XmlRpcClientException { if (con instanceof HttpURLConnection) { ((HttpURLConnection) con).disconnect(); } } + @Override protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig config) { return HttpUtil.isUsingGzipEncoding(con.getHeaderField("Content-Encoding")); } + @Override protected InputStream getInputStream() throws XmlRpcException { try { return con.getInputStream(); @@ -125,6 +130,7 @@ } } + @Override protected void writeRequest(ReqWriter pWriter) throws IOException, XmlRpcException, SAXException { pWriter.write(con.getOutputStream()); } Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java (original) +++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java Sun Jul 5 10:01:19 2009 @@ -113,6 +113,7 @@ super(owner, field, label, HARD); } + @Override protected Map<String, Long> createValue(GenericPK pk) throws Exception { return new HashMap<String, Long>(); } Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java (original) +++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java Sun Jul 5 10:01:19 2009 @@ -43,10 +43,12 @@ super(dispatcher); } + @Override public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { runSync(localName, modelService, context); } + @Override public Map<String, Object> runSync(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { Object[] params = new Object[] { dispatcher.getLocalContext(localName), context }; try { Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java (original) +++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java Sun Jul 5 10:01:19 2009 @@ -31,6 +31,7 @@ import org.webslinger.catalina.WebslingerAccessLogValve; public class WebslingerCatalinaContainer extends CatalinaContainer { + @Override protected Engine createEngine(ContainerConfig.Container.Property engineConfig) throws ContainerException { Engine engine = super.createEngine(engineConfig); String logDir = ContainerConfig.getPropertyValue(engineConfig, "access-log-dir", null); Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java (original) +++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java Sun Jul 5 10:01:19 2009 @@ -70,6 +70,7 @@ super.init(config, UtilProperties.getPropertyValue("webslinger.properties", "moduleBase")); } + @Override protected Layout[] getStartLayouts() throws Exception { ArrayList<Layout> layouts = new ArrayList<Layout>(); try { @@ -81,6 +82,7 @@ return layouts.toArray(new Layout[layouts.size()]); } + @Override public void initializeRequest(WebslingerServletContext context, HttpServletRequest request) { request.setAttribute("servletContext", context); Object delegator = context.getAttribute("delegator"); @@ -98,6 +100,7 @@ servletContext.setAttribute("security", security); } + @Override protected void initializeContext(WebslingerServletContext context, Layout layout) throws Exception { OfbizLayout ofbizLayout = (OfbizLayout) layout; GenericDelegator delegator = GenericDelegator.getGenericDelegator(ofbizLayout.delegatorName); @@ -131,6 +134,7 @@ } } + @Override protected Set<String> getSuffixes() throws Exception { Cache cache = delegator.getCache(); Set<String> suffixes; @@ -147,6 +151,7 @@ return suffixes; } + @Override protected Layout lookupLayout(String hostName, String contextPath) throws Exception { GenericValue layout = EntityUtil.getOnly(delegator.findByAndCache("WebslingerLayout", UtilMisc.toMap("hostName", hostName, "contextPath", contextPath))); if (layout == null) return null; @@ -193,10 +198,12 @@ return bases; } + @Override public int hashCode() { return hashCode; } + @Override public boolean equals(Object o) { if (!(o instanceof OfbizLayout)) return false; OfbizLayout other = (OfbizLayout) o; Modified: ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java (original) +++ ofbiz/trunk/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java Sun Jul 5 10:01:19 2009 @@ -41,10 +41,12 @@ super(dispatcher); } + @Override public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { runSync(localName, modelService, context); } + @Override public Map<String, Object> runSync(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { GenericDelegator delegator = dispatcher.getDelegator(); try { Modified: ofbiz/trunk/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml (original) +++ ofbiz/trunk/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml Sun Jul 5 10:01:19 2009 @@ -4,9 +4,9 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <context-param> + <description>A unique ID used to look up the WebSite entity</description> <param-name>webSiteId</param-name> <param-value>WEBTOOLS</param-value> - <description>A unique ID used to look up the WebSite entity</description> </context-param> <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener> <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener> @@ -22,9 +22,9 @@ <load-on-startup>3</load-on-startup> </servlet> <servlet> - <servlet-name>ControlServlet</servlet-name> - <display-name>ControlServlet</display-name> <description>Main Control Servlet</description> + <display-name>ControlServlet</display-name> + <servlet-name>ControlServlet</servlet-name> <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java Sun Jul 5 10:01:19 2009 @@ -33,6 +33,7 @@ this.aif = aif; } + @Override public boolean equals(Object obj) { if (obj instanceof ArtifactInfoBase) { return this.equals(obj); Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Sun Jul 5 10:01:19 2009 @@ -207,7 +207,7 @@ for (File controllerFile: controllerFiles) { URL controllerUrl = null; try { - controllerUrl = controllerFile.toURL(); + controllerUrl = controllerFile.toURI().toURL(); } catch (MalformedURLException mue) { throw new GeneralException(mue.getMessage()); } Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -129,6 +129,7 @@ return this.requestUri; } + @Override public String getDisplayName() { String location = UtilURL.getOfbizHomeRelativeLocation(this.controllerXmlUrl); if (location.endsWith("/WEB-INF/controller.xml")) { @@ -137,22 +138,27 @@ return this.requestUri + " (" + location + ")"; } + @Override public String getDisplayType() { return "Controller Request"; } + @Override public String getType() { return ArtifactInfoFactory.ControllerRequestInfoTypeId; } + @Override public String getUniqueId() { return this.controllerXmlUrl.toExternalForm() + "#" + this.requestUri; } + @Override public URL getLocationURL() throws MalformedURLException { return this.controllerXmlUrl; } + @Override public boolean equals(Object obj) { if (obj instanceof ControllerRequestArtifactInfo) { ControllerRequestArtifactInfo that = (ControllerRequestArtifactInfo) obj; Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerViewArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -84,6 +84,7 @@ return this.viewUri; } + @Override public String getDisplayName() { String location = UtilURL.getOfbizHomeRelativeLocation(this.controllerXmlUrl); if (location.endsWith("/WEB-INF/controller.xml")) { @@ -92,22 +93,27 @@ return this.viewUri + " (" + location + ")"; } + @Override public String getDisplayType() { return "Controller View"; } + @Override public String getType() { return ArtifactInfoFactory.ControllerViewInfoTypeId; } + @Override public String getUniqueId() { return this.controllerXmlUrl.toExternalForm() + "#" + this.viewUri; } + @Override public URL getLocationURL() throws MalformedURLException { return this.controllerXmlUrl; } + @Override public boolean equals(Object obj) { if (obj instanceof ControllerViewArtifactInfo) { ControllerViewArtifactInfo that = (ControllerViewArtifactInfo) obj; Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/EntityArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -63,26 +63,32 @@ return this.modelEntity; } + @Override public String getDisplayName() { return this.getUniqueId(); } + @Override public String getDisplayType() { return "Entity"; } + @Override public String getType() { return ArtifactInfoFactory.EntityInfoTypeId; } + @Override public String getUniqueId() { return this.modelEntity.getEntityName(); } + @Override public URL getLocationURL() throws MalformedURLException { return FlexibleLocation.resolveLocation(this.modelEntity.getLocation(), null); } + @Override public boolean equals(Object obj) { if (obj instanceof EntityArtifactInfo) { return this.modelEntity.getEntityName().equals(((EntityArtifactInfo) obj).modelEntity.getEntityName()); Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/FormWidgetArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -182,27 +182,33 @@ } } + @Override public String getDisplayName() { // remove the component:// from the location return this.formName + " (" + this.formLocation.substring(12) + ")"; } + @Override public String getDisplayType() { return "Form Widget"; } + @Override public String getType() { return ArtifactInfoFactory.FormWidgetInfoTypeId; } + @Override public String getUniqueId() { return this.formLocation + "#" + this.formName; } + @Override public URL getLocationURL() throws MalformedURLException { return FlexibleLocation.resolveLocation(this.formLocation, null); } + @Override public boolean equals(Object obj) { if (obj instanceof FormWidgetArtifactInfo) { return (this.modelForm.getName().equals(((FormWidgetArtifactInfo) obj).modelForm.getName()) && Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ScreenWidgetArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -168,27 +168,33 @@ } } + @Override public String getDisplayName() { // remove the component:// from the location return this.screenName + " (" + this.screenLocation.substring(12) + ")"; } + @Override public String getDisplayType() { return "Screen Widget"; } + @Override public String getType() { return ArtifactInfoFactory.ScreenWidgetInfoTypeId; } + @Override public String getUniqueId() { return this.screenLocation + "#" + this.screenName; } + @Override public URL getLocationURL() throws MalformedURLException { return FlexibleLocation.resolveLocation(this.screenLocation, null); } + @Override public boolean equals(Object obj) { if (obj instanceof ScreenWidgetArtifactInfo) { return (this.modelScreen.getName().equals(((ScreenWidgetArtifactInfo) obj).modelScreen.getName()) && Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -234,6 +234,7 @@ this.displayPrefix = displayPrefix; } + @Override public String getDisplayName() { return this.getDisplayPrefixedName(); } @@ -241,18 +242,22 @@ return (this.displayPrefix != null ? this.displayPrefix : "") + this.modelService.name; } + @Override public String getDisplayType() { return "Service"; } + @Override public String getType() { return ArtifactInfoFactory.ServiceInfoTypeId; } + @Override public String getUniqueId() { return this.modelService.name; } + @Override public URL getLocationURL() throws MalformedURLException { return FlexibleLocation.resolveLocation(this.modelService.definitionLocation, null); } @@ -553,6 +558,7 @@ return topLevelMap; } + @Override public boolean equals(Object obj) { if (obj instanceof ServiceArtifactInfo) { return this.modelService.name.equals(((ServiceArtifactInfo) obj).modelService.name); Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java Sun Jul 5 10:01:19 2009 @@ -64,22 +64,27 @@ } } + @Override public String getDisplayName() { return this.getDisplayPrefixedName(); } + @Override public String getDisplayType() { return "Service ECA"; } + @Override public String getType() { return ArtifactInfoFactory.ServiceEcaInfoTypeId; } + @Override public String getUniqueId() { return this.serviceEcaRule.toString(); } + @Override public URL getLocationURL() throws MalformedURLException { return FlexibleLocation.resolveLocation(this.serviceEcaRule.getDefinitionLocation(), null); } @@ -179,6 +184,7 @@ return topLevelMap; } + @Override public boolean equals(Object obj) { if (obj instanceof ServiceEcaArtifactInfo) { ServiceEcaArtifactInfo that = (ServiceEcaArtifactInfo) obj; Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java Sun Jul 5 10:01:19 2009 @@ -120,7 +120,7 @@ if (UtilValidate.isNotEmpty(fileName) && !fileName.equals(fileInfo.getFileName())) { continue; } - Document resourceDocument = UtilXml.readXmlDocument(fileInfo.file.toURL(), false); + Document resourceDocument = UtilXml.readXmlDocument(fileInfo.file.toURI().toURL(), false); Element resourceElem = resourceDocument.getDocumentElement(); String labelKeyComment = ""; for (Node propertyNode : UtilXml.childNodeList(resourceElem.getFirstChild())) { Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java (original) +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java Sun Jul 5 10:01:19 2009 @@ -245,7 +245,7 @@ private void getLabelsFromFormWidgets(String inFile, File file) throws MalformedURLException, SAXException, ParserConfigurationException, IOException, GenericServiceException { Set<String> fieldNames = FastSet.newInstance(); findUiLabelMapInFile(inFile, file.getPath()); - Document formDocument = UtilXml.readXmlDocument(file.toURL()); + Document formDocument = UtilXml.readXmlDocument(file.toURI().toURL()); Element rootElem = formDocument.getDocumentElement(); for (Element formElement : UtilXml.childElementList(rootElem, "form")) { for (Element elem : UtilXml.childElementList(formElement, "auto-fields-service")) { @@ -267,7 +267,7 @@ List<File> componentsFiles = FileUtil.findXmlFiles(null, null, "ofbiz-component", "http://ofbiz.apache.org/dtds/ofbiz-component.xsd"); for (File componentFile : componentsFiles) { String filePath = componentFile.getPath(); - Document menuDocument = UtilXml.readXmlDocument(componentFile.toURL()); + Document menuDocument = UtilXml.readXmlDocument(componentFile.toURI().toURL()); Element rootElem = menuDocument.getDocumentElement(); for (Element elem1 : UtilXml.childElementList(rootElem)) { checkOfbizComponentTag(elem1, filePath); Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/tablesMySql.jsp URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/tablesMySql.jsp?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/entity/tablesMySql.jsp (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/tablesMySql.jsp Sun Jul 5 10:01:19 2009 @@ -19,14 +19,14 @@ <%@ page contentType="text/plain" %><%@ page import="java.util.*" %><%@ page import="org.ofbiz.entity.*" %><%@ page import="org.ofbiz.entity.model.*" %><jsp:useBean id="delegator" type="org.ofbiz.entity.GenericDelegator" scope="request" /><jsp:useBean id="security" type="org.ofbiz.security.Security" scope="request" /><% if(security.hasPermission("ENTITY_MAINT", session)) { ModelReader reader = delegator.getModelReader(); - Collection ec = reader.getEntityNames(); - TreeSet entities = new TreeSet(ec); - Iterator classNamesIterator = entities.iterator(); + Collection<String> ec = reader.getEntityNames(); + TreeSet<String> entities = new TreeSet<String>(ec); + Iterator<String> classNamesIterator = entities.iterator(); while(classNamesIterator != null && classNamesIterator.hasNext()) { ModelEntity entity = reader.getModelEntity((String)classNamesIterator.next());%> -CREATE TABLE <%=entity.getPlainTableName()%> (<%for(int i=0;i<entity.fields.size();i++){ModelField field=(ModelField)entity.fields.get(i); ModelFieldType type = delegator.getEntityFieldType(entity, field.type);%><%if(field.isPk){%> - <%=field.colName%> <%=type.sqlType%> NOT NULL,<%}else{%> - <%=field.colName%> <%=type.sqlType%>,<%}%><%}%> - CONSTRAINT PK_<%=entity.getPlainTableName()%> PRIMARY KEY (<%=entity.colNameString(entity.pks)%>)); +CREATE TABLE <%=entity.getPlainTableName()%> (<%for (String fieldName : entity.getAllFieldNames()){ModelField field=entity.getField(fieldName); ModelFieldType type = delegator.getEntityFieldType(entity, field.getType());%><%if(field.getIsPk()){%> + <%=field.getColName()%> <%=type.getSqlType()%> NOT NULL,<%}else{%> + <%=field.getColName()%> <%=type.getSqlType()%>,<%}%><%}%> + CONSTRAINT PK_<%=entity.getPlainTableName()%> PRIMARY KEY (<%=entity.colNameString(entity.getPkFieldsUnmodifiable())%>)); <%}%> <% } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/GenericWidgetOutput.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/GenericWidgetOutput.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/GenericWidgetOutput.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/GenericWidgetOutput.java Sun Jul 5 10:01:19 2009 @@ -28,6 +28,7 @@ this.output = output; } + @Override public String toString() { return this.output; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java Sun Jul 5 10:01:19 2009 @@ -87,10 +87,12 @@ this.context.putAll(context); } + @Override public int hashCode() { return 0; } + @Override public boolean equals(Object obj) { WidgetContextCacheKey key = null; if (obj instanceof WidgetContextCacheKey) { @@ -133,6 +135,7 @@ return true; } + @Override public String toString() { Map<String, Object> printableMap = FastMap.newInstance(); for (String fieldName: this.context.keySet()) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Sun Jul 5 10:01:19 2009 @@ -1850,6 +1850,7 @@ return lstNm; } + @Override public String getName() { return this.name; } @@ -1935,6 +1936,7 @@ return this.type; } + @Override public String getBoundaryCommentName() { return formLocation + "#" + name; } @@ -2586,9 +2588,11 @@ this.useWhen = altTargetElement.getAttribute("use-when"); this.targetExdr = FlexibleStringExpander.getInstance(altTargetElement.getAttribute("target")); } + @Override public int hashCode() { return useWhen.hashCode(); } + @Override public boolean equals(Object obj) { return obj instanceof AltTarget && obj.hashCode() == this.hashCode(); } @@ -2619,9 +2623,11 @@ this.areaId = areaId; this.areaTarget = areaTarget; } + @Override public int hashCode() { return areaId.hashCode(); } + @Override public boolean equals(Object obj) { return obj instanceof UpdateArea && obj.hashCode() == this.hashCode(); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java Sun Jul 5 10:01:19 2009 @@ -125,6 +125,7 @@ } } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -188,6 +189,7 @@ this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global")); } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -228,6 +230,7 @@ this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global")); } + @Override public void runAction(Map<String, Object> context) { //String globalStr = this.globalExdr.expandString(context); // default to false @@ -271,6 +274,7 @@ this.location = scriptElement.getAttribute("location"); } + @Override public void runAction(Map<String, Object> context) { if (location.endsWith(".bsh")) { try { @@ -327,6 +331,7 @@ this.fieldMap = EntityFinderUtil.makeFieldMap(serviceElement); } + @Override public void runAction(Map<String, Object> context) { String serviceNameExpanded = this.serviceNameExdr.expandString(context); if (UtilValidate.isEmpty(serviceNameExpanded)) { @@ -391,6 +396,7 @@ finder = new PrimaryKeyFinder(entityOneElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelForm.getDelegator(context)); @@ -427,6 +433,7 @@ finder = new ByAndFinder(entityAndElement); } + @Override public void runAction(Map<String, Object> context) { try { // don't want to do this: context.put("defaultFormResultList", null); @@ -470,6 +477,7 @@ finder = new ByConditionFinder(entityConditionElement); } + @Override public void runAction(Map<String, Object> context) { try { // don't want to do this: context.put("defaultFormResultList", null); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Sun Jul 5 10:01:19 2009 @@ -1602,6 +1602,7 @@ this.fieldInfo = fieldInfo; } + @Override public void addOptionValues(List<OptionValue> optionValues, Map<String, Object> context, GenericDelegator delegator) { optionValues.add(new OptionValue(key.expandString(context), description.expandString(context))); } @@ -1630,6 +1631,7 @@ this.fieldInfo = fieldInfo; } + @Override public void addOptionValues(List<OptionValue> optionValues, Map<String, Object> context, GenericDelegator delegator) { List<? extends Object> dataList = UtilGenerics.checkList(this.listAcsr.get(context)); if (dataList != null && dataList.size() != 0) { @@ -1697,6 +1699,7 @@ } } + @Override public void addOptionValues(List<OptionValue> optionValues, Map<String, Object> context, GenericDelegator delegator) { // first expand any conditions that need expanding based on the current context EntityCondition findCondition = null; @@ -2046,6 +2049,7 @@ } } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderDisplayField(writer, context, this); } @@ -2161,6 +2165,7 @@ } } + @Override public String getDescription(Map<String, Object> context) { Locale locale = UtilMisc.ensureLocale(context.get("locale")); @@ -2248,6 +2253,7 @@ } } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderHyperlinkField(writer, context, this); } @@ -2604,6 +2610,7 @@ } } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderTextField(writer, context, this); } @@ -2716,6 +2723,7 @@ } } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderTextareaField(writer, context, this); } @@ -2817,6 +2825,7 @@ clock = element.getAttribute("clock"); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderDateTimeField(writer, context, this); } @@ -2940,6 +2949,7 @@ } } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderDropDownField(writer, context, this); } @@ -3044,6 +3054,7 @@ super(element, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderRadioField(writer, context, this); } @@ -3070,6 +3081,7 @@ allChecked = FlexibleStringExpander.getInstance(element.getAttribute("all-checked")); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderCheckField(writer, context, this); } @@ -3108,6 +3120,7 @@ this.backgroundSubmitRefreshTargetExdr = FlexibleStringExpander.getInstance(element.getAttribute("background-submit-refresh-target")); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderSubmitField(writer, context, this); } @@ -3156,6 +3169,7 @@ super(element, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderResetField(writer, context, this); } @@ -3181,6 +3195,7 @@ this.setValue(element.getAttribute("value")); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderHiddenField(writer, context, this); } @@ -3220,6 +3235,7 @@ super(element, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderIgnoredField(writer, context, this); } @@ -3261,6 +3277,7 @@ return this.hideOptions; } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderTextFindField(writer, context, this); } @@ -3280,6 +3297,7 @@ super(fieldSource, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderDateFindField(writer, context, this); } @@ -3307,6 +3325,7 @@ super(fieldSource, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderRangeFindField(writer, context, this); } @@ -3342,6 +3361,7 @@ super(fieldSource, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderLookupField(writer, context, this); } @@ -3373,6 +3393,7 @@ this.descriptionFieldName = str; } + @Override public SubHyperlink getSubHyperlink() { return this.subHyperlink; } @@ -3388,6 +3409,7 @@ super(fieldSource, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderFileField(writer, context, this); } @@ -3403,6 +3425,7 @@ super(fieldSource, modelFormField); } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderPasswordField(writer, context, this); } @@ -3471,6 +3494,7 @@ } } + @Override public void renderFieldString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException { formStringRenderer.renderImageField(writer, context, this); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapperImage.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapperImage.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapperImage.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapperImage.java Sun Jul 5 10:01:19 2009 @@ -50,10 +50,12 @@ super(resourceName, menuName, request, response); } + @Override public MenuStringRenderer getMenuRenderer() { return new HtmlMenuRendererImage(request, response); } + @Override public void init(String resourceName, String menuName, HttpServletRequest request, HttpServletResponse response) throws IOException, SAXException, ParserConfigurationException { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java Sun Jul 5 10:01:19 2009 @@ -422,7 +422,9 @@ public ScreenletMenuRenderer(HttpServletRequest request, HttpServletResponse response) { super(request, response); } + @Override public void renderMenuOpen(Appendable writer, Map<String, Object> context, ModelMenu modelMenu) {} + @Override public void renderMenuClose(Appendable writer, Map<String, Object> context, ModelMenu modelMenu) {} } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java Sun Jul 5 10:01:19 2009 @@ -140,6 +140,7 @@ return new LoopWriter(out) { + @Override public int onStart() throws TemplateModelException, IOException { String renderOnStart = (String)templateCtx.get("renderOnStart"); if (renderOnStart != null && renderOnStart.equalsIgnoreCase("true")) { @@ -148,14 +149,17 @@ return TransformControl.EVALUATE_BODY; } + @Override public void write(char cbuf[], int off, int len) { buf.append(cbuf, off, len); } + @Override public void flush() throws IOException { out.flush(); } + @Override public void close() throws IOException { FreeMarkerWorker.reloadValues(templateCtx, savedValues, env); String wrappedContent = buf.toString(); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java Sun Jul 5 10:01:19 2009 @@ -432,6 +432,7 @@ return this.type; } + @Override public String getBoundaryCommentName() { return menuLocation + "#" + name; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java Sun Jul 5 10:01:19 2009 @@ -138,6 +138,7 @@ } } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -247,6 +248,7 @@ this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global")); } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -287,6 +289,7 @@ this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global")); } + @Override public void runAction(Map<String, Object> context) { // default to false @@ -328,6 +331,7 @@ this.location = scriptElement.getAttribute("location"); } + @Override public void runAction(Map<String, Object> context) { if (location.endsWith(".bsh")) { try { @@ -375,6 +379,7 @@ } } + @Override public void runAction(Map<String, Object> context) { String serviceNameExpanded = this.serviceNameExdr.expandString(context); if (UtilValidate.isEmpty(serviceNameExpanded)) { @@ -423,6 +428,7 @@ finder = new PrimaryKeyFinder(entityOneElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelMenu.getDelegator()); @@ -442,6 +448,7 @@ finder = new ByAndFinder(entityAndElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelMenu.getDelegator()); @@ -461,6 +468,7 @@ finder = new ByConditionFinder(entityConditionElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelMenu.getDelegator()); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java Sun Jul 5 10:01:19 2009 @@ -152,6 +152,7 @@ this.subConditions = readSubConditions(modelMenuItem, condElement); } + @Override public boolean eval(Map<String, Object> context) { // return false for the first one in the list that is false, basic and algo for (MenuCondition subCondition: this.subConditions) { @@ -171,6 +172,7 @@ this.subConditions = readSubConditions(modelMenuItem, condElement); } + @Override public boolean eval(Map<String, Object> context) { // if more than one is true stop immediately and return false; if all are false return false; if only one is true return true boolean foundOneTrue = false; @@ -196,6 +198,7 @@ this.subConditions = readSubConditions(modelMenuItem, condElement); } + @Override public boolean eval(Map<String, Object> context) { // return true for the first one in the list that is true, basic or algo for (MenuCondition subCondition: this.subConditions) { @@ -216,6 +219,7 @@ this.subCondition = readCondition(modelMenuItem, firstChildElement); } + @Override public boolean eval(Map<String, Object> context) { return !this.subCondition.eval(context); } @@ -233,6 +237,7 @@ this.resExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("resource-description")); } + @Override public boolean eval(Map<String, Object> context) { // if no user is logged in, treat as if the user does not have permission GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -302,6 +307,7 @@ this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("action")); } + @Override public boolean eval(Map<String, Object> context) { // if no user is logged in, treat as if the user does not have permission GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -341,6 +347,7 @@ this.classExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("class")); } + @Override public boolean eval(Map<String, Object> context) { String methodName = this.methodExdr.expandString(context); String className = this.classExdr.expandString(context); @@ -408,6 +415,7 @@ this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format")); } + @Override public boolean eval(Map<String, Object> context) { String value = this.valueExdr.expandString(context); String format = this.formatExdr.expandString(context); @@ -458,6 +466,7 @@ this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format")); } + @Override public boolean eval(Map<String, Object> context) { String format = this.formatExdr.expandString(context); @@ -501,6 +510,7 @@ this.exprExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("expr")); } + @Override public boolean eval(Map<String, Object> context) { Object fieldVal = this.fieldAcsr.get(context); String expr = this.exprExdr.expandString(context); @@ -535,6 +545,7 @@ if (this.fieldAcsr.isEmpty()) this.fieldAcsr = FlexibleMapAccessor.getInstance(condElement.getAttribute("field-name")); } + @Override public boolean eval(Map<String, Object> context) { Object fieldVal = this.fieldAcsr.get(context); return ObjectType.isEmpty(fieldVal); @@ -548,6 +559,7 @@ this.permissionChecker = new EntityPermissionChecker(condElement); } + @Override public boolean eval(Map<String, Object> context) { boolean passed = permissionChecker.runPermissionCheck(context); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java Sun Jul 5 10:01:19 2009 @@ -61,6 +61,7 @@ // not sure if this is the best way to get FTL to use my fancy MapModel derivative, but should work at least... public static class ExtendedWrapper extends BeansWrapper { + @Override public TemplateModel wrap(Object object) throws TemplateModelException { /* NOTE: don't use this and the StringHtmlWrapperForFtl or things will be double-encoded if (object instanceof GenericValue) { @@ -79,6 +80,7 @@ public StringHtmlWrapperForFtl(String str, BeansWrapper wrapper) { super(str, wrapper); } + @Override public String getAsString() { return StringUtil.htmlEncoder.encode(super.getAsString()); } @@ -102,12 +104,14 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { for (ModelScreenWidget subWidget : subWidgets) { subWidget.renderWidgetString(writer, context, screenStringRenderer); } } + @Override public String rawString() { StringBuilder buffer = new StringBuilder("<html-widget>"); for (ModelScreenWidget subWidget : subWidgets) { @@ -241,10 +245,12 @@ this.locationExdr = FlexibleStringExpander.getInstance(htmlTemplateElement.getAttribute("location")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { renderHtmlTemplate(writer, this.locationExdr, context); } + @Override public String rawString() { return "<html-template location=\"" + this.locationExdr.getOriginal() + "\"/>"; } @@ -265,6 +271,7 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { // isolate the scope MapStack<String> contextMs; @@ -288,6 +295,7 @@ contextMs.pop(); } + @Override public String rawString() { return "<html-template-decorator location=\"" + this.locationExdr.getOriginal() + "\"/>"; } @@ -305,11 +313,13 @@ this.subWidgets = ModelScreenWidget.readSubWidgets(this.modelScreen, subElementList); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { // render sub-widgets renderSubWidgetsString(this.subWidgets, writer, context, screenStringRenderer); } + @Override public String rawString() { return "<html-template-decorator-section name=\"" + this.name + "\"/>"; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java Sun Jul 5 10:01:19 2009 @@ -96,6 +96,7 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { boolean isEntrySet = false; @@ -399,6 +400,7 @@ } + @Override public String rawString() { // TODO: something more than the empty tag return "<iterate-section/>"; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Sun Jul 5 10:01:19 2009 @@ -144,6 +144,7 @@ } } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -290,6 +291,7 @@ this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global")); } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -353,6 +355,7 @@ this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global")); } + @Override public void runAction(Map<String, Object> context) { //String globalStr = this.globalExdr.expandString(context); // default to false @@ -396,6 +399,7 @@ this.location = scriptElement.getAttribute("location"); } + @Override public void runAction(Map<String, Object> context) throws GeneralException { if (location.endsWith(".bsh")) { try { @@ -443,6 +447,7 @@ this.fieldMap = EntityFinderUtil.makeFieldMap(serviceElement); } + @Override public void runAction(Map<String, Object> context) { String serviceNameExpanded = this.serviceNameExdr.expandString(context); if (UtilValidate.isEmpty(serviceNameExpanded)) { @@ -512,6 +517,7 @@ finder = new PrimaryKeyFinder(entityOneElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelScreen.getDelegator(context)); @@ -531,6 +537,7 @@ finder = new ByAndFinder(entityAndElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelScreen.getDelegator(context)); @@ -550,6 +557,7 @@ finder = new ByConditionFinder(entityConditionElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelScreen.getDelegator(context)); @@ -577,6 +585,7 @@ this.useCache = "true".equals(getRelatedOneElement.getAttribute("use-cache")); } + @Override public void runAction(Map<String, Object> context) { Object valueObject = valueNameAcsr.get(context); if (valueObject == null) { @@ -626,6 +635,7 @@ this.useCache = "true".equals(getRelatedElement.getAttribute("use-cache")); } + @Override public void runAction(Map<String, Object> context) { Object valueObject = valueNameAcsr.get(context); if (valueObject == null) { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java Sun Jul 5 10:01:19 2009 @@ -136,6 +136,7 @@ this.subConditions = readSubConditions(modelScreen, condElement); } + @Override public boolean eval(Map<String, Object> context) { // return false for the first one in the list that is false, basic and algo for (ScreenCondition subCondition: this.subConditions) { @@ -155,6 +156,7 @@ this.subConditions = readSubConditions(modelScreen, condElement); } + @Override public boolean eval(Map<String, Object> context) { // if more than one is true stop immediately and return false; if all are false return false; if only one is true return true boolean foundOneTrue = false; @@ -180,6 +182,7 @@ this.subConditions = readSubConditions(modelScreen, condElement); } + @Override public boolean eval(Map<String, Object> context) { // return true for the first one in the list that is true, basic or algo for (ScreenCondition subCondition: this.subConditions) { @@ -200,6 +203,7 @@ this.subCondition = readCondition(modelScreen, firstChildElement); } + @Override public boolean eval(Map<String, Object> context) { return !this.subCondition.eval(context); } @@ -219,6 +223,7 @@ this.resExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("resource-description")); } + @Override public boolean eval(Map<String, Object> context) { // if no user is logged in, treat as if the user does not have permission GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -298,6 +303,7 @@ this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("action")); } + @Override public boolean eval(Map<String, Object> context) { // if no user is logged in, treat as if the user does not have permission GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -337,6 +343,7 @@ this.classExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("class")); } + @Override public boolean eval(Map<String, Object> context) { String methodName = this.methodExdr.expandString(context); String className = this.classExdr.expandString(context); @@ -404,6 +411,7 @@ this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format")); } + @Override public boolean eval(Map<String, Object> context) { String value = this.valueExdr.expandString(context); String format = this.formatExdr.expandString(context); @@ -454,6 +462,7 @@ this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format")); } + @Override public boolean eval(Map<String, Object> context) { String format = this.formatExdr.expandString(context); @@ -497,6 +506,7 @@ this.exprExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("expr")); } + @Override public boolean eval(Map<String, Object> context) { Object fieldVal = this.fieldAcsr.get(context); String expr = this.exprExdr.expandString(context); @@ -531,6 +541,7 @@ if (this.fieldAcsr.isEmpty()) this.fieldAcsr = FlexibleMapAccessor.getInstance(condElement.getAttribute("field-name")); } + @Override public boolean eval(Map<String, Object> context) { Object fieldVal = this.fieldAcsr.get(context); return ObjectType.isEmpty(fieldVal); @@ -544,6 +555,7 @@ this.permissionChecker = new EntityPermissionChecker(condElement); } + @Override public boolean eval(Map<String, Object> context) { return permissionChecker.runPermissionCheck(context); } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Sun Jul 5 10:01:19 2009 @@ -139,6 +139,7 @@ } } + @Override public boolean boundaryCommentsEnabled() { return modelScreen.boundaryCommentsEnabled(); } @@ -205,6 +206,7 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { // check the condition, if there is one boolean condTrue = true; @@ -250,6 +252,7 @@ } + @Override public String getBoundaryCommentName() { if (isMainSection) { return modelScreen.getSourceLocation() + "#" + modelScreen.getName(); @@ -258,6 +261,7 @@ } } + @Override public String rawString() { return "<section" + (UtilValidate.isNotEmpty(this.name)?" name=\"" + this.name + "\"":"") + ">"; } @@ -284,6 +288,7 @@ this.subWidgets = ModelScreenWidget.readSubWidgets(this.modelScreen, subElementList); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { try { screenStringRenderer.renderContainerBegin(writer, context, this); @@ -315,6 +320,7 @@ return this.autoUpdateInterval; } + @Override public String rawString() { return "<container id=\"" + this.idExdr.getOriginal() + "\" style=\"" + this.styleExdr.getOriginal() + "\" auto-update-target=\"" + this.autoUpdateTargetExdr.getOriginal() + "\">"; } @@ -380,6 +386,7 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { boolean collapsed = initiallyCollapsed; if (this.collapsible) { @@ -445,6 +452,7 @@ return this.tabMenu; } + @Override public String rawString() { return "<screenlet id=\"" + this.idExdr.getOriginal() + "\" title=\"" + this.titleExdr.getOriginal() + "\">"; } @@ -460,6 +468,7 @@ this.styleExdr = FlexibleStringExpander.getInstance(separatorElement.getAttribute("style")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { screenStringRenderer.renderHorizontalSeparator(writer, context, this); } @@ -472,6 +481,7 @@ return this.styleExdr.expandString(context); } + @Override public String rawString() { return "<horizontal-separator id=\"" + this.idExdr.getOriginal() + "\" name=\"" + this.idExdr.getOriginal() + "\" style=\"" + this.styleExdr.getOriginal() + "\">"; } @@ -489,6 +499,7 @@ this.shareScopeExdr = FlexibleStringExpander.getInstance(includeScreenElement.getAttribute("share-scope")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { // if we are not sharing the scope, protect it using the MapStack boolean protectScope = !shareScope(context); @@ -570,6 +581,7 @@ return "true".equals(shareScopeString); } + @Override public String rawString() { return "<include-screen name=\"" + this.nameExdr.getOriginal() + "\" location=\"" + this.locationExdr.getOriginal() + "\" share-scope=\"" + this.shareScopeExdr.getOriginal() + "\"/>"; } @@ -592,6 +604,7 @@ } } + @Override @SuppressWarnings("unchecked") public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { // isolate the scope @@ -656,6 +669,7 @@ return this.locationExdr.expandString(context); } + @Override public String rawString() { return "<decorator-screen name=\"" + this.nameExdr.getOriginal() + "\" location=\"" + this.locationExdr.getOriginal() + "\"/>"; } @@ -671,11 +685,13 @@ this.subWidgets = ModelScreenWidget.readSubWidgets(this.modelScreen, subElementList); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { // render sub-widgets renderSubWidgetsString(this.subWidgets, writer, context, screenStringRenderer); } + @Override public String rawString() { return "<decorator-section name=\"" + this.name + "\">"; } @@ -687,6 +703,7 @@ super(modelScreen, decoratorSectionElement); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { Map<String, ? extends Object> preRenderedContent = UtilGenerics.checkMap(context.get("preRenderedContent")); if (preRenderedContent != null && preRenderedContent.containsKey(this.name)) { @@ -708,6 +725,7 @@ } } + @Override public String rawString() { return "<decorator-section-include name=\"" + this.name + "\">"; } @@ -731,6 +749,7 @@ this.styleExdr = FlexibleStringExpander.getInstance(labelElement.getAttribute("style")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { try { screenStringRenderer.renderLabel(writer, context, this); @@ -758,6 +777,7 @@ return this.styleExdr.expandString(context); } + @Override public String rawString() { return "<label id=\"" + this.idExdr.getOriginal() + "\" style=\"" + this.styleExdr.getOriginal() + "\" text=\"" + this.textExdr.getOriginal() + "\"/>"; } @@ -777,6 +797,7 @@ this.shareScopeExdr = FlexibleStringExpander.getInstance(formElement.getAttribute("share-scope")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { boolean protectScope = !shareScope(context); if (protectScope) { @@ -844,6 +865,7 @@ return "true".equals(shareScopeString); } + @Override public String rawString() { return "<include-form name=\"" + this.nameExdr.getOriginal() + "\" location=\"" + this.locationExdr.getOriginal() + "\" share-scope=\"" + this.shareScopeExdr.getOriginal() + "\"/>"; } @@ -862,6 +884,7 @@ this.shareScopeExdr = FlexibleStringExpander.getInstance(treeElement.getAttribute("share-scope")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { boolean protectScope = !shareScope(context); if (protectScope) { @@ -937,6 +960,7 @@ return "true".equals(shareScopeString); } + @Override public String rawString() { return "<include-tree name=\"" + this.nameExdr.getOriginal() + "\" location=\"" + this.locationExdr.getOriginal() + "\" share-scope=\"" + this.shareScopeExdr.getOriginal() + "\"/>"; } @@ -964,6 +988,7 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { ModelScreenWidget subWidget = null; subWidget = (ModelScreenWidget)subWidgets.get(screenStringRenderer.getRendererName()); @@ -977,6 +1002,7 @@ } } + @Override public String rawString() { Collection<ModelScreenWidget> subWidgetList = this.subWidgets.values(); StringBuilder subWidgetsRawString = new StringBuilder("<platform-specific>"); @@ -1016,6 +1042,7 @@ this.border = subContentElement.getAttribute("border"); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { try { // pushing the contentId on the context as "contentId" is done @@ -1109,6 +1136,7 @@ return this.xmlEscape; } + @Override public String rawString() { // may want to expand this a bit more return "<content content-id=\"" + this.contentId.getOriginal() + "\" xml-escape=\"" + this.xmlEscape + "\"/>"; @@ -1150,6 +1178,7 @@ this.xmlEscape = "true".equals(subContentElement.getAttribute("xml-escape")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { try { screenStringRenderer.renderSubContentBegin(writer, context, this); @@ -1186,6 +1215,7 @@ return this.xmlEscape; } + @Override public String rawString() { // may want to expand this a bit more return "<sub-content content-id=\"" + this.contentId.getOriginal() + "\" map-key=\"" + this.mapKey.getOriginal() + "\" xml-escape=\"" + this.xmlEscape + "\"/>"; @@ -1203,6 +1233,7 @@ this.locationExdr = FlexibleStringExpander.getInstance(menuElement.getAttribute("location")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws IOException { // try finding the menuStringRenderer by name in the context in case one was prepared and put there MenuStringRenderer menuStringRenderer = (MenuStringRenderer) context.get("menuStringRenderer"); @@ -1253,6 +1284,7 @@ return this.locationExdr.expandString(context); } + @Override public String rawString() { return "<include-menu name=\"" + this.nameExdr.getOriginal() + "\" location=\"" + this.locationExdr.getOriginal() + "\"/>"; } @@ -1301,6 +1333,7 @@ } } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { try { screenStringRenderer.renderLink(writer, context, this); @@ -1430,6 +1463,7 @@ this.image = img; } + @Override public String rawString() { // may want to add more to this return "<link id=\"" + this.idExdr.getOriginal() + "\" style=\"" + this.styleExdr.getOriginal() + "\" text=\"" + this.textExdr.getOriginal() + "\" target=\"" + this.targetExdr.getOriginal() + "\" name=\"" + this.nameExdr.getOriginal() + "\" url-mode=\"" + this.urlMode + "\"/>"; @@ -1459,6 +1493,7 @@ setUrlMode(UtilFormatOut.checkEmpty(imageElement.getAttribute("url-mode"), "content")); } + @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) { try { screenStringRenderer.renderImage(writer, context, this); @@ -1533,6 +1568,7 @@ } } + @Override public String rawString() { // may want to add more to this return "<image id=\"" + this.idExdr.getOriginal() + "\" style=\"" + this.styleExdr.getOriginal() + "\" src=\"" + this.srcExdr.getOriginal() + "\" url-mode=\"" + this.urlMode + "\"/>"; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenXmlViewHandler.java Sun Jul 5 10:01:19 2009 @@ -40,6 +40,7 @@ public static final String module = ScreenXmlViewHandler.class.getName(); + @Override public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException { Writer writer = null; try { Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java Sun Jul 5 10:01:19 2009 @@ -184,6 +184,7 @@ return this.trailNameExdr.expandString(context); } + @Override public String getBoundaryCommentName() { return treeLocation + "#" + name; } Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java Sun Jul 5 10:01:19 2009 @@ -128,6 +128,7 @@ } } + @Override public void runAction(Map<String, Object> context) { String globalStr = this.globalExdr.expandString(context); // default to false @@ -184,6 +185,7 @@ this.location = scriptElement.getAttribute("location"); } + @Override public void runAction(Map<String, Object> context) { if (location.endsWith(".bsh")) { try { @@ -247,6 +249,7 @@ this.fieldMap = EntityFinderUtil.makeFieldMap(serviceElement); } + @Override public void runAction(Map<String, Object> context) { String serviceNameExpanded = this.serviceNameExdr.expandString(context); if (UtilValidate.isEmpty(serviceNameExpanded)) { @@ -336,6 +339,7 @@ finder = new PrimaryKeyFinder(entityOneElement); } + @Override public void runAction(Map<String, Object> context) { try { finder.runFind(context, this.modelTree.getDelegator()); @@ -364,6 +368,7 @@ finder = new ByAndFinder(entityAndElement); } + @Override public void runAction(Map<String, Object> context) { try { context.put(this.listName, null); @@ -403,6 +408,7 @@ finder = new ByConditionFinder(entityConditionElement); } + @Override public void runAction(Map<String, Object> context) { try { context.put(this.listName, null); Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java Sun Jul 5 10:01:19 2009 @@ -124,6 +124,7 @@ this.subConditions = readSubConditions(modelTree, condElement); } + @Override public boolean eval(Map<String, ? extends Object> context) { // return false for the first one in the list that is false, basic and algo for (TreeCondition subCondition: subConditions) { @@ -143,6 +144,7 @@ this.subConditions = readSubConditions(modelTree, condElement); } + @Override public boolean eval(Map<String, ? extends Object> context) { // if more than one is true stop immediately and return false; if all are false return false; if only one is true return true boolean foundOneTrue = false; @@ -168,6 +170,7 @@ this.subConditions = readSubConditions(modelTree, condElement); } + @Override public boolean eval(Map<String, ? extends Object> context) { // return true for the first one in the list that is true, basic or algo for (TreeCondition subCondition: subConditions) { @@ -188,6 +191,7 @@ this.subCondition = readCondition(modelTree, firstChildElement); } + @Override public boolean eval(Map<String, ? extends Object> context) { return !this.subCondition.eval(context); } @@ -203,6 +207,7 @@ this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("action")); } + @Override public boolean eval(Map<String, ? extends Object> context) { // if no user is logged in, treat as if the user does not have permission GenericValue userLogin = (GenericValue) context.get("userLogin"); @@ -242,6 +247,7 @@ this.classExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("class")); } + @Override public boolean eval(Map<String, ? extends Object> context) { String methodName = this.methodExdr.expandString(context); String className = this.classExdr.expandString(context); @@ -309,6 +315,7 @@ this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format")); } + @Override public boolean eval(Map<String, ? extends Object> context) { String value = this.valueExdr.expandString(context); String format = this.formatExdr.expandString(context); @@ -359,6 +366,7 @@ this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format")); } + @Override public boolean eval(Map<String, ? extends Object> context) { String format = this.formatExdr.expandString(context); @@ -402,6 +410,7 @@ this.exprExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("expr")); } + @Override public boolean eval(Map<String, ? extends Object> context) { Object fieldVal = this.fieldAcsr.get(context); String expr = this.exprExdr.expandString(context); @@ -436,6 +445,7 @@ if (this.fieldAcsr.isEmpty()) this.fieldAcsr = FlexibleMapAccessor.getInstance(condElement.getAttribute("field-name")); } + @Override public boolean eval(Map<String, ? extends Object> context) { Object fieldVal = this.fieldAcsr.get(context); return ObjectType.isEmpty(fieldVal); @@ -449,6 +459,7 @@ this.permissionChecker = new EntityPermissionChecker(condElement); } + @Override public boolean eval(Map<String, ? extends Object> context) { boolean passed = permissionChecker.runPermissionCheck(context); Modified: ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java (original) +++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java Sun Jul 5 10:01:19 2009 @@ -50,6 +50,7 @@ } + @Override public SearchResult getLdapSearchResult(String username, String password, Element rootElement, boolean bindRequired) throws NamingException { DirContext ctx = null; Modified: ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java?rev=791212&r1=791211&r2=791212&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java (original) +++ ofbiz/trunk/specialpurpose/ldap/src/org/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java Sun Jul 5 10:01:19 2009 @@ -58,6 +58,7 @@ } + @Override public String login(HttpServletRequest request, HttpServletResponse response, Element rootElement) throws Exception { String ticket = request.getParameter(PARAM_TICKET); @@ -140,6 +141,7 @@ return randomString(5, 15); } + @Override public String logout(HttpServletRequest request, HttpServletResponse response, Element rootElement) { String casUrl = UtilXml.childElementValue(rootElement, "CasUrl", "https://localhost:8443/cas"); String logoutUri = UtilXml.childElementValue(rootElement, "CasLogoutUri", "/logout"); @@ -152,6 +154,7 @@ } + @Override public SearchResult getLdapSearchResult(String username, String password, Element rootElement, boolean bindRequired) throws NamingException { String className = UtilXml.childElementValue(rootElement, "CasLdapHandler", "org.ofbiz.ldap.openldap.OFBizLdapAuthenticationHandler"); @@ -177,6 +180,7 @@ * @param rootElement Element root element of ldap config file * @return true if the user has logged out from ldap; otherwise, false. */ + @Override public boolean hasLdapLoggedOut(HttpServletRequest request, HttpServletResponse response, Element rootElement) { String casTGC = UtilXml.childElementValue(rootElement, "CasTGTCookieName", "CASTGC"); String casUrl = UtilXml.childElementValue(rootElement, "CasUrl", "https://localhost:8443/cas"); |
Free forum by Nabble | Edit this page |