package woko.facets.builtin.developer;

import net.sourceforge.jfacets.annotations.FacetKey;
import woko.facets.BaseForwardResolutionFacet;
import woko.persistence.ObjectStore;

import java.util.ArrayList;
import java.util.List;

@FacetKey(name="create", profileId="developer")
public class Create extends BaseForwardResolutionFacet {

  public String getPath() {
    return "/WEB-INF/woko/jsp/developer/create.jsp";
  }

  public List<String> getMappedClasses() {
    List<String> res = new ArrayList<String>();
    ObjectStore os = getFacetContext().getWoko().getObjectStore();
    List<Class<?>> mappedClasses = os.getMappedClasses();
    for (Class<?> c : mappedClasses) {
      res.add(os.getClassMapping(c));
    }
    return res;
  }


}

@@ -171,16 +171,51 @@
 Store;%0A%0A
+import java.lang.reflect.Modifier;%0A
 import j
@@ -701,24 +701,78 @@
 dClasses) %7B%0A
+      if (!Modifier.isAbstract(c.getModifiers())) %7B%0A  
       res.ad
@@ -797,16 +797,24 @@
 ng(c));%0A
+      %7D%0A
     %7D%0A  

fix #15