package com.perforce.workshop.tjuricek.p4java_ext; import com.perforce.p4java.client.IClient; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.server.IOptionsServer; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Interface to the "p4 opened" command */ public interface P4Opened extends P4Connection, P4Errors { static P4Opened create(P4Connection conn) { return new DefaultP4Opened(conn); } default List<OpenedFile> listOpened(String clientName) { try { IOptionsServer server = getOptionsServer(); if (clientName != null) { IClient client = server.getClient(clientName); server.setCurrentClient(client); } Map<String, Object>[] results = server.execMapCmd("opened", null, null); checkError(results); List<OpenedFile> files = new ArrayList<OpenedFile>(); for (Map<String, Object> map : results) { files.add(new OpenedFile(map)); } return files; } catch (P4JavaException e) { throw new P4Exception(e); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 9086 | tjuricek |
0.1.0 Initial release of p4java_ext Mostly just contains enough of the P4 API to build the test data initializer. About 4 commands have minimal testing, so it works. Kind of. |
||
//guest/tjuricek/p4java_ext/src/main/java/com/perforce/p4java_ext/P4Opened.java | |||||
#1 | 9085 | tjuricek | First import of the project, before package refactoring. |