Exemple #1
0
 def testConfigurationParser(self):
     ''' '''
     assemblyScanning = Assembly('Files scanner')
     registerListeners = RegisterListeners()
     registerListeners.patterns = ['file:///home/mihaigociu/Work/notifier_test/test1.txt',
                                   'file:///home/mihaigociu/Work/*/test1.txt']
     
     assemblyScanning.add(initialize(registerListeners), initialize(FileSystemScanner()))
     # assemblyScanning.add(initialize(RegisterListeners()))
     
     proc = assemblyScanning.create()
     assert isinstance(proc, Processing)
     
     proc.execute(FILL_ALL)
Exemple #2
0
    def testConfigurationParser(self):
        ''' '''
        assemblyScanning = Assembly('Files scanner')
        registerListeners = RegisterListeners()
        registerListeners.patterns = [
            'file:///home/mihaigociu/Work/notifier_test/test1.txt',
            'file:///home/mihaigociu/Work/*/test1.txt'
        ]

        assemblyScanning.add(initialize(registerListeners),
                             initialize(FileSystemScanner()))
        # assemblyScanning.add(initialize(RegisterListeners()))

        proc = assemblyScanning.create()
        assert isinstance(proc, Processing)

        proc.execute(FILL_ALL)
Exemple #3
0
 def createAssemplyParsing(self):
     parser = ParserHandler()
     parser.rootNode = RuleRoot()
     
     anonymous = parser.rootNode.addRule(GroupRule(), 'Config/Anonymous')
     captcha = parser.rootNode.addRule(GroupRule(), 'Config/Captcha')
     right = parser.rootNode.addRule(RightRule('name', 'inherits'), 'Config/Right')
     right.addRule(DescriptionRule(), 'Description')
     
     #allows = anonymous.addRule(AccessRule(), 'Allows')
     allows = Node('Allows')
     allows.addRule(AccessRule())
     #allows.addRule(MethodRule(fromAttributes=True))
     allows.addRule(URLRule(), 'URL')
     allows.addRule(MethodRule(), 'Method')
     
     action = Node('Action')
     action.addRule(ActionRule())
     action.childrens['Action'] = action
     
     actions = Node('Actions')
     actions.childrens['Action'] = action
     
     anonymous.childrens['Actions'] = actions
     anonymous.childrens['Action'] = action
     anonymous.childrens['Allows'] = allows
     
     #no actions for captcha
     captcha.childrens['Allows'] = allows
     
     right.childrens['Actions'] = actions
     right.childrens['Action'] = action
     right.childrens['Allows'] = allows
     
     assemblyParsing = Assembly('Parsing XML')
     assemblyParsing.add(initialize(parser))
     return assemblyParsing
Exemple #4
0
def assemblyBlocks() -> Assembly:
    '''
    The assembly containing the indexing blocks providers.
    '''
    return Assembly('Blocks')
Exemple #5
0
def assemblyResources() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing a REST request.
    '''
    return Assembly('REST resources')
Exemple #6
0
def assemblyServer() -> Assembly:
    '''
    The assembly used in processing the server requests.
    '''
    return Assembly('Server')
Exemple #7
0
def assemblyRESTRequest() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing the gateway REST requests.
    '''
    return Assembly('Gateway REST data')
Exemple #8
0
def assemblyForward() -> Assembly:
    '''
    The assembly containing the handlers that will be used for forwarding the request.
    '''
    return Assembly('Gateway forward')
def assemblyValidationInvoking() -> Assembly:
    '''
    The assembly containing the handlers that will be used for handling an invoking.
    '''
    return Assembly('Request validation invoking')
Exemple #10
0
def assemblyDecodePath() -> Assembly:
    '''
    The assembly containing the decoders for path items.
    '''
    return Assembly('Decode path')
Exemple #11
0
def assemblyGroupGateways() -> Assembly:
    ''' The assembly used for generating the group gateways'''
    return Assembly('Group gateways')
Exemple #12
0
def assemblyDocumentation() -> Assembly:
    '''
    The assembly containing the documentation handling.
    '''
    return Assembly('Documentation')
Exemple #13
0
def assemblyConfiguration() -> Assembly:
    return Assembly('GUI Configurations')
Exemple #14
0
 def assemblyResourcesGateway():
     b = Assembly('Gateway REST resources')
     b.add(assemblyResources())
     b.replace(uri(), uriGateway())
     return b
Exemple #15
0
 def assemblyResourcesGateway():
     b = Assembly('Gateway REST resources')
     b.add(assemblyResources())
     b.replace(encoderPathResource(), encoderPathResourceGateway())
     return b
Exemple #16
0
def assemblyDecodePathExport() -> Assembly:
    '''
    The assembly containing the decoders for path items export.
    '''
    return Assembly('Decode path export')
def assemblyRESTInternal() -> Assembly:
    '''
    The assembly containing the handlers that will be used for internally processing REST resources.
    '''
    return Assembly('Filter REST resources')
Exemple #18
0
def assemblyErrorDelivery() -> Assembly:
    '''
    The assembly containing the handlers that will be used in delivery for the error responses.
    '''
    return Assembly('Error delivery')
Exemple #19
0
def assemblyBind() -> Assembly:
    '''The assembly containing the handlers used for binding services/classes with SQL alchemy support'''
    return Assembly('Bind SQL alchemy')
Exemple #20
0
 def assemblyIntrospection() -> Assembly:
     ''' The assembly used for generating the introspection models'''
     return Assembly('Introspection')
Exemple #21
0
def assemblySQLAssembler() -> Assembly:
    '''
    The assembly containing the handlers to be used in the assembly of invokers for error handling.
    '''
    return Assembly('Assemblers SQL alchemy', reportUnused=False)
Exemple #22
0
def assemblyGateway() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing the gateway.
    '''
    return Assembly('Gateway')
Exemple #23
0
def assemblyAssembler() -> Assembly:
    '''
    The assembly containing the handlers to be used in the assembly of invokers into the root node.
    '''
    return Assembly('Assemblers')
Exemple #24
0
def assemblyNotFound() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing a not found request.
    '''
    return Assembly('Not found')
Exemple #25
0
def assemblyDecodeParameterExport() -> Assembly:
    '''
    The assembly containing the decoders for parameters export.
    '''
    return Assembly('Decode parameter export')
Exemple #26
0
def assemblyAnonymousGateways() -> Assembly:
    ''' The assembly used for generating anonymous gateways'''
    return Assembly('Anonymous gateways')
Exemple #27
0
def assemblyDecodeQuery() -> Assembly:
    '''
    The assembly containing the decoders for query parameters.
    '''
    return Assembly('Decode parameter query')
Exemple #28
0
def assemblyMultipartPopulate() -> Assembly:
    '''
    The assembly containing the handlers that will populate data on the next request content.
    '''
    return Assembly('Multipart content populate')
Exemple #29
0
def assemblyDecodeOrder() -> Assembly:
    '''
    The assembly containing the decoders for order parameters.
    '''
    return Assembly('Decode parameter order')
Exemple #30
0
def assemblyContent() -> Assembly:
    '''
    The assembly containing the handlers that will be used in processing a content file request.
    '''
    return Assembly('CDM')
Exemple #31
0
def assemblyDecodeListItem() -> Assembly:
    '''
    The assembly containing the decoders for list items.
    '''
    return Assembly('Decode parameter list item')