litesoft
@ 787
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.aokeyhole.swing.mains.memobeans; import java.io.*; import org.litesoft.aokeyhole.objects.factories.*; import org.litesoft.aokeyhole.objects.factories.memobean.*; import org.litesoft.aokeyhole.persist.*; import org.litesoft.aokeyhole.swing.*; import org.litesoft.aokeyhole.toolkit.*; import org.litesoft.core.util.*; public abstract class AbstractMemoBeanSwingMain extends AbstractSwingMain { private static PropertyMetaDataDefinitionAccessor DEFINITIONS = new MemoBeanPropertyMetaDataDefinitionAccessor(); public static final SubSystemFactory SSF = new SubSystemFactoryImpl( DEFINITIONS, IdentifierValidatorStrictCamel.INSTANCE, // new ObjectFactoryImpl( DEFINITIONS, IdentifierValidatorStrictCamel.INSTANCE, // new AttributeFactoryImpl( DEFINITIONS, // IdentifierValidatorStrictCamel.INSTANCE ) ) ); protected AbstractMemoBeanSwingMain( String[] pDirectoryNames, boolean pReadOnly ) throws IOException { super( SSF, new SwingEditViewPanelFactory(), pReadOnly, createPersistables( pDirectoryNames ) ); } private static SubSystemPersister[] createPersistables( String[] pDirectoryNames ) throws IOException { SubSystemPersister[] rv = new SubSystemPersister[pDirectoryNames.length]; for ( int i = 0; i < pDirectoryNames.length; i++ ) { rv[i] = new DirectorySubSystemPersister( pDirectoryNames[i] ); } return rv; } private static class DirectorySubSystemPersister implements SubSystemPersister { private final String mDirectoryName; private DirectorySubSystemPersister( String pDirectoryName ) { mDirectoryName = UtilsCommon.assertNotNullNotEmpty( "DirectoryName", pDirectoryName ); } @Override public String getName() { return null; //To change body of implemented methods use File | Settings | File Templates. } @Override public boolean isReadOnly() { return false; //To change body of implemented methods use File | Settings | File Templates. } @Override public SubSystemReader getReader( String pVersion ) throws IOException { return null; //To change body of implemented methods use File | Settings | File Templates. } @Override public SubSystemBuilder getBuilder( String pVersion, String pKeyHoleVersion ) { return null; //To change body of implemented methods use File | Settings | File Templates. } } } |