Skip to content

Instantly share code, notes, and snippets.

@romartin
Created December 15, 2015 23:42
Show Gist options
  • Select an option

  • Save romartin/d9f24342f1e0e53b9246 to your computer and use it in GitHub Desktop.

Select an option

Save romartin/d9f24342f1e0e53b9246 to your computer and use it in GitHub Desktop.
/*
* Copyright 2015 JBoss, by Red Hat, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.uberfire.ext.wirez.core.api.impl.property;
import org.jboss.errai.common.client.api.annotations.MapsTo;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.uberfire.ext.wirez.core.api.model.property.Property;
@Portable
public class StringProperty extends BaseProperty<String> {
public StringProperty(@MapsTo("id") final String id,
@MapsTo("caption") final String caption,
@MapsTo("description") final String description,
@MapsTo("isReadOnly") final boolean isReadOnly,
@MapsTo("isOptional") final boolean isOptional,
@MapsTo("defaultValue") final String defaultValue) {
super(id, caption, description, isReadOnly, isOptional, defaultValue);
}
@Override
public Property copy() {
return new StringProperty(this.id,
this.caption,
this.description,
this.isReadOnly,
this.isOptional,
this.defaultValue);
}
@Override
public StringType getType() {
return new StringType();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment