Tuesday, July 24, 2012

Announcing Sapphire 0.5.2 Release

On behalf of all who contributed, I am very proud to announce availability of Sapphire 0.5.2 release. This maintenance release includes bug fixes for issues raised by adopters. Adopters of 0.5 and 0.5.1 releases can expect full backwards compatibility. No migration guide is being published.

This is the first release of Sapphire built from source hosted in the new Git Repository. The old CVS repository will continue to be available for some time as a read-only snapshot at the time of Git migration. New changes will not be visible in the CVS repository.

Developer Guide
Downloads

Tuesday, July 3, 2012

Versions and Version Constraints

The following is a preview of functionality in the upcoming Sapphire 0.6 release. If you are new to Sapphire, get introduced, download the latest release and ask questions.

In many complex Sapphire models, it is useful to be able to constrain functionality based on a version. To simplify these scenarios, Sapphire now has native constructs for dealing with versions and version constraints.

Version - Represents a version as a sequence of long integers. In string format, it is represented as a dot-separated list of numeric segments, such as "1.2.3" or "5.7.3.2012070310003".

VersionConstraint - A boolean expression that can check versions for applicability. In string format, it is represented as a comma-separated list of specific versions, closed ranges (expressed using "[1.2.3-4.5)" syntax and open ranges (expressed using "[1.2.3" or "4.5)" syntax). The square brackets indicate that the range includes the specified version. The parenthesis indicate that the range goes up to, but does not actually include the specified version.

Sapphire.version() - Determines the version of Sapphire.

Both Version and VersionConstraint classes can be used as a type of a value property.

Example

// *** Version ***
    
@Type( base = Version.class )

ValueProperty PROP_VERSION = new ValueProperty( TYPE, "Version" );
    
Value<Version> getVersion();
void setVersion( String value );
void setVersion( Version value );
    
// *** VersionConstraint ***
    
@Type( base = VersionConstraint.class )

ValueProperty PROP_VERSION_CONSTRAINT = new ValueProperty( TYPE, "VersionConstraint" );
    
Value<VersionConstraint> getVersionConstraint();
void setVersionConstraint( String value );
void setVersionConstraint( VersionConstraint value );

Further, version constraints can be evaluated in an expression via a pair of new functions. The VersionMatches function takes a version as the first parameter, a version constraint as a second parameter and returns a boolean. The SapphireVersionMatches function takes a version constraint as the sole parameter, evaluates it against Sapphire version and returns a boolean.

Example

In this example, the VersionMatches function is used to control property enablement.

// *** Provider ***
    
@Label( standard = "provider" )
@Enablement( expr = "${ VersionMatches( Root().Version, '[1.1' ) }" )
@XmlBinding( path = "provider" )

ValueProperty PROP_PROVIDER = new ValueProperty( TYPE, "Provider" );

Value<String> getProvider();
void setProvider( String value );

Example

In this example, the VersionMatches function is used in sdef to control visibility of a properties view page.

<properties-view>
    <page>
        <label>provider</label>
        <visible-when>${ VersionMatches( Root().Version, '[1.1' ) }</visible-when>
        <content>
            <property-editor>Provider</property-editor>
            <property-editor>
                <property>Copyright</property>
                <scale-vertically>true</scale-vertically>
            </property-editor>
        </content>
    </page>
</properties-view>

Wednesday, June 27, 2012

Announcing Sapphire 0.5 Release

On behalf of all who contributed, I am very proud to announce availability of Sapphire 0.5 as part of Juno Simultaneous Release. This release includes major enhancements, such as significantly stronger and lighter-weight diagram support, drag-n-drop in forms, more presentation options for possible values and actuators, improved and expanded services, and much more.

Enhancements
Migration Guide
Developer Guide
Downloads

But wait, there is more… After final Juno contribution deadline, Sapphire team continued to work hard testing the new release and fixing issues that were discovered. The result of that effort is the 0.5.1 release that is also available today.

There are now more ways than ever to get your hands on Sapphire. The newest method is to install it from the Juno repository. Look for Sapphire under Application Development Frameworks.

Perhaps the simplest way to install the latest version of Sapphire is from Eclipse Marketplace.

Last, but not least, Sapphire website provides information about every past and future release, including plans, documentation, bugzilla queries, as well as links to downloads and repositories.

Enjoy and don’t forget to leave your feedback on the adopter forum.

Saturday, March 3, 2012

Announcing Sapphire 0.4.1 Release

It is with great pleasure that I announce availability of Sapphire 0.4.1 release. This maintenance release extends support to Indigo SR2 and includes five bug fixes for issues raised by adopters. Adopters of 0.4 release can expect full backwards compatibility. No migration guide is being published.


Developer Guide
Downloads

Thursday, December 1, 2011

Announcing Sapphire 0.4 Release

On behalf of all who contributed, I am very proud to announce availability of Sapphire 0.4 release. This release includes major enhancements, such as API improvements in services and XML binding, more powerful Sapphire EL and ability to use it in more places, content proposals in text fields, split form, regular multi-section form editor page for cases where master-details presentation isn't appropriate, and much more.

Enhancements
Migration Guide
Developer Guide
Downloads

Saturday, November 19, 2011

Java Language Puzzle 3

Given the following source listing, explain why the compiler is producing a warning at invocation to the list method and give a solution for removing the warning without resorting to @SuppressWarnings annotation.

public class JavaLanguagePuzzle3
{
    public static void main( String[] args )
    {
        list( "1", 2, new BigDecimal( "3.5" ) );
    }
    
    private static <T> List<T> list( T... items )
    {
        return Arrays.asList( items );
    }
}

Warning:

Type safety: A generic array of Object&Serializable&Comparable<?> is created for a varargs parameter

Friday, October 7, 2011

Announcing Sapphire 0.3.1 Release

It is with great pleasure that I announce availability of Sapphire 0.3.1 release. This maintenance release includes 64 bug fixes and enhancements. Adopters of 0.3 release can expect full backwards compatibility. No migration guide is being published.

Enhancements
Developer Guide
Downloads