Examples of ContentModel


Examples of com.agiletec.plugins.jacms.aps.system.services.contentmodel.ContentModel

public class FrontContentAction extends ContentAction {
 
  public String editView() {
    try {
      String modelIdString = this.getRequest().getParameter("modelId");
      ContentModel model = this.getContentModel(modelIdString);
      if (null == model) {
        modelIdString = this.getContentManager().getDefaultModel(this.getContentId());
        model = this.getContentModel(modelIdString);
      }
      this.setContentModel(model);
      if (null == model) {
        return this.edit();
      }
      if (!this.getContentId().startsWith(model.getContentType())) {
        throw new ApsSystemException("Invalid model id " + model.getId() +
            " of type " + model.getContentType() + " for content " + this.getContentId());
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "editView");
      return FAILURE;
    }
View Full Code Here

Examples of com.softserve.academy.food.model.ContentModel

        dish = content.getDish().toEntity();
        quantity = content.getQuantity();
    }

    public ContentModel toModel() {
        return new ContentModel(this);
    }
View Full Code Here

Examples of com.volantis.mcs.xml.schema.model.ContentModel

    }

    public ElementValidator build(ElementSchema schema) {

        ElementType type = schema.getElementType();
        ContentModel model = schema.getContentModel();
        boolean useAnywhere = schema.getUseAnywhere();
        boolean transparent = schema.isTransparent();
        if (!transparent && model == null) {
            throw new IllegalStateException("Model not provided: " +
                    type);
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

     * passed as parameter Verifies that an instance is created. Fields content
     * and next are null and type is 0.
     */
    public void testContentModelElement001() {
        try {
            cm = new ContentModel(null);
            assertNotNull(cm);
            assertNull(cm.content);
            assertEquals(0, cm.type);
            assertNull(cm.next);
        } catch (Exception e) {
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

     * and next is null.
     */
    public void testContentModelElement003() {
        try {
            dtd = new DTDGetter("TestContentModelSemantic");
            ContentModel cm2 = new ContentModel('*', new ContentModel());
            BitSet bs1 = new BitSet(0);
            bs1.set(1);
            BitSet bs2 = new BitSet(168);
            bs2.set(45);
            AttributeList al = new AttributeList("1");
            Element el = dtd.defineElement("elemento", ',', false, false, cm2,
                    bs1, bs2, al);
            cm = new ContentModel(el);
            assertNotNull(cm);
            assertEquals(el, cm.content);
            assertEquals(cm2, el.content);
            assertEquals(el, cm.content);
            assertEquals(0, cm.type);
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

     * content is equal to el ,type is 0 and next is null.
     */
    public void testContentModelElement004() {
        try {
            dtd = new DTDGetter("TestContentModelSemantic");
            ContentModel cm2 = new ContentModel('*', new ContentModel());
            BitSet bs1 = new BitSet(128);
            bs1.set(1);
            BitSet bs2 = new BitSet(7);
            AttributeList al = new AttributeList("bigC", -2147483648, -1,
                    "value", new Vector(), new AttributeList(null));
            Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
                    al);
            cm = new ContentModel(el);
            assertNotNull(cm);
            assertEquals(el, cm.content);
            assertEquals(cm2, el.content);
            assertEquals(el, cm.content);
            assertEquals(0, cm.type);
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

    public void testContentModelElement005() {
        try {
            dtd = new DTDGetter("TestContentModelSemantic");
            Element el = dtd.defineElement("1", 0, true, true, null, null,
                    null, null);
            cm = new ContentModel(el);
            assertNotNull(cm);
            assertEquals(el, cm.content);
            assertNull(el.content);
            assertEquals(el, cm.content);
            assertEquals(0, cm.type);
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

     * instance is created. content is equal to new ContentModel(), type is 0
     * and next is null
     */
    public void testContentModelIntContentModel001() {
        try {
            ContentModel cm2 = new ContentModel();
            cm = new ContentModel(0, cm2);
            assertNotNull(cm);
            assertEquals(cm2, cm.content);
            assertEquals(0, cm.type);
            assertNull(cm.next);
        } catch (Exception e) {
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

     * that an instance is created. content is equal to ContentModel(), type is
     * Integer.MIN_VALUE and next is null
     */
    public void testContentModelIntContentModel002() {
        try {
            ContentModel cm2 = new ContentModel();
            cm = new ContentModel(Integer.MIN_VALUE, cm2);
            assertNotNull(cm);
            assertEquals(cm2, cm.content);
            assertEquals(Integer.MIN_VALUE, cm.type);
            assertNull(cm.next);
        } catch (Exception e) {
View Full Code Here

Examples of javax.swing.text.html.parser.ContentModel

     * that an instance is created. content is equal to ContentModel(), type is
     * Integer.MAX_VALUE and next is null
     */
    public void testContentModelIntContentModel003() {
        try {
            ContentModel cm2 = new ContentModel();
            cm = new ContentModel(Integer.MAX_VALUE, cm2);
            assertNotNull(cm);
            assertEquals(cm2, cm.content);
            assertEquals(Integer.MAX_VALUE, cm.type);
            assertNull(cm.next);
        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.