Package com.sun.star.util

Examples of com.sun.star.util.XFlushable


                }
               
                xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;
               
                printPropertyValues(props);
               
                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();
               
                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;
               
                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;
               
                //change the filter
                setPropertyValueValue((PropertyValue[])instance, "UIName", "dummy");
               
                // 1a.) try to change the filter in the container
                try{
                    xNR.replaceByName(filterName, instance);
                }catch (IllegalArgumentException e){
                    failed("could not replace filter properties ('" + filterName + "')", CONTINUE);
                }
               
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is finalized.
                boolean flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing changed filter '"+ filterName + "'", isFinalized,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing changed filter '"+ filterName + "' Finalized:" + isFinalized,
                        !(flushError ^ isFinalized), CONTINUE);
               
               
               
                // 2a.) try to remove the filter from the container
                try{
                    xNC.removeByName(filterName);
                }catch (NoSuchElementException e){
                    failed("could not remove filter from container ('" + filterName + "')", CONTINUE);
                }
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is mandatory
                flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing removed filter '"+ filterName + "'", isMandatory,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing removed filter '"+ filterName + "' Mandatory:" + isMandatory,
View Full Code Here


                }
               
                xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;
               
                printPropertyValues(props);
               
                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();
               
                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;
               
                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;
               
                //change the filter
                setPropertyValueValue((PropertyValue[])instance, "UIName", "dummy");
               
                // 1a.) try to change the filter in the container
                try{
                    xNR.replaceByName(filterName, instance);
                }catch (IllegalArgumentException e){
                    failed("could not replace filter properties ('" + filterName + "')", CONTINUE);
                }
               
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is finalized.
                boolean flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing changed filter '"+ filterName + "'", isFinalized,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing changed filter '"+ filterName + "' Finalized:" + isFinalized,
                        !(flushError ^ isFinalized), CONTINUE);
               
               
               
                // 2a.) try to remove the filter from the container
                try{
                    xNC.removeByName(filterName);
                }catch (NoSuchElementException e){
                    failed("could not remove filter from container ('" + filterName + "')", CONTINUE);
                }
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is mandatory
                flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing removed filter '"+ filterName + "'", isMandatory,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing removed filter '"+ filterName + "' Mandatory:" + isMandatory,
View Full Code Here

                }
               
                xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;
               
                printPropertyValues(props);
               
                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();
               
                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;
               
                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;
               
                //change the filter
                setPropertyValueValue((PropertyValue[])instance, "UIName", "dummy");
               
                // 1a.) try to change the filter in the container
                try{
                    xNR.replaceByName(filterName, instance);
                }catch (IllegalArgumentException e){
                    failed("could not replace filter properties ('" + filterName + "')", CONTINUE);
                }
               
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is finalized.
                boolean flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing changed filter '"+ filterName + "'", isFinalized,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing changed filter '"+ filterName + "' Finalized:" + isFinalized,
                        !(flushError ^ isFinalized), CONTINUE);
               
               
               
                // 2a.) try to remove the filter from the container
                try{
                    xNC.removeByName(filterName);
                }catch (NoSuchElementException e){
                    failed("could not remove filter from container ('" + filterName + "')", CONTINUE);
                }
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is mandatory
                flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing removed filter '"+ filterName + "'", isMandatory,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing removed filter '"+ filterName + "' Mandatory:" + isMandatory,
View Full Code Here

                }

                xNA = UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;

                printPropertyValues(props);

                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();

                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;

                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;

                //change the filter
                setPropertyValueValue((PropertyValue[]) instance, "UIName", "dummy");

                // 1a.) try to change the filter in the container
                try
                {
                    xNR.replaceByName(filterName, instance);
                }
                catch (IllegalArgumentException e)
                {
                    fail("could not replace filter properties ('" + filterName + "')");
                }

                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is finalized.
                boolean flushError = false;
                try
                {
                    xFlush.flush();
                }
                catch (WrappedTargetRuntimeException e)
                {
                    flushError = true;
                    assertTrue("Unexpected exception wihle flushing changed filter '" + filterName + "'", isFinalized);
                }
                assertTrue("Expected exception was not thorwn while flushing changed filter '" + filterName + "' Finalized:" + isFinalized,
                        !(flushError ^ isFinalized));



                // 2a.) try to remove the filter from the container
                try
                {
                    xNC.removeByName(filterName);
                }
                catch (NoSuchElementException e)
                {
                    fail("could not remove filter from container ('" + filterName + "')");
                }
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is mandatory
                flushError = false;
                try
                {
                    xFlush.flush();
                }
                catch (WrappedTargetRuntimeException e)
                {
                    flushError = true;
                    assertTrue("Unexpected exception wihle flushing removed filter '" + filterName + "'", isMandatory);
View Full Code Here

                }
               
                xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;
               
                printPropertyValues(props);
               
                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();
               
                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;
               
                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;
               
                //change the filter
                setPropertyValueValue((PropertyValue[])instance, "UIName", "dummy");
               
                // 1a.) try to change the filter in the container
                try{
                    xNR.replaceByName(filterName, instance);
                }catch (IllegalArgumentException e){
                    failed("could not replace filter properties ('" + filterName + "')", CONTINUE);
                }
               
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is finalized.
                boolean flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing changed filter '"+ filterName + "'", isFinalized,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing changed filter '"+ filterName + "' Finalized:" + isFinalized,
                        !(flushError ^ isFinalized), CONTINUE);
               
               
               
                // 2a.) try to remove the filter from the container
                try{
                    xNC.removeByName(filterName);
                }catch (NoSuchElementException e){
                    failed("could not remove filter from container ('" + filterName + "')", CONTINUE);
                }
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is mandatory
                flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing removed filter '"+ filterName + "'", isMandatory,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing removed filter '"+ filterName + "' Mandatory:" + isMandatory,
View Full Code Here

                }
               
                xNA = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oObj);
                XNameContainer xNC = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oObj);
                XNameReplace xNR = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, oObj);
                XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, oObj);

                instance = (Object[]) xNA.getByName(filterName);
                PropertyValue[] props = (PropertyValue[]) instance;
               
                printPropertyValues(props);
               
                boolean isMandatory = ((Boolean) getPropertyValueValue(props, "Mandatory")).booleanValue();
                boolean isFinalized = ((Boolean) getPropertyValueValue(props, "Finalized")).booleanValue();
               
                // memory if every state is available
                mandantoryTrue |= isMandatory;
                mandantoryFalse |= !isMandatory;
               
                finalizedTrue |= isFinalized;
                finalizedFalse |= !isFinalized;
               
                //change the filter
                setPropertyValueValue((PropertyValue[])instance, "UIName", "dummy");
               
                // 1a.) try to change the filter in the container
                try{
                    xNR.replaceByName(filterName, instance);
                }catch (IllegalArgumentException e){
                    failed("could not replace filter properties ('" + filterName + "')", CONTINUE);
                }
               
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is finalized.
                boolean flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing changed filter '"+ filterName + "'", isFinalized,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing changed filter '"+ filterName + "' Finalized:" + isFinalized,
                        !(flushError ^ isFinalized), CONTINUE);
               
               
               
                // 2a.) try to remove the filter from the container
                try{
                    xNC.removeByName(filterName);
                }catch (NoSuchElementException e){
                    failed("could not remove filter from container ('" + filterName + "')", CONTINUE);
                }
                // 1b.) try to wirte the changed filter to the configuration.
                // This must result in a exception if the filter is mandatory
                flushError = false;
                try{
                    xFlush.flush();
                } catch (WrappedTargetRuntimeException e){
                    flushError = true;
                    assure("Unexpected exception wihle flushing removed filter '"+ filterName + "'", isMandatory,CONTINUE);
                }
                assure("Expected exception was not thorwn while flushing removed filter '"+ filterName + "' Mandatory:" + isMandatory,
View Full Code Here

    sBookmarkName = sBaseBookmarkName + "_" + Integer.toString(i);
      }
      else{
    XNameContainer xNameCont = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xBookmarks);
    xNameCont.insertByName(sBookmarkName, StorePath);
    XFlushable xFlush = (XFlushable) UnoRuntime.queryInterface(XFlushable.class, xBookmarks);
    xFlush.flush();
      }
  }
    }
    catch( com.sun.star.uno.Exception exception ){
        exception.printStackTrace(System.out);
View Full Code Here

TOP

Related Classes of com.sun.star.util.XFlushable

Copyright © 2018 www.massapicom. 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.