Examples of ProfileStore


Examples of ca.uhn.hl7v2.conf.store.ProfileStore

    private ValidationException[] testAgainstProfile(Message message, String id) throws ProfileException, HL7Exception {
        HL7Exception[] exceptions;
        HapiContext context = message.getParser().getHapiContext();
        Validator validator = context.getConformanceValidator();
        try {
            ProfileStore profileStore = context.getProfileStore();
            String profileString = profileStore.getProfile(id);
            if (profileString != null) {
                RuntimeProfile profile = PARSER.parse(profileString);              
                exceptions = validator.validate(message, profile.getMessage());
            } else {
                throw new ProfileException("Unable to find the profile " + id);
View Full Code Here

Examples of ca.uhn.hl7v2.conf.store.ProfileStore

    private ValidationException[] testAgainstProfile(Message message, String id) throws ProfileException, HL7Exception {
        HL7Exception[] exceptions;
        HapiContext context = message.getParser().getHapiContext();
        Validator validator = context.getConformanceValidator();
        try {
            ProfileStore profileStore = context.getProfileStore();
            String profileString = profileStore.getProfile(id);
            if (profileString != null) {
                RuntimeProfile profile = getProfile(profileString);
                exceptions = validator.validate(message, profile.getMessage());
            } else {
                throw new ProfileException("Unable to find the profile " + id);
View Full Code Here

Examples of org.jboss.as.console.client.domain.model.ProfileStore

    }

    @Test
    public void loadProfiles() throws Exception
    {
        ProfileStore profileStore = injector.getInstance(ProfileStore.class);
        TestCallback<List<ProfileRecord>> callback = new TestCallback<List<ProfileRecord>>() {

            @Override
            public void onSuccess(List<ProfileRecord> result) {
                assertFalse(result.isEmpty());
                assertEquals("default", result.get(0).getName());
                didCallback = true;
            }
        };

        profileStore.loadProfiles(callback);

        synchronized (callback) {
            callback.wait(500);
        }
View Full Code Here

Examples of org.jboss.as.console.client.domain.model.ProfileStore

        BootstrapContext bootstrapContext = Console.MODULES.getBootstrapContext();

        if(!bootstrapContext.isStandalone())
        {
            ProfileStore profileStore = Console.MODULES.getProfileStore();

            profileStore.loadProfiles(new SimpleCallback<List<ProfileRecord>>() {

                @Override
                public void onFailure(Throwable caught) {
                    callback.onSuccess(Boolean.FALSE);
                    throw new RuntimeException(caught);
View Full Code Here

Examples of org.milyn.profile.ProfileStore

        // If this transformation instance requires profiling, make sure the profile is registered on the
        // Smooks instance.
        if(messageProfile != null) {
            // Register this message flow if it isn't already registered...
            try {
                ProfileStore profileStore = smooks.getApplicationContext().getProfileStore();
                profileStore.getProfileSet(messageProfile);
            } catch(UnknownProfileMemberException e) {
                String[] profiles = getMessageProfiles(messageFromType, messageFrom, messageToType, messageTo);

                synchronized (SmooksTransformer.class) {
                    // Register the message flow within the Smooks context....
View Full Code Here

Examples of org.milyn.profile.ProfileStore

     * @param smooks     The {@link org.milyn.Smooks} instance on which to perform the configuration operation.
     */
    public static void registerProfileSet(ProfileSet profileSet, Smooks smooks) {
        AssertArgument.isNotNull(profileSet, "profileSet");

        ProfileStore profileStore = smooks.getApplicationContext().getProfileStore();
        try {
            profileStore.getProfileSet(profileSet.getBaseProfile());
            logger.debug("ProfileSet [" + profileSet.getBaseProfile() + "] already registered.  Not registering new profile set.");
        } catch (UnknownProfileMemberException e) {
            // It's an unregistered profileset...
            profileStore.addProfileSet(profileSet);
        }
    }
View Full Code Here

Examples of org.milyn.profile.ProfileStore

            return;
        }

        // TODO Sort out the other app context impls such that we can get the profile store from them too
        if(applicationContext instanceof ApplicationContext) {
            ProfileStore profileStore = applicationContext.getProfileStore();

            for(ProfileSet profileSet : profileSets) {
                profileStore.addProfileSet(profileSet);
            }
        }
    }
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.