made first demo almost fully working
This commit is contained in:
parent
2a0d992642
commit
01b3b5cc54
104 changed files with 3259 additions and 2181 deletions
|
|
@ -37,9 +37,11 @@ import java.util.Map;
|
|||
abstract public class AbstractVascEntryControllerLocal implements VascEntryControllerLocal {
|
||||
|
||||
private Map<String,VascEntryLocal> entries = null;
|
||||
private Map<String,VascEntryGroupLocal> groups = null;
|
||||
|
||||
public AbstractVascEntryControllerLocal() {
|
||||
entries = new HashMap<String,VascEntryLocal>(1000);
|
||||
entries = Collections.synchronizedMap(new HashMap<String,VascEntryLocal>(1000));
|
||||
groups = Collections.synchronizedMap(new HashMap<String,VascEntryGroupLocal>(100));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -93,4 +95,74 @@ abstract public class AbstractVascEntryControllerLocal implements VascEntryContr
|
|||
Collections.sort(result); // lets do abc for consistance behauvior.
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryByGroupId(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public List<String> getVascEntryByGroupId(String groupId) {
|
||||
if (groupId==null) {
|
||||
throw new NullPointerException("Can't search null groupId.");
|
||||
}
|
||||
List<String> result = new ArrayList<String>(40);
|
||||
for (VascEntryLocal entry:entries.values()) {
|
||||
if (groupId.equals(entry.getVascGroupId())) {
|
||||
result.add(entry.getId());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryGroupById(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public VascEntryGroup getVascEntryGroupById(String id) {
|
||||
VascEntryGroupLocal result = groups.get(id);
|
||||
if (result==null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return result.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new NullPointerException("Could not clone entry: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryGroupIds()
|
||||
*/
|
||||
@Override
|
||||
public List<String> getVascEntryGroupIds() {
|
||||
List<String> result = new ArrayList<String>(groups.keySet());
|
||||
Collections.sort(result); // lets do abc for consistance behauvior.
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#addVascEntryGroup(net.forwardfire.vasc.core.VascEntryGroupLocal)
|
||||
*/
|
||||
@Override
|
||||
public void addVascEntryGroup(VascEntryGroupLocal group) {
|
||||
if (group==null) {
|
||||
throw new NullPointerException("Can't add null VascEntryGroup.");
|
||||
}
|
||||
if (group.getId()==null) {
|
||||
throw new NullPointerException("Can't add VascEntryGroup with null Id.");
|
||||
}
|
||||
|
||||
// TODO: move
|
||||
if (group.getName()==null) {
|
||||
group.setName("vasc.entry.group."+group.getId()+".name");
|
||||
}
|
||||
if (group.getDescription()==null) {
|
||||
group.setDescription("vasc.entry.group."+group.getId()+".description");
|
||||
}
|
||||
if (group.getImage()==null) {
|
||||
group.setImage("vasc.entry.group."+group.getId()+".image");
|
||||
}
|
||||
//group.getHelpId()
|
||||
|
||||
groups.put(group.getId(), group);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleViewOrderMetaLocal;
|
||||
|
||||
/**
|
||||
* AbstractVascEntryGroupLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nov 23, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascEntryGroupLocal extends AbstractVascBaseIdRoleViewOrderMetaLocal implements VascEntryGroupLocal {
|
||||
|
||||
@Override
|
||||
public VascEntryGroupLocal clone() throws CloneNotSupportedException {
|
||||
Object clone = cloneCreate();
|
||||
cloneFields(clone);
|
||||
return (VascEntryGroupLocal)clone;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
|
||||
super.cloneFields(cloneObject);
|
||||
VascEntryGroupLocal clone = (VascEntryGroupLocal)cloneObject;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ abstract public class AbstractVascEntryLinkLocal extends AbstractVascBaseIdRoleV
|
|||
private String vascEntryId = null;
|
||||
private Map<String,String> entryParameterFieldIds = new HashMap<String,String>(3);
|
||||
private Map<String,String> entryCreateFieldValues = new HashMap<String,String>(3);
|
||||
private VascEntryLinkType vascLinkEntryType = null;
|
||||
private VascEntryLinkType vascEntryLinkType = null;
|
||||
private String doActionId = null;
|
||||
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ abstract public class AbstractVascEntryLinkLocal extends AbstractVascBaseIdRoleV
|
|||
VascEntryLinkLocal clone = (VascEntryLinkLocal)cloneObject;
|
||||
clone.setVascEntryId(getVascEntryId());
|
||||
clone.setDoActionId(getDoActionId());
|
||||
clone.setVascLinkEntryType(getVascLinkEntryType());
|
||||
clone.setVascEntryLinkType(getVascEntryLinkType());
|
||||
for (String key:getEntryParameterFieldIdKeys()) {
|
||||
clone.addEntryParameterFieldId(key, getEntryParameterFieldId(key));
|
||||
}
|
||||
|
|
@ -104,15 +104,15 @@ abstract public class AbstractVascEntryLinkLocal extends AbstractVascBaseIdRoleV
|
|||
/**
|
||||
* @return the vascLinkEntryType
|
||||
*/
|
||||
public VascEntryLinkType getVascLinkEntryType() {
|
||||
return vascLinkEntryType;
|
||||
public VascEntryLinkType getVascEntryLinkType() {
|
||||
return vascEntryLinkType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vascLinkEntryType the vascLinkEntryType to set
|
||||
*/
|
||||
public void setVascLinkEntryType(VascEntryLinkType vascLinkEntryType) {
|
||||
this.vascLinkEntryType = vascLinkEntryType;
|
||||
public void setVascEntryLinkType(VascEntryLinkType vascEntryLinkType) {
|
||||
this.vascEntryLinkType = vascEntryLinkType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
private Boolean vascDisplayOnly = null; // todo rename
|
||||
private Boolean delete = null;
|
||||
private String rolesDelete = null;
|
||||
|
||||
private VascEntryAccessType accessType = null;
|
||||
|
||||
private List<VascEntryFieldLocal> vascFields = null;
|
||||
private List<RowVascActionLocal> rowActions = null;
|
||||
private List<ColumnVascActionLocal> columnActions = null;
|
||||
|
|
@ -75,8 +76,8 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
private List<GlobalVascActionLocal> exportActions = null;
|
||||
private List<VascEntryFieldSetLocal> vascEntryFieldSets = null;
|
||||
private List<VascEntryLinkLocal> vascEntryLinks = null;
|
||||
|
||||
private Map<String,Object> entryParameters = null;
|
||||
|
||||
private Map<String,Object> entryParameters = null;
|
||||
private VascEntryFieldEventChannel vascEntryFieldEventChannel = null;
|
||||
private Map<String,List<String>> eventEntryFrontendEventListeners = null;
|
||||
private List<String> eventEntryBackendEventListeners = null;
|
||||
|
|
@ -85,6 +86,7 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
private Map<String,List<String>> eventEntryFrontendActions = null;
|
||||
|
||||
private String backendId = null;
|
||||
private String vascGroupId = null;
|
||||
private VascFrontendController vascFrontendData = null;
|
||||
|
||||
public AbstractVascEntryLocal() {
|
||||
|
|
@ -134,6 +136,7 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
|
||||
clone.setDelete(getDelete());
|
||||
clone.setRolesDelete(getRolesDelete());
|
||||
clone.setAccessType(getAccessType());
|
||||
|
||||
for (VascEntryFieldLocal field:getVascEntryFieldsLocal()) {
|
||||
VascEntryFieldLocal fieldClone = field.clone();
|
||||
|
|
@ -185,6 +188,7 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
}
|
||||
}
|
||||
clone.setBackendId(getBackendId());
|
||||
clone.setVascGroupId(getVascGroupId());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -900,4 +904,32 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
public void setVascDisplayOnly(Boolean vascDisplayOnly) {
|
||||
this.vascDisplayOnly = vascDisplayOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the vascGroupId
|
||||
*/
|
||||
public String getVascGroupId() {
|
||||
return vascGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param vascGroupId the vascGroupId to set
|
||||
*/
|
||||
public void setVascGroupId(String vascGroupId) {
|
||||
this.vascGroupId = vascGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the accessType
|
||||
*/
|
||||
public VascEntryAccessType getAccessType() {
|
||||
return accessType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param accessType the accessType to set
|
||||
*/
|
||||
public void setAccessType(VascEntryAccessType accessType) {
|
||||
this.accessType = accessType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,6 +117,11 @@ public interface VascEntry extends VascBaseIdRoleCrud {
|
|||
*/
|
||||
public String getRolesDelete();
|
||||
|
||||
/**
|
||||
* @return the accessType
|
||||
*/
|
||||
public VascEntryAccessType getAccessType();
|
||||
|
||||
/**
|
||||
* @return the vascFields
|
||||
*/
|
||||
|
|
@ -196,6 +201,8 @@ public interface VascEntry extends VascBaseIdRoleCrud {
|
|||
|
||||
public String getBackendId();
|
||||
|
||||
public String getVascGroupId();
|
||||
|
||||
/**
|
||||
* @return the vascDisplayOnly
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* The type of a VascEntryAccessType
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nov 25, 2012
|
||||
*/
|
||||
public enum VascEntryAccessType implements Serializable {
|
||||
|
||||
DIRECT,
|
||||
DIRECT_PARAMETER,
|
||||
ENTRY_LIST,
|
||||
ENTRY_LINK;
|
||||
|
||||
public static VascEntryAccessType DEFAULT_TYPE = VascEntryAccessType.DIRECT;
|
||||
}
|
||||
|
|
@ -35,4 +35,10 @@ public interface VascEntryController {
|
|||
public VascEntry getVascEntryById(String id);
|
||||
|
||||
public List<String> getVascEntryIds();
|
||||
|
||||
public List<String> getVascEntryByGroupId(String groupId);
|
||||
|
||||
public VascEntryGroup getVascEntryGroupById(String id);
|
||||
|
||||
public List<String> getVascEntryGroupIds();
|
||||
}
|
||||
|
|
@ -37,4 +37,6 @@ public interface VascEntryControllerLocal extends VascEntryController {
|
|||
public void removeVascEntry(String entryId);
|
||||
|
||||
public VascEntryLocal getMasterVascEntryById(String entryId);
|
||||
|
||||
public void addVascEntryGroup(VascEntryGroupLocal group);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import net.forwardfire.vasc.core.base.VascBaseIdRoleViewOrderMeta;
|
||||
|
||||
/**
|
||||
* VascLinkGroup binds multiple entries as one group.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nove 23, 2012
|
||||
*/
|
||||
public interface VascEntryGroup extends VascBaseIdRoleViewOrderMeta {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import net.forwardfire.vasc.core.base.VascBaseIdRoleViewOrderMetaLocal;
|
||||
|
||||
/**
|
||||
* VascEntryGroupLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nov 23, 2012
|
||||
*/
|
||||
public interface VascEntryGroupLocal extends VascEntryGroup,VascBaseIdRoleViewOrderMetaLocal {
|
||||
|
||||
/**
|
||||
* Force impl to have public clone methode
|
||||
* @return
|
||||
* @throws CloneNotSupportedException
|
||||
*/
|
||||
public VascEntryGroupLocal clone() throws CloneNotSupportedException;
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ public interface VascEntryLink extends VascBaseIdRoleViewOrderMeta {
|
|||
/**
|
||||
* @return the vascLinkEntryType
|
||||
*/
|
||||
public VascEntryLinkType getVascLinkEntryType();
|
||||
public VascEntryLinkType getVascEntryLinkType();
|
||||
|
||||
/**
|
||||
* @return the doActionId
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public interface VascEntryLinkLocal extends VascEntryLink,VascBaseIdRoleViewOrde
|
|||
/**
|
||||
* @param vascLinkEntryType the vascLinkEntryType to set
|
||||
*/
|
||||
public void setVascLinkEntryType(VascEntryLinkType vascLinkEntryType);
|
||||
public void setVascEntryLinkType(VascEntryLinkType vascLinkEntryType);
|
||||
|
||||
/**
|
||||
* @param doActionId the doActionId to set
|
||||
|
|
|
|||
|
|
@ -116,6 +116,11 @@ public interface VascEntryLocal extends VascEntry,VascBaseIdRoleCrudLocal {
|
|||
*/
|
||||
public void setRolesDelete(String rolesDelete);
|
||||
|
||||
/**
|
||||
* @param accessType the accessType to set
|
||||
*/
|
||||
public void setAccessType(VascEntryAccessType accessType);
|
||||
|
||||
/**
|
||||
* @param vascField the vascField to add
|
||||
*/
|
||||
|
|
@ -221,12 +226,12 @@ public interface VascEntryLocal extends VascEntry,VascBaseIdRoleCrudLocal {
|
|||
*/
|
||||
public Collection<VascEntryLinkLocal> getVascEntryLinksLocal();
|
||||
|
||||
|
||||
public void setVascFrontendController(VascFrontendController vascFrontendData);
|
||||
|
||||
public void setVascFrontendController(VascFrontendController vascFrontendData);
|
||||
|
||||
public void setBackendId(String backendId);
|
||||
|
||||
public void setBackendId(String backendId);
|
||||
|
||||
public void setVascGroupId(String groupId);
|
||||
|
||||
/**
|
||||
* @param vascDisplayOnly the vascDisplayOnly to set
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.impl;
|
||||
|
||||
import net.forwardfire.vasc.core.AbstractVascEntryGroupLocal;
|
||||
|
||||
/**
|
||||
* DefaultVascEntryGroup
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nov 23, 2012
|
||||
*/
|
||||
public class DefaultVascEntryGroup extends AbstractVascEntryGroupLocal {
|
||||
|
||||
private static final long serialVersionUID = 853182253019347410L;
|
||||
}
|
||||
|
|
@ -182,8 +182,8 @@ public class VascDefaultsFinalizer implements VascEntryConfigFinalizer {
|
|||
if (vle.getVascEntryId()==null) {
|
||||
throw new IllegalArgumentException("All VascLinkEntry need an vascEntryId: "+id);
|
||||
}
|
||||
if (vle.getVascLinkEntryType()==null) {
|
||||
vle.setVascLinkEntryType(VascEntryLinkType.DEFAULT_TYPE);
|
||||
if (vle.getVascEntryLinkType()==null) {
|
||||
vle.setVascEntryLinkType(VascEntryLinkType.DEFAULT_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper {
|
|||
result.add(link);
|
||||
continue;
|
||||
}
|
||||
if (type.equals(link.getVascLinkEntryType())) {
|
||||
if (type.equals(link.getVascEntryLinkType())) {
|
||||
result.add(link);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import net.forwardfire.vasc.core.VascEntryConfigController;
|
|||
import net.forwardfire.vasc.core.VascEntryController;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldTypeController;
|
||||
import net.forwardfire.vasc.core.VascEntryGroup;
|
||||
import net.forwardfire.vasc.core.VascEventChannelController;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
|
||||
|
|
@ -139,6 +140,15 @@ public class JndiVascControllerFactory implements ObjectFactory {
|
|||
public VascEntry getVascEntryById(String id) {
|
||||
return entryController.getVascEntryById(id);
|
||||
}
|
||||
public List<String> getVascEntryByGroupId(String groupId) {
|
||||
return entryController.getVascEntryByGroupId(groupId);
|
||||
}
|
||||
public VascEntryGroup getVascEntryGroupById(String id) {
|
||||
return entryController.getVascEntryGroupById(id);
|
||||
}
|
||||
public List<String> getVascEntryGroupIds() {
|
||||
return entryController.getVascEntryGroupIds();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ package net.forwardfire.vasc.impl.x4o;
|
|||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntryController;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryGroupLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
|
||||
import org.x4o.xml.element.AbstractElementConfigurator;
|
||||
|
|
@ -43,14 +44,22 @@ public class VascEntryElementConfigurator extends AbstractElementConfigurator {
|
|||
* @see org.x4o.xml.element.AbstractElementConfigurator#doConfigEndTag(org.x4o.xml.element.Element)
|
||||
*/
|
||||
public void doConfigElement(Element element) throws ElementConfiguratorException {
|
||||
VascEntryLocal entry = (VascEntryLocal)element.getElementObject();
|
||||
Object elementObject = element.getElementObject();
|
||||
VascController vascController = VascParser.getVascController(element.getElementLanguage());
|
||||
VascEntryController entryController = vascController.getVascEntryController();
|
||||
|
||||
if (entryController instanceof VascEntryControllerLocal) {
|
||||
((VascEntryControllerLocal)entryController).addVascEntry(entry);
|
||||
if (elementObject instanceof VascEntryLocal) {
|
||||
VascEntryLocal entry = (VascEntryLocal)elementObject;
|
||||
((VascEntryControllerLocal)entryController).addVascEntry(entry);
|
||||
} else if (elementObject instanceof VascEntryGroupLocal) {
|
||||
VascEntryGroupLocal entryGroup = (VascEntryGroupLocal)elementObject;
|
||||
((VascEntryControllerLocal)entryController).addVascEntryGroup(entryGroup);
|
||||
} else {
|
||||
throw new ElementConfiguratorException(this,"ElementObject is unknown instance: "+elementObject);
|
||||
}
|
||||
} else {
|
||||
throw new ElementConfiguratorException(this,"Can not add entry '"+entry.getId()+"' to VascEntryController because we have no access to VascEntryControllerLocal interface.");
|
||||
throw new ElementConfiguratorException(this,"Can not run configurator because we have no access to VascEntryControllerLocal interface.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -47,8 +47,14 @@
|
|||
>
|
||||
|
||||
<!-- Object for building an entry -->
|
||||
<eld:element tag="entryGroup" objectClass="net.forwardfire.vasc.impl.DefaultVascEntryGroup" >
|
||||
<eld:configurator id="entryGroup-VascEntryElementConfigurator" bean.class="net.forwardfire.vasc.impl.x4o.VascEntryElementConfigurator" configAction="true"/>
|
||||
</eld:element>
|
||||
<eld:element tag="entry" objectClass="net.forwardfire.vasc.impl.DefaultVascEntry" >
|
||||
<eld:configurator id="entry-VascEntryElementConfigurator" bean.class="net.forwardfire.vasc.impl.x4o.VascEntryElementConfigurator" configAction="true"/>
|
||||
<eld:attribute name="accessType">
|
||||
<conv:enumConverter enumClass="net.forwardfire.vasc.core.VascEntryAccessType"/>
|
||||
</eld:attribute>
|
||||
</eld:element>
|
||||
<eld:element tag="field" objectClass="net.forwardfire.vasc.impl.DefaultVascEntryField" elementClass="net.forwardfire.vasc.impl.x4o.VascEntryFieldElement">
|
||||
<eld:attribute name="vascEntryFieldType" runBeanFill="false"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue