• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript js-api.AlfrescoApiCompatibility类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@alfresco/js-api.AlfrescoApiCompatibility的典型用法代码示例。如果您正苦于以下问题:TypeScript AlfrescoApiCompatibility类的具体用法?TypeScript AlfrescoApiCompatibility怎么用?TypeScript AlfrescoApiCompatibility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了AlfrescoApiCompatibility类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: initAlfrescoApi

 protected initAlfrescoApi(config) {
     if (this.alfrescoApi) {
         this.alfrescoApi.configureJsApi(config);
     } else {
         this.alfrescoApi = new AlfrescoApiCompatibility(config);
     }
 }
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:7,代码来源:external-alfresco-api.service.ts


示例2: beforeAll

    beforeAll(async (done) => {
        let users = new UsersActions();

        alfrescoJsApi = new AlfrescoApi({
            provider: 'BPM',
            hostBpm: TestConfig.adf.url
        });

        await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        processUserModel = await users.createTenantAndUser(alfrescoJsApi);

        await alfrescoJsApi.login(processUserModel.email, processUserModel.password);
        appModel = await appsActions.importPublishDeployApp(alfrescoJsApi, resources.Files.WIDGET_CHECK_APP.file_location);

        let appDefinitions = await alfrescoJsApi.activiti.appsApi.getAppDefinitions();
        deployedApp = appDefinitions.data.find((currentApp) => {
            return currentApp.modelId === appModel.id;
        });

        process = await appsActions.startProcess(alfrescoJsApi, appModel, app.processName);
        loginPage.loginToProcessServicesUsingUserModel(processUserModel);

        done();
    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:25,代码来源:radio-buttons-widget.e2e.ts


示例3: beforeEach

        beforeEach(async (done) => {

            await alfrescoJsApi.login(fileOwnerUser.id, fileOwnerUser.password);

            file = await uploadActions.uploadFile(alfrescoJsApi, fileModel.location, fileModel.name, '-my-');

            loginPage.loginToContentServicesUsingUserModel(fileOwnerUser);

            contentServicesPage.goToDocumentList();

            contentServicesPage.checkContentIsDisplayed(fileModel.name);

            contentServicesPage.checkSelectedSiteIsDisplayed('My files');

            contentList.rightClickOnRow(fileModel.name);

            contentServicesPage.pressContextMenuActionNamed('Permission');

            permissionsPage.checkAddPermissionButtonIsDisplayed();

            permissionsPage.clickAddPermissionButton();

            permissionsPage.checkAddPermissionDialogIsDisplayed();

            permissionsPage.checkSearchUserInputIsDisplayed();

            permissionsPage.searchUserOrGroup(filePermissionUser.getId());

            permissionsPage.clickUserOrGroup(filePermissionUser.getFirstName());

            permissionsPage.checkUserOrGroupIsAdded(filePermissionUser.getId());

            done();

        });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:35,代码来源:permissions-component.e2e.ts


示例4: beforeAll

        beforeAll(async (done) => {
            let users = new UsersActions();
            let appsActions = new AppsActions();

            alfrescoJsApi = new AlfrescoApi({
                provider: 'BPM',
                hostBpm: TestConfig.adf.url
            });

            await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

            processUserModel = await users.createTenantAndUser(alfrescoJsApi);

            await alfrescoJsApi.login(processUserModel.email, processUserModel.password);

            appModel = await appsActions.importPublishDeployApp(alfrescoJsApi, app.file_location);

            done();
        });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:19,代码来源:form-widgets-component.e2e.ts


示例5: afterAll

    afterAll(async (done) => {

        await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await alfrescoJsApi.core.sitesApi.deleteSite(publicSite.entry.id);

        await alfrescoJsApi.core.sitesApi.deleteSite(privateSite.entry.id);

        done();

    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:11,代码来源:site-permissions.e2e.ts


示例6: afterAll

    afterAll(async (done) => {

        await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await folders.forEach(function (folder) {

            uploadActions.deleteFilesOrFolder(alfrescoJsApi, folder.entry.id);

        });

        done();

    });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:13,代码来源:permissions-component.e2e.ts


示例7: function

describe('Permissions Component', function () {

    const loginPage = new LoginPage();

    const contentServicesPage = new ContentServicesPage();

    const permissionsPage = new PermissionsPage();

    const uploadActions = new UploadActions();

    let contentList = contentServicesPage.getDocumentList();

    const searchDialog = new SearchDialog();

    const viewerPage = new ViewerPage();

    const metadataViewPage = new MetadataViewPage();

    const notificationPage = new NotificationPage();

    const versionManagePage = new VersionManagePage();

    let uploadDialog = new UploadDialog();

    let folderOwnerUser, consumerUser, siteConsumerUser, contributorUser, managerUser, collaboratorUser;

    let publicSite, privateSite, folderName;

    let fileModel = new FileModel({

        'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,

        'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location

    });

    let testFileModel = new FileModel({

        'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,

        'location': resources.Files.ADF_DOCUMENTS.TEST.file_location

    });

    let pngFileModel = new FileModel({

        'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,

        'location': resources.Files.ADF_DOCUMENTS.PNG.file_location

    });

    let alfrescoJsApi = new AlfrescoApi({

        provider: 'ECM',

        hostEcm: TestConfig.adf.url

    });

    let siteFolder, privateSiteFile;

    folderOwnerUser = new AcsUserModel();

    consumerUser = new AcsUserModel();

    siteConsumerUser = new AcsUserModel();

    collaboratorUser = new AcsUserModel();

    contributorUser = new AcsUserModel();

    managerUser = new AcsUserModel();

    beforeAll(async (done) => {

        await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await alfrescoJsApi.core.peopleApi.addPerson(folderOwnerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(siteConsumerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(consumerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(contributorUser);

        await alfrescoJsApi.core.peopleApi.addPerson(collaboratorUser);

        await alfrescoJsApi.core.peopleApi.addPerson(managerUser);

        await alfrescoJsApi.login(folderOwnerUser.id, folderOwnerUser.password);

        let publicSiteName = `PUBLIC_TEST_SITE_${Util.generateRandomString(5)}`;

        let privateSiteName = `PRIVATE_TEST_SITE_${Util.generateRandomString(5)}`;

        folderName = `MEESEEKS_${Util.generateRandomString(5)}`;

        let publicSiteBody = {visibility: 'PUBLIC', title: publicSiteName};

//.........这里部分代码省略.........
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:101,代码来源:site-permissions.e2e.ts


示例8: beforeAll

    beforeAll(async (done) => {

        await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await alfrescoJsApi.core.peopleApi.addPerson(folderOwnerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(siteConsumerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(consumerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(contributorUser);

        await alfrescoJsApi.core.peopleApi.addPerson(collaboratorUser);

        await alfrescoJsApi.core.peopleApi.addPerson(managerUser);

        await alfrescoJsApi.login(folderOwnerUser.id, folderOwnerUser.password);

        let publicSiteName = `PUBLIC_TEST_SITE_${Util.generateRandomString(5)}`;

        let privateSiteName = `PRIVATE_TEST_SITE_${Util.generateRandomString(5)}`;

        folderName = `MEESEEKS_${Util.generateRandomString(5)}`;

        let publicSiteBody = {visibility: 'PUBLIC', title: publicSiteName};

        let privateSiteBody = {visibility: 'PRIVATE', title: privateSiteName};

        publicSite = await alfrescoJsApi.core.sitesApi.createSite(publicSiteBody);

        privateSite = await alfrescoJsApi.core.sitesApi.createSite(privateSiteBody);

        await alfrescoJsApi.core.sitesApi.addSiteMember(publicSite.entry.id, {

            id: siteConsumerUser.id,

            role: CONSTANTS.CS_USER_ROLES.CONSUMER

        });

        await alfrescoJsApi.core.sitesApi.addSiteMember(publicSite.entry.id, {

            id: collaboratorUser.id,

            role: CONSTANTS.CS_USER_ROLES.COLLABORATOR

        });

        await alfrescoJsApi.core.sitesApi.addSiteMember(publicSite.entry.id, {

            id: contributorUser.id,

            role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR

        });

        await alfrescoJsApi.core.sitesApi.addSiteMember(publicSite.entry.id, {

            id: managerUser.id,

            role: CONSTANTS.CS_USER_ROLES.MANAGER

        });

        await alfrescoJsApi.core.sitesApi.addSiteMember(privateSite.entry.id, {

            id: managerUser.id,

            role: CONSTANTS.CS_USER_ROLES.MANAGER

        });

        siteFolder = await uploadActions.createFolder(alfrescoJsApi, folderName, publicSite.entry.guid);

        privateSiteFile = await uploadActions.uploadFile(alfrescoJsApi, fileModel.location, 'privateSite' + fileModel.name, privateSite.entry.guid);

        await alfrescoJsApi.core.nodesApi.updateNode(privateSiteFile.entry.id,

            {

                permissions: {

                    locallySet: [{

                        authorityId: managerUser.getId(),

                        name: 'SiteConsumer',

                        accessStatus: 'ALLOWED'

                    }]

                }

            });

        await uploadActions.uploadFile(alfrescoJsApi, fileModel.location, 'Site' + fileModel.name, siteFolder.entry.id);

        browser.driver.sleep(15000); // wait search get the groups, files and folders

//.........这里部分代码省略.........
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:101,代码来源:site-permissions.e2e.ts


示例9: function

describe('Permissions Component', function () {

    const loginPage = new LoginPage();

    const contentServicesPage = new ContentServicesPage();

    const permissionsPage = new PermissionsPage();

    const uploadActions = new UploadActions();

    let contentList = contentServicesPage.getDocumentList();

    const searchDialog = new SearchDialog();

    const viewerPage = new ViewerPage();

    const metadataViewPage = new MetadataViewPage();

    const notificationPage = new NotificationPage();

    let uploadDialog = new UploadDialog();

    let fileOwnerUser, filePermissionUser, file;

    let fileModel = new FileModel({

        'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,

        'location': resources.Files.ADF_DOCUMENTS.TXT_0B.file_location

    });

    let testFileModel = new FileModel({

        'name': resources.Files.ADF_DOCUMENTS.TEST.file_name,

        'location': resources.Files.ADF_DOCUMENTS.TEST.file_location

    });

    let pngFileModel = new FileModel({

        'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,

        'location': resources.Files.ADF_DOCUMENTS.PNG.file_location

    });

    let groupBody = {

        id: Util.generateRandomString(),

        displayName: Util.generateRandomString()

    };

    let alfrescoJsApi = new AlfrescoApi({

        provider: 'ECM',

        hostEcm: TestConfig.adf.url

    });

    let roleConsumerFolderModel = new FolderModel({'name': 'roleConsumer' + Util.generateRandomString()});

    let roleCoordinatorFolderModel = new FolderModel({'name': 'roleCoordinator' + Util.generateRandomString()});

    let roleCollaboratorFolderModel = new FolderModel({'name': 'roleCollaborator' + Util.generateRandomString()});

    let roleContributorFolderModel = new FolderModel({'name': 'roleContributor' + Util.generateRandomString()});

    let roleEditorFolderModel = new FolderModel({'name': 'roleEditor' + Util.generateRandomString()});

    let roleConsumerFolder, roleCoordinatorFolder, roleContributorFolder, roleCollaboratorFolder, roleEditorFolder;

    let folders;

    fileOwnerUser = new AcsUserModel();

    filePermissionUser = new AcsUserModel();

    const duplicateUserPermissionMessage = 'One or more of the permissions you have set is already present : authority -> ' + filePermissionUser.getId() + ' / role -> Contributor';

    beforeAll(async (done) => {

        await alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);

        await alfrescoJsApi.core.peopleApi.addPerson(fileOwnerUser);

        await alfrescoJsApi.core.peopleApi.addPerson(filePermissionUser);

        await alfrescoJsApi.core.groupsApi.createGroup(groupBody);

        await alfrescoJsApi.login(fileOwnerUser.id, fileOwnerUser.password);

        roleConsumerFolder = await uploadActions.createFolder(alfrescoJsApi, roleConsumerFolderModel.name, '-my-');

        roleCoordinatorFolder = await uploadActions.createFolder(alfrescoJsApi, roleCoordinatorFolderModel.name, '-my-');

//.........这里部分代码省略.........
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:101,代码来源:permissions-component.e2e.ts



注:本文中的@alfresco/js-api.AlfrescoApiCompatibility类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript amcharts3-angular.AmChartsService类代码示例发布时间:2022-05-28
下一篇:
TypeScript adf-testing.UserInfoPage类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap