コード例 #1
0
def generateUseCases(basePackage, repositoryName, featureName):
    utility.createFile(featureName + "UseCase")
    utility.createFolder("usecase")
    utility.writeFile(
        featureName + "UseCase",
        helper.generateUseCaseCode(basePackage, featureName, repositoryName))
    utility.moveFileToFolder(featureName + "UseCase", "usecase")
コード例 #2
0
def generateApiPart(packageName, featureName):
    utility.createFolder("api")
    serviceFileName = featureName + "Services"
    utility.createFile(serviceFileName)
    utility.writeFile(
        serviceFileName,
        helper.generateApiCode(serviceFileName, packageName, featureName))
    utility.moveFileToFolder(serviceFileName, "api")
コード例 #3
0
def generateDomainRepository(repositoryName, packageName, featureName):
    utility.createFolder("repository")
    utility.createFile(featureName + "Repository")
    utility.writeFile(
        repositoryName,
        helper.generateRepositoryCode(packageName, featureName,
                                      repositoryName))
    utility.moveFileToFolder(repositoryName, "repository")
コード例 #4
0
def generateRepositoryPart(packageName, featureName, repositoryName,
                           repositoryImpName):
    utility.createFolder("repository")
    utility.createFile(repositoryImpName)
    utility.writeFile(
        repositoryImpName,
        helper.generateRepositoryImpCode(packageName, featureName,
                                         repositoryName, repositoryImpName))
    utility.moveFileToFolder(repositoryImpName, "repository")
コード例 #5
0
ファイル: mvp_creator.py プロジェクト: iamkurtgoz/waaper-hd
def generateModulePart(presenterName,packageName,viewType):
    utility.createFolder(presenterName.lower()+"_module")
    utility.createFile(presenterName+"Module")
    utility.createFile(presenterName+viewType+"Module")
    utility.writeFile(presenterName+"Module",helper.generatePresenterModuleCode(packageName,presenterName))
    utility.writeFile(presenterName+viewType+"Module",helper.genereateViewModuleCode(packageName,presenterName,viewType))
    utility.moveFileToFolder(presenterName+"Module",presenterName.lower()+"_module")
    utility.moveFileToFolder(presenterName+viewType+"Module",presenterName.lower()+"_module")
    utility.moveFolderToFolder(presenterName.lower()+"_module","../di/modules")
コード例 #6
0
ファイル: mvp_creator.py プロジェクト: iamkurtgoz/waaper-hd
def generateView(presenterName,packageName,viewType):
    if viewType == "Fragment":
        utility.createFile(presenterName+"Fragment")
        utility.writeFile(presenterName+"Fragment",helper.generateFragmentViewCode(packageName,presenterName,viewType))
        utility.moveFileToFolder(presenterName+"Fragment",presenterName.lower())
    if viewType == "Activity":   
        utility.createFile(presenterName+"Activity")
        utility.writeFile(presenterName+"Activity",helper.generateActivityViewCode(packageName,presenterName,viewType))
        utility.moveFileToFolder(presenterName+"Activity",presenterName.lower())
コード例 #7
0
def generateModuleLayer(packageName, featureName, repositoryName,
                        repositoryImpName):
    utility.createFolder(featureName.lower() + "_module")
    utility.createFile(featureName + "Module")
    utility.writeFile(
        featureName + "Module",
        helper.generateModuleCode(packageName, featureName, repositoryName,
                                  repositoryImpName))
    utility.moveFileToFolder(featureName + "Module",
                             featureName.lower() + "_module")
    utility.moveFolderToFolder(featureName.lower() + "_module",
                               "../di/modules")
コード例 #8
0
ファイル: mvvm_creator.py プロジェクト: iamkurtgoz/waaper-hd
def generateView(viewmodelName, packageName, viewType):
    if viewType == "Fragment":
        utility.createFile(viewmodelName + "Fragment")
        utility.writeFile(
            viewmodelName + "Fragment",
            helper.generateViewActivityCode(packageName, viewmodelName,
                                            viewType))
        utility.moveFileToFolder(viewmodelName + "Fragment",
                                 viewmodelName.lower())
    if viewType == "Activity":
        utility.createFile(viewmodelName + "Activity")
        utility.writeFile(
            viewmodelName + "Activity",
            helper.generateViewActivityCode(packageName, viewmodelName,
                                            viewType))
        utility.moveFileToFolder(viewmodelName + "Activity",
                                 viewmodelName.lower())
コード例 #9
0
ファイル: mvvm_creator.py プロジェクト: iamkurtgoz/waaper-hd
def generateViewModelPart(viewmodelName, packageName):
    utility.createFile(viewmodelName + "ViewModel")
    utility.writeFile(viewmodelName + "ViewModel",
                      helper.generateViewModelCode(packageName, viewmodelName))
    utility.moveFileToFolder(viewmodelName + "ViewModel",
                             viewmodelName.lower())
コード例 #10
0
def generateDomainMapper(featureName):
    utility.createFolder("mapper")
    utility.createFile(featureName + "Mapper")
    utility.moveFileToFolder(featureName + "Mapper", "mapper")
コード例 #11
0
ファイル: mvp_creator.py プロジェクト: iamkurtgoz/waaper-hd
def generatePresenterPart(presenterName,packageName):
    utility.createFile(presenterName+"Presenter")
    utility.writeFile(presenterName+"Presenter",helper.generatePresenterCode(packageName,presenterName))
    utility.moveFileToFolder(presenterName+"Presenter",presenterName.lower())
コード例 #12
0
ファイル: mvp_creator.py プロジェクト: iamkurtgoz/waaper-hd
def genereateContractPart(presenterName,packageName):
    utility.createFile(presenterName+"Contract")
    utility.writeFile(presenterName+"Contract",helper.generateContractCode(packageName,presenterName))
    utility.moveFileToFolder(presenterName+"Contract",presenterName.lower())