2016-08-05 3 views

답변

1

이 작동합니다 그래서 내가 다음 디렉토리에있는 파일을 쿼리 DLFolderLocalServiceUtil 인터페이스 및 방법을 사용할 수 있습니다 folderId 필요

Long parentFolderId = DLFolderConstants.DEFAULT_PARENT_FOLDER_ID; // if the id of the parent is set to default 
DLFolder dir = DLFolderLocalServiceUtil.getFolder(groupId, parentFolderId, dirName); 

참조 : DLFolderLocalServiceUtil

groupId가의 ID입니다 요청에서 오는 사이트, 당신은 themeDisplay를 사용하여 얻을 수 있습니다 :

ThemeDisplay themeDisplay = 
    (ThemeDisplay)request.getAttribute(WebKeys.THEME_DISPLAY); 
long groupId = themeDisplay.getLayout().getGroupId(); 

과을

DLFolder newFolder=addFolder(long userId, long groupId, long repositoryId, boolean mountPoint, long parentFolderId, String name, 
String description, boolean hidden, ServiceContext serviceContext) 
+0

당신이뿐만 아니라'groupId'와'parentFolderId'을 설명해주십시오 수 :당신이 그리고 그것은 당신이 사용하여 새 폴더를 추가 할 때 설정 한 검색하는 폴더를 containg 폴더의 ID입니다? 코드 만 대답하는 것은 이해하기가 어렵습니다. –