ChildByNameKey(Long parentNodeId, QName assocTypeQName, String childNodeName) { ParameterCheck.mandatory("childNodeName", childNodeName); ParameterCheck.mandatory("assocTypeQName", assocTypeQName); ParameterCheck.mandatory("parentNodeId", parentNodeId); this.parentNodeId = parentNodeId; this.assocTypeQName = assocTypeQName; this.childNodeName = childNodeName; }
/** * Default constructor. * * @param action The action that was executed, can not be null * @param result The result from the action, can be null */ public ActionFormResult(Action action, Object result) { ParameterCheck.mandatory("action", action); this.action = action; this.result = result; }
/** * Default constructor. * * @param action The action that was executed, can not be null * @param result The result from the action, can be null */ public ActionFormResult(Action action, Object result) { ParameterCheck.mandatory("action", action); this.action = action; this.result = result; }
ExtensionRoute(Extend extendAnnotation, Method extendedMethod, Method extensionMethod) { super(); ParameterCheck.mandatory("extendAnnotation", extendAnnotation); ParameterCheck.mandatory("traitMethod", extendedMethod); this.extendAnnotation = extendAnnotation; this.extendedMethod = extendedMethod; this.extensionMethod = extensionMethod; }
private AJProxyTrait(Object extensibleInterface) { ParameterCheck.mandatory("extensible", extensibleInterface); this.extensibleInterface = extensibleInterface; }
/** * @see org.alfresco.service.cmr.notification.NotificationService#exists(java.lang.String) */ @Override public boolean exists(String notificationProvider) { // Check the mandatory params ParameterCheck.mandatory("notificationProvider", notificationProvider); return providers.containsKey(notificationProvider); }
/** * {@inheritDoc} */ public boolean validatePatch(Patch patch) { ParameterCheck.mandatory("patch", patch); return validatePatchImpl(Collections.singletonList(patch)); }
@Override public DownloadStatus getDownloadStatus(NodeRef downloadNode) { ParameterCheck.mandatory("downloadNode", downloadNode); return downloadStorage.getDownloadStatus(downloadNode); }
/** * @see org.alfresco.service.cmr.notification.NotificationService#register(org.alfresco.service.cmr.notification.NotificationProvider) */ @Override public void register(NotificationProvider notificationProvider) { // Check mandatory params ParameterCheck.mandatory("notificationProvider", notificationProvider); // Add the notification provider to the map providers.put(notificationProvider.getName(), notificationProvider); }
@Override public void cancelDownload(NodeRef downloadNodeRef) { ParameterCheck.mandatory("downloadNodeRef", downloadNodeRef); downloadStorage.cancelDownload(downloadNodeRef); }
@Override public PagingResults<BlogPostInfo> getDrafts(NodeRef blogContainerNode, String username, PagingRequest pagingReq) { ParameterCheck.mandatory("blogContainerNode", blogContainerNode); ParameterCheck.mandatory("pagingReq", pagingReq); // get canned query GetBlogPostsCannedQuery cq = (GetBlogPostsCannedQuery)draftPostsCannedQueryFactory.getGetDraftsCannedQuery(blogContainerNode, username, pagingReq); // execute canned query CannedQueryResults<BlogEntity> results = cq.execute(); return wrap(results, blogContainerNode); }
@Override public void deleteQuickShareLinkExpiryAction(QuickShareLinkExpiryAction linkExpiryAction) { ParameterCheck.mandatory("linkExpiryAction", linkExpiryAction); NodeRef actionNodeRef = findOrCreateActionNode(linkExpiryAction); if (actionNodeRef != null) { nodeService.deleteNode(actionNodeRef); } }
@Extend(traitAPI=NodeServiceTrait.class,extensionAPI=NodeServiceExtension.class) public Status getNodeStatus(NodeRef nodeRef) { ParameterCheck.mandatory("nodeRef", nodeRef); NodeRef.Status status = nodeDAO.getNodeRefStatus(nodeRef); return status; }
@Override public PagingResults<AspectDefinition> getAllCustomAspects(PagingRequest pagingRequest) { ParameterCheck.mandatory("pagingRequest", pagingRequest); List<AspectDefinition> result = new ArrayList<>(); List<CompiledModel> list = getAllCustomM2Models(false); for (CompiledModel model : list) { result.addAll(model.getAspects()); } return wrapResult(pagingRequest, result); }
public void afterPropertiesSet() throws Exception { ParameterCheck.mandatory("dictionaryService", dictionaryService); ParameterCheck.mandatory("namespaceService", namespaceService); assocProcessor.setDictionaryService(dictionaryService); assocProcessor.setNamespaceService(namespaceService); propProcessor.setDictionaryService(dictionaryService); propProcessor.setNamespaceService(namespaceService); }
@Override public PagingResults<AspectDefinition> getAllCustomAspects(PagingRequest pagingRequest) { ParameterCheck.mandatory("pagingRequest", pagingRequest); List<AspectDefinition> result = new ArrayList<>(); List<CompiledModel> list = getAllCustomM2Models(false); for (CompiledModel model : list) { result.addAll(model.getAspects()); } return wrapResult(pagingRequest, result); }
@Override public PagingResults<TypeDefinition> getAllCustomTypes(PagingRequest pagingRequest) { ParameterCheck.mandatory("pagingRequest", pagingRequest); List<TypeDefinition> result = new ArrayList<>(); List<CompiledModel> list = getAllCustomM2Models(false); for (CompiledModel model : list) { result.addAll(model.getTypes()); } return wrapResult(pagingRequest, result); }
@Override public PagingResults<CustomModelDefinition> getCustomModels(PagingRequest pagingRequest) { ParameterCheck.mandatory("pagingRequest", pagingRequest); List<CustomModelDefinition> result = getAllCustomModels(); return result.isEmpty() ? new EmptyPagingResults<CustomModelDefinition>() : wrapResult(pagingRequest, result); }
@Override public ConstraintDefinition getCustomConstraint(QName name) { ParameterCheck.mandatory("name", name); CompiledModel compiledModel = getModelByUri(name.getNamespaceURI()); if (compiledModel != null) { return compiledModel.getConstraint(name); } return null; }
@Override public TypeDefinition getCustomType(QName name) { ParameterCheck.mandatory("name", name); CompiledModel compiledModel = getModelByUri(name.getNamespaceURI()); if (compiledModel != null) { return compiledModel.getType(name); } return null; }